This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

FW: Another test with cross-compilig for BSD system from a Linux system.


Ok, I resolved the second issue about NetBSD: I had to downgrade gcc to 4.8 from 4.9.
Is a known problem or I did something wrong?

About the first with OpenBSD I wasn't able to find any solution, it remains also downgrading to gcc-4.8, so ideas?

Thanks,
Niccolò F

----------------------------------------
> From: niccolo.ferrari@hotmail.it
> To: gcc-help@gcc.gnu.org
> Subject: Another test with cross-compilig for BSD system from a Linux system.
> Date: Fri, 20 Mar 2015 19:07:11 +0100
>
> Hello,
> I recently succeeded in making a cross-compiler for x86_64 FreeBSD with multilib support.
> Now I was just trying to make another for NetBSD and another for OpenBSD, but I encountered several problems:
>
> First:
> OpenBSD, I failed making binutils and this is the error:
>
> **** ld does not support target x86_64-pc-openbsd5.6
>
> As much as I can understand linker doesn't support x86_64-pc-openbsd5.6 triplet, but why? I know that is possible compile gcc for openbsd system.
> However this is configuration with flags:
>
> ../gcc-4.9.2/configure --target="amd64-openbsd5.6" --prefix="/usr/local/cross" --with-gnu-as --with-gnu-ld --enable-languages=c,c++ --disable-nls --enable-libssp --enable-gold --enable-ld --with-sysroot="/usr/local/sysroot/openbsd5.6" $opt --disable-libgomp
>
> (I used the same prefix path of FreeBSD installation, it's ok?)
>
> Second:
> NetBSD binutils succeeded, but making gcc it fail with this log:
>
> libtool: compile:  /home/nick/Documenti/Programmazione/cross/cross-gcc/build-gcc-x86_64-netbsd5.2.3/./gcc/xgcc -B/home/nick/Documenti/Programmazione/cross/cross-gcc/build-gcc-x86_64-netbsd5.2.3/./gcc/ -B/usr/local/cross/x86_64-netbsd5.2.3/bin/ -B/usr/local/cross/x86_64-netbsd5.2.3/lib/ -isystem /usr/local/cross/x86_64-netbsd5.2.3/include -isystem /usr/local/cross/x86_64-netbsd5.2.3/sys-include "-DPACKAGE_NAME=\"Cilk Runtime Library\"" -DPACKAGE_TARNAME=\"cilk-runtime-library\" -DPACKAGE_VERSION=\"2.0\" "-DPACKAGE_STRING=\"Cilk Runtime Library 2.0\"" -DPACKAGE_BUGREPORT=\"cilk@intel.com\" -DPACKAGE_URL=\"\" -DPACKAGE=\"cilk-runtime-library\" -DVERSION=\"2.0\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_ALLOCA=1 -DHAVE_ATTRIBUTE_VISIBILITY=1 -DHAVE_DLFCN_H=1 -DLT_OBJDIR=\".libs/\" -I. -I../../../gcc-4.9.2/libcilkrts -I../../../gcc-4.9.2/libcilkrts/include -I../../../gcc-4.9.2/libcilkrts/runtime -I../../../gcc-4.9.2/libcilkrts/runtime/config/x86 -DIN_CILK_RUNTIME=1 -fcilkplus -I../../../gcc-4.9.2/libcilkrts/include -I../../../gcc-4.9.2/libcilkrts/runtime -I../../../gcc-4.9.2/libcilkrts/runtime/config/x86 -DIN_CILK_RUNTIME=1 -fcilkplus -std=c99 -g -O2 -MT os-unix.lo -MD -MP -MF .deps/os-unix.Tpo -c ../../../gcc-4.9.2/libcilkrts/runtime/os-unix.c  -fPIC -DPIC -o .libs/os-unix.o
> ../../../gcc-4.9.2/libcilkrts/runtime/os-unix.c:69:5: error: #error "Unsupported OS"
>  #   error "Unsupported OS"
>      ^
> ../../../gcc-4.9.2/libcilkrts/runtime/os-unix.c: In function '__cilkrts_hardware_cpu_count':
> ../../../gcc-4.9.2/libcilkrts/runtime/os-unix.c:386:2: error: #error "Unknown architecture"
>  #error "Unknown architecture"
>   ^
> ../../../gcc-4.9.2/libcilkrts/runtime/os-unix.c: In function '__cilkrts_yield':
> ../../../gcc-4.9.2/libcilkrts/runtime/os-unix.c:419:5: warning: implicit declaration of function 'pthread_yield' [-Wimplicit-function-declaration]
>      pthread_yield();
>      ^
> Makefile:691: set di istruzioni per l'obiettivo "os-unix.lo" non riuscito
> make[2]: *** [os-unix.lo] Errore 1
> make[2]: uscita dalla directory "/home/nick/Documenti/Programmazione/cross/cross-gcc/build-gcc-x86_64-netbsd5.2.3/x86_64-netbsd5.2.3/libcilkrts"
> Makefile:10295: set di istruzioni per l'obiettivo "all-target-libcilkrts" non riuscito
> make[1]: *** [all-target-libcilkrts] Errore 2
> make[1]: uscita dalla directory "/home/nick/Documenti/Programmazione/cross/cross-gcc/build-gcc-x86_64-netbsd5.2.3"
> Makefile:859: set di istruzioni per l'obiettivo "all" non riuscito
> make: *** [all] Errore 2
>
> what can be the cause?
>
> Thank you for your help,
> Niccolò F.
>
 		 	   		  

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]