From 615afd3f4f55c678f5994c9c3091e1321a14e138 Mon Sep 17 00:00:00 2001 From: fuzzard Date: Sun, 1 May 2022 09:03:48 +1000 Subject: [tools/depends][target] libpng disable hardware call for apple aarch64 targets M1 fails to build due to NEON instructions missing. disable hardware accelleration for darwin_embedded and aarch64 macos targets --- tools/depends/target/libpng/Makefile | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'tools/depends') diff --git a/tools/depends/target/libpng/Makefile b/tools/depends/target/libpng/Makefile index 4e4def73bc..934ab4cce2 100644 --- a/tools/depends/target/libpng/Makefile +++ b/tools/depends/target/libpng/Makefile @@ -7,17 +7,20 @@ CMAKE_OPTIONS=-DPNG_SHARED=OFF \ -DPNG_TESTS=OFF \ -DPNG_DEBUG=OFF -ifneq ($(findstring apple-darwin, $(HOST)), apple-darwin) +ifeq ($(findstring apple-darwin, $(HOST)), apple-darwin) + # hardware optimizations require NEON instructions that + # fail on m1 hardware and ios/tvos, so just disable for any arm64 target cpu on + # an apple-darwin target + ifeq ($(CPU), arm64) + CMAKE_OPTIONS+= -DPNG_HARDWARE_OPTIMIZATIONS=OFF + else + CMAKE_OPTIONS+= -DPNG_HARDWARE_OPTIMIZATIONS=ON + endif +else CMAKE_OPTIONS+= -DPNG_HARDWARE_OPTIMIZATIONS=ON \ -DPNG_BUILD_ZLIB=ON \ -DZLIB_LIBRARY=$(PREFIX)/lib/libz.a \ -DZLIB_INCLUDE_DIR=$(PREFIX)/include -else - ifeq ($(OS), osx) - CMAKE_OPTIONS+= -DPNG_HARDWARE_OPTIMIZATIONS=ON - else - CMAKE_OPTIONS+= -DPNG_HARDWARE_OPTIMIZATIONS=OFF - endif endif LIBDYLIB=$(PLATFORM)/build/$(BYPRODUCT) -- cgit v1.2.3