hello everyoneI'm looking for a way to build a mac cross toolchain on Linux, I want to use GNU GCC, but when I compile with the following command:
``` contrib/download_prerequisites*./configure --target=x86_64-apple-darwin --prefix=/usr/x86_64-apple-darwin/usr --with-build-sysroot=/usr/x86_64-apple-darwin --program-prefix=x86_64-apple-darwin
* *make* ``` However the following error occurs when compiling: ``` configure:3560: $? = 1configure:3576: /home/jack/osxcross/gcc/host-x86_64-pc-linux-gnu/gcc/xgcc -B/home/jack/osxcross/gcc/host-x86_64-pc-linux-gnu/gcc/ -B/usr/x86_64-apple-darwin/usr/x86_64-apple-darwin/bin/ -B/usr/x86_64-apple-darwin/usr/x86_64-apple-darwin/lib/ -isystem /usr/x86_64-apple-darwin/usr/x86_64-apple-darwin/include -isystem /usr/x86_64-apple-darwin/usr/x86_64-apple-darwin/sys-include --sysroot=/usr/x86_64-apple-darwin -o conftest -g -O2 conftest.c >&5
In file included from conftest.c:9:/home/jack/osxcross/gcc/host-x86_64-pc-linux-gnu/gcc/include-fixed/stdio.h:78:10: fatal error: _stdio.h: No such file or directory
78 | #include <_stdio.h> | ^~~~~~~~~~ compilation terminated. configure:3579: $? = 1 configure:3792: checking for suffix of object filesconfigure:3814: /home/jack/osxcross/gcc/host-x86_64-pc-linux-gnu/gcc/xgcc -B/home/jack/osxcross/gcc/host-x86_64-pc-linux-gnu/gcc/ -B/usr/x86_64-apple-darwin/usr/x86_64-apple-darwin/bin/ -B/usr/x86_64-apple-darwin/usr/x86_64-apple-darwin/lib/ -isystem /usr/x86_64-apple-darwin/usr/x86_64-apple-darwin/include -isystem /usr/x86_64-apple-darwin/usr/x86_64-apple-darwin/sys-include --sysroot=/usr/x86_64-apple-darwin -c -g -O2 conftest.c >&5
rch: invalid option -- 'f' Try 'rch --help' for more information. configure:3818: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "GNU C Runtime Library" | #define PACKAGE_TARNAME "libgcc" | #define PACKAGE_VERSION "1.0" | #define PACKAGE_STRING "GNU C Runtime Library 1.0" | #define PACKAGE_BUGREPORT "" | #define PACKAGE_URL "http://www.gnu.org/software/libgcc/" | /* end confdefs.h. */ | | int | main () | { | | ; | return 0; | }configure:3832: error: in `/home/jack/osxcross/gcc/x86_64-apple-darwin/libgcc':
configure:3834: error: cannot compute suffix of object files: cannot compile See `config.log' for more details ## ---------------- ## ## Cache variables. ## ## ---------------- ## ``` when I do the following: ```/home/jack/osxcross/gcc/host-x86_64-pc-linux-gnu/gcc/xgcc -B/home/jack/osxcross/gcc/host-x86_64-pc-linux-gnu/gcc/ -B/usr/x86_64-apple-darwin/usr/x86_64-apple-darwin/bin/ -B/usr/x86_64-apple-darwin/usr/x86_64-apple-darwin/lib/ -isystem /usr/x86_64-apple-darwin/usr/x86_64-apple-darwin/include -isystem /usr/x86_64-apple-darwin/usr/x86_64-apple-darwin/sys-include --sysroot=/usr/x86_64-apple-darwin ~/main.c -isystem /usr/include
``` error output: ``` rch: invalid option -- 'f' Try 'rch --help' for more information. ``` Did I make any mistake? if so please let me know
Attachment:
OpenPGP_0x79847C80D1D0F3B1.asc
Description: OpenPGP public key
Attachment:
OpenPGP_0x921F872A3D01369C.asc
Description: OpenPGP public key
Attachment:
OpenPGP_signature
Description: OpenPGP digital signature