Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
crosscompile x86->amd64
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on AMD64
View previous topic :: View next topic  
Author Message
tidu
n00b
n00b


Joined: 18 May 2005
Posts: 14

PostPosted: Wed May 18, 2005 10:24 pm    Post subject: crosscompile x86->amd64 Reply with quote

Hi folks,
I'm currently trying to move from my gentoo from x86 (i686-pc-linux-gnu) running on a AMD64 (2800) to an amd64 (x86_64-pc-linux-gnu) environment via a crosscompile. YES, I know, the easiest way is to do a reinstall from scratch (using the install-iso-img), but thats boring.8)

I've reviewed the following docs:
http://www.gentoo.org/proj/en/base/amd64/technotes.xml
http://www.gentoo.org/doc/en/handbook/handbook-amd64.xml
http://dev.gentoo.org/~vapier/CROSS-COMPILE-HOWTO
http://www.sable.mcgill.ca/~dbelan2/crossdev/crossdev-powerpc-i686.html

So my plan is to use crossdev to build a crosscompiler that allows me to install the new gentoo system, so far that I can boot from.
Code:
# crossdev -t x86_64-pc-linux-gnu


Currently I stuck in cross-gcc-stage2... :evil:
Code:
/mnt/portage/tmp/cross/x86_64-pc-linux-gnu/portage/gcc-3.4.3.20050110-r2/work/build/gcc/xgcc -B/mnt/portage/tmp/cross/x86_64-pc-linux-gnu/portage/gcc-3.4.3.20050110-r2/work/build/gcc/ -B/usr/x86_64-pc-linux-gnu/bin/ -B/usr/x86_64-pc-linux-gnu/lib/ -isystem /usr/x86_64-pc-linux-gnu/include -isystem /usr/x86_64-pc-linux-gnu/sys-include -O2  -DIN_GCC -DCROSS_COMPILE -DNATIVE_CROSS   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include  -fPIC -DHAVE_SYSLOG -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -D_LIBC_PROVIDES_SSP_ -shared -nodefaultlibs -Wl,--soname=libgcc_s.so.1 -Wl,--version-script=libgcc/32/libgcc.map -o 32/libgcc_s.so.1.tmp  -m32  libgcc/32/_muldi3.o libgcc/32/_negdi2.o libgcc/32/_lshrdi3.o libgcc/32/_ashldi3.o libgcc/32/_ashrdi3.o libgcc/32/_cmpdi2.o libgcc/32/_ucmpdi2.o libgcc/32/_floatdidf.o libgcc/32/_floatdisf.o libgcc/32/_fixunsdfsi.o libgcc/32/_fixunssfsi.o libgcc/32/_fixunsdfdi.o libgcc/32/_fixdfdi.o libgcc/32/_fixunssfdi.o libgcc/32/_fixsfdi.o libgcc/32/_fixxfdi.o libgcc/32/_fixunsxfdi.o libgcc/32/_floatdixf.o libgcc/32/_fixunsxfsi.o libgcc/32/_fixtfdi.o libgcc/32/_fixunstfdi.o libgcc/32/_floatditf.o libgcc/32/_clear_cache.o libgcc/32/_enable_execute_stack.o libgcc/32/_trampoline.o libgcc/32/__main.o libgcc/32/_absvsi2.o libgcc/32/_absvdi2.o libgcc/32/_addvsi3.o libgcc/32/_addvdi3.o libgcc/32/_subvsi3.o libgcc/32/_subvdi3.o libgcc/32/_mulvsi3.o libgcc/32/_mulvdi3.o libgcc/32/_negvsi2.o libgcc/32/_negvdi2.o libgcc/32/_ctors.o libgcc/32/_ffssi2.o libgcc/32/_ffsdi2.o libgcc/32/_clz.o libgcc/32/_clzsi2.o libgcc/32/_clzdi2.o libgcc/32/_ctzsi2.o libgcc/32/_ctzdi2.o libgcc/32/_popcount_tab.o libgcc/32/_popcountsi2.o libgcc/32/_popcountdi2.o libgcc/32/_paritysi2.o libgcc/32/_paritydi2.o libgcc/32/_stack_smash_handler.o libgcc/32/_divdi3.o libgcc/32/_moddi3.o libgcc/32/_udivdi3.o libgcc/32/_umoddi3.o libgcc/32/_udiv_w_sdiv.o libgcc/32/_udivmoddi4.o  libgcc/32/unwind-dw2.o libgcc/32/unwind-dw2-fde-glibc.o libgcc/32/unwind-sjlj.o libgcc/32/gthr-gnat.o libgcc/32/unwind-c.o -lc && rm -f libgcc_s_32.so && if [ -f 32/libgcc_s.so.1 ]; then mv -f 32/libgcc_s.so.1 32/libgcc_s.so.1.backup; else true; fi && mv 32/libgcc_s.so.1.tmp 32/libgcc_s.so.1 && ln -s 32/libgcc_s.so.1 libgcc_s_32.so
/usr/x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/x86_64-pc-linux-gnu/lib/libc.so when searching for -lc
/usr/x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/x86_64-pc-linux-gnu/lib/libc.a when searching for -lc
/usr/x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3-20050110/../../../../x86_64-pc-linux-gnu/lib/libc.so when searching for -lc
/usr/x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3-20050110/../../../../x86_64-pc-linux-gnu/lib/libc.a when searching for -lc
/usr/x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/x86_64-pc-linux-gnu/binutils-bin/2.15.92.0.2/../../lib/libc.so when searching for -lc
/usr/x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/x86_64-pc-linux-gnu/binutils-bin/2.15.92.0.2/../../lib/libc.a when searching for -lc
/usr/x86_64-pc-linux-gnu/bin/ld: cannot find -lc
collect2: ld returned 1 exit status
make[2]: *** [32/libgcc_s_32.so] Error 1
make[2]: Leaving directory `/mnt/portage/tmp/cross/x86_64-pc-linux-gnu/portage/gcc-3.4.3.20050110-r2/work/build/gcc'
make[1]: *** [stmp-multilib] Error 2
make[1]: Leaving directory `/mnt/portage/tmp/cross/x86_64-pc-linux-gnu/portage/gcc-3.4.3.20050110-r2/work/build/gcc'
make: *** [all-gcc] Error 2


AFAIK it tries to link against libc (-lc), but that doesn't work.

:?: Now I'm wondering what mess I'm in. I don't really understand, what stage2 means in that respective. Does this mean it tries to create gcc and link it with 64-bit libs? -> why is that, I don't need that for a x-compiler.

I'd appreciate any comments on the functionallity of this X-compiling.

Thanks & regards

Tidu
Back to top
View user's profile Send private message
tidu
n00b
n00b


Joined: 18 May 2005
Posts: 14

PostPosted: Fri May 20, 2005 6:03 am    Post subject: why linking against 64libs? Reply with quote

I've slept over this:
    *) WHY is ld using the 64Bit-Version of libc.a? This will not work. The compiler is targeted for 32 Bit but shall produce 64 Bit.
    *) WHAT is different from Stage1? I've reviewed the crossdev, but I don't understand the major difference from the stage1 compile (except feature like c++, etc ).
    *) WHAT purpose has the stage1/stage2 on crosscompilers? As I build a crosscompiler, I don't want it ever to be linked with the new (target-systems) libraries. Or do I?

Any comments are welcome.
Back to top
View user's profile Send private message
ZByte
Tux's lil' helper
Tux's lil' helper


Joined: 18 Aug 2004
Posts: 141
Location: Moscow, Russia

PostPosted: Sun May 22, 2005 6:14 am    Post subject: Reply with quote

I have similar problem, but i does not know solution.
But i found this bugtac ticket:
https://bugs.gentoo.org/show_bug.cgi?id=91145
Back to top
View user's profile Send private message
tidu
n00b
n00b


Joined: 18 May 2005
Posts: 14

PostPosted: Mon May 23, 2005 7:44 pm    Post subject: Reply with quote

good point.
I will have an eye on that ;-)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on AMD64 All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum