On Mar 21, 2021, at 05:41, Jeffrey Walton wrote: > I've been testing iOS cross-compiles. It looks like Wget2 is having > trouble with arm64: > > $ echo $CPPFLAGS > -DNDEBUG -isysroot > /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.2.sdk > > $ echo $CFLAGS > -Wall -g2 -O3 -fPIC -arch arm64 -miphoneos-version-min=6 --sysroot > /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.2.sdk > > $ echo $CXXFLAGS > -Wall -g2 -O3 -fPIC -arch arm64 -miphoneos-version-min=6 > -stdlib=libc++ --sysroot > /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.2.sdk > > $ echo $LDFLAGS
I am not familiar with the --sysroot flag you used. In MacPorts, when we use an SDK, we use the -isysroot flag in CFLAGS and CXXFLAGS and the -Wl,-syslibroot flag in LDFLAGS. On macOS 10.13.6 with Xcode 9.4.1 I was able to compile wget 1.21.1 for iOS with these commands: SDK="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.4.sdk" CPPFLAGS="-DNDEBUG" \ CFLAGS="-Wall -g2 -O3 -fPIC -arch arm64 -miphoneos-version-min=6 -isysroot $SDK" \ CXXFLAGS="-Wall -g2 -O3 -fPIC -arch arm64 -miphoneos-version-min=6 -stdlib=libc++ -isysroot $SDK" \ LDFLAGS="-arch arm64 -Wl,-syslibroot,$SDK" \ ./configure \ --host=arm64-apple-darwin \ --disable-ntlm \ --disable-pcre \ --disable-pcre2 \ --disable-silent-rules \ --without-included-regex \ --without-libiconv-prefix \ --without-libidn \ --without-libpsl \ --without-ssl \ --without-zlib \ make -j$(sysctl -n hw.activecpu) I did not try to run the execuable on an iPhone but it is compiled for arm64.
