Re: [gentoo-user] about LIBRARY_PATH

2013-08-12 Thread Samuli Suominen

On 12/08/13 05:49, 东方巽雷 wrote:

It seems that this variable is hard-code by gcc.I cannot change it any
more.When I use gcc -m32 to compile a 32bit program,gcc is looking for
/usr/lib rather than /usr/lib32.But in my system,/usr/lib is a symlink
to /usr/lib64.The real 32bit librarys is in /usr/lib32.The linker is
always complaining about i386:x86-64 architecture of input file
`/usr/lib/gcc/x86_64-pc-linux-gnux32/4.7.3/../../../../lib/crt1.o' is


You have a x32 system?


incompatible with i386 output..Why does it not search /usr/lib32?





Re: [gentoo-user] about LIBRARY_PATH

2013-08-12 Thread 东方巽雷
I think the gcc version with x32 abi is faster.So I install a x32 version
on amd64.Now I have solved my problem by creating a new gcc specs
file.Thank you all the same.


2013/8/12 Samuli Suominen ssuomi...@gentoo.org

 On 12/08/13 05:49, 东方巽雷 wrote:

 It seems that this variable is hard-code by gcc.I cannot change it any
 more.When I use gcc -m32 to compile a 32bit program,gcc is looking for
 /usr/lib rather than /usr/lib32.But in my system,/usr/lib is a symlink
 to /usr/lib64.The real 32bit librarys is in /usr/lib32.The linker is
 always complaining about i386:x86-64 architecture of input file
 `/usr/lib/gcc/x86_64-pc-linux-**gnux32/4.7.3/../../../../lib/**crt1.o' is


 You have a x32 system?


  incompatible with i386 output..Why does it not search /usr/lib32?






[gentoo-user] about LIBRARY_PATH

2013-08-11 Thread 东方巽雷
It seems that this variable is hard-code by gcc.I cannot change it any
more.When I use gcc -m32 to compile a 32bit program,gcc is looking for
/usr/lib rather than /usr/lib32.But in my system,/usr/lib is a symlink to
/usr/lib64.The real 32bit librarys is in /usr/lib32.The linker is always
complaining about i386:x86-64 architecture of input file
`/usr/lib/gcc/x86_64-pc-linux-gnux32/4.7.3/../../../../lib/crt1.o' is
incompatible with i386 output..Why does it not search /usr/lib32?


Re: [gentoo-user] about LIBRARY_PATH

2013-08-11 Thread Adam Carter
I thought LD_LIBRARY_PATH was old skool and now ppl use ldconfig, so man
ldconfig.


Re: [gentoo-user] about LIBRARY_PATH

2013-08-11 Thread 东方巽雷
LIBRARY_PATH is not LD_LIBRARY_PATH.


2013/8/12 Adam Carter adamcart...@gmail.com

 I thought LD_LIBRARY_PATH was old skool and now ppl use ldconfig, so man
 ldconfig.



Re: [gentoo-user] about LIBRARY_PATH

2013-08-11 Thread Wang Xuerui
2013/8/12 东方巽雷 dongfangxun...@gmail.com:
 It seems that this variable is hard-code by gcc.I cannot change it any
 more.When I use gcc -m32 to compile a 32bit program,gcc is looking for
 /usr/lib rather than /usr/lib32.But in my system,/usr/lib is a symlink to
 /usr/lib64.The real 32bit librarys is in /usr/lib32.The linker is always
 complaining about i386:x86-64 architecture of input file
 `/usr/lib/gcc/x86_64-pc-linux-gnux32/4.7.3/../../../../lib/crt1.o' is
 incompatible with i386 output..Why does it not search /usr/lib32?

Well, you can always emerge crossdev and crossdev i686-pc-linux-gnu then... (-:

PS: A quick check on my system shows this:

# [08/12 13:27:52] xenon@ribosome ~ $
gcc -m32 -v --version 21 | grep LIBRARY_PATH
LIBRARY_PATH=/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/32/:/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/../../../../lib32/:/lib/../lib32/:/usr/lib/../lib32/:/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/:/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/../../../../x86_64-pc-linux-gnu/lib/:/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/../../../:/lib/:/usr/lib/
# [08/12 13:28:00] xenon@ribosome ~ $
gcc -v --version 21 | grep LIBRARY_PATH
LIBRARY_PATH=/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/:/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/../../../../lib64/:/lib/../lib64/:/usr/lib/../lib64/:/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/../../../../x86_64-pc-linux-gnu/lib/:/usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/../../../:/lib/:/usr/lib/

So the lib32 paths are actually included in the library search path,
and correctly placed *before* the lib counterparts. I'm not sure how
your toolchain ends up in the state you described, but it's certainly
weird... Can you please provide the output of emerge --info and gcc
-v --version? This way people will have more clue to help you...