Hi,
This is my first mail in a mailing-list so I hope I do this properly.

I am trying to build cURL for Apple Silicon ARM (cross-compilation) using a
macOS Intel host.
How is done with other libraries (zlib, cjson, etc): just add "-target
arm64-apple-macos11" to CFLAGS and that's it.

I am using this command
"CFLAGS=" -fPIC -DPIC -m64 -target arm64-apple-macos11 " ./configure
--without-libssh2 --without-zlib --without-gnutls --without-nss
--without-libidn --without-libidn2 --without-nghttp2 --without-librtmp
--without-brotli --without-libpsl
--prefix="/Users/test/work/curl-7.73.0/prefix"
--with-ssl="/Users/test/work/openssl-1.1.1h/prefix/"

I get this error
"configure:4488: gcc -o conftest  -fPIC -DPIC -m64 -target
arm64-apple-macos11    conftest.c  >&5
configure:4492: $? = 0
configure:4499: ./conftest
./configure: line 4501: ./conftest: Bad CPU type in executable
configure:4503: $? = 126
configure:4510: error: in `/Users/test/work/curl-7.73.0':
configure:4512: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'."

But I don't know what "--host" to use. So I put a dummy "--host=arm" and it
seems to work.
On configure I get "Host setup:       arm-unknown-none", but after "make
install" the binary seems ok.
"prefix/bin/curl: Mach-O 64-bit executable arm64"

Am I doing this in a correct manner? Does it matter what I put to "host"?

Thank you
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html

Reply via email to