Hello I posted to binutils list as I guess it is an ld problem, but
maybe some gcc people might be interested as well.

---------- Forwarded message ----------
From: Hector Oron <hector.o...@gmail.com>
Date: 2009/3/13
Subject: Re: ld fails to look under /usr/$arch-linux-gnu/lib64
To: binut...@sources.redhat.com


Hello,

 I have also been trying --with-sysroot option in binutils (2.18 and
2.19) and gcc (4.3), could you give me a hint on how to teach linker
to look for
/usr/s390-linux-gnu/lib64/libc.so, which it really is there. This
process used to work for 3.3, 3.4, 4.0, 4.1 and 4.2 without sysroot
option. But it fails on 4.3, how could i debug it?

Binutils 2.18 configure:
~~~~~~~~~~~~~~~~~
../configure --host=x86_64-linux-gnu \
              --build=x86_64-linux-gnu --target=s390-linux-gnu --prefix=/usr \
              --enable-targets=s390x-linux-gnu
--with-sysroot=/usr/s390-linux-gnu/


GCC-4.3 configure:
~~~~~~~~~~~~~~
../src/configure -v --with-pkgversion='Debian 4.3.2-1.1'
--with-bugurl='file:///usr/share/doc/gcc-4.3/README.Bugs'
--enable-languages=c,c++,objc,obj-c++ --prefix=/usr --enable-shared
--with-system-zlib  --libexecdir=/usr/lib --without-included-gettext
--enable-threads=posix --enable-nls
--with-gxx-include-dir=/usr/s390-linux-gnu/include/c++/4.3.2
--program-suffix=-4.3 --with-sysroot=/usr/s390-linux-gnu/
--enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc
--with-long-double-128 --enable-checking=release
--program-prefix=s390-linux-gnu-
--includedir=/usr/s390-linux-gnu/include --build=x86_64-linux-gnu
--host=x86_64-linux-gnu --target=s390-linux-gnu


Output error:
~~~~~~~~~
/home/zumbi/buildcross/trunk/s390/gcc-4.3-4.3.2/build/./gcc/xgcc
-B/home/zumbi/buildcross/trunk/s390/gcc-4.3-4.3.2/build/./gcc/
-B/usr/s390-linux-gnu/bin/ -B/usr/s390-linux-gnu/lib/ -isystem
/usr/s390-linux-gnu/include -isystem /usr/s390-linux-gnu/sys-include
-O2  -O2 -g -g -O2   -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE   -W -Wall
-Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
-Wold-style-definition  -isystem ./include  -fPIC -mlong-double-128 -g
-DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED  -shared
-nodefaultlibs -Wl,--soname=libgcc_s.so.1
-Wl,--version-script=libgcc.map -o 64/libgcc_s.so.1.tmp -O2 -g -g -O2
-m64 -B./ _muldi3_s.o _negdi2_s.o _lshrdi3_s.o _ashldi3_s.o
_ashrdi3_s.o _cmpdi2_s.o _ucmpdi2_s.o _clear_cache_s.o
_enable_execute_stack_s.o _trampoline_s.o __main_s.o _absvsi2_s.o
_absvdi2_s.o _addvsi3_s.o _addvdi3_s.o _subvsi3_s.o _subvdi3_s.o
_mulvsi3_s.o _mulvdi3_s.o _negvsi2_s.o _negvdi2_s.o _ctors_s.o
_ffssi2_s.o _ffsdi2_s.o _clz_s.o _clzsi2_s.o _clzdi2_s.o _ctzsi2_s.o
_ctzdi2_s.o _popcount_tab_s.o _popcountsi2_s.o _popcountdi2_s.o
_paritysi2_s.o _paritydi2_s.o _powisf2_s.o _powidf2_s.o _powixf2_s.o
_powitf2_s.o _mulsc3_s.o _muldc3_s.o _mulxc3_s.o _multc3_s.o
_divsc3_s.o _divdc3_s.o _divxc3_s.o _divtc3_s.o _bswapsi2_s.o
_bswapdi2_s.o _fixunssfsi_s.o _fixunsdfsi_s.o _fixunsxfsi_s.o
_fixsfdi_s.o _fixdfdi_s.o _fixxfdi_s.o _fixtfdi_s.o _fixunssfdi_s.o
_fixunsdfdi_s.o _fixunsxfdi_s.o _fixunstfdi_s.o _floatdisf_s.o
_floatdidf_s.o _floatdixf_s.o _floatditf_s.o _floatundisf_s.o
_floatundidf_s.o _floatundixf_s.o _floatunditf_s.o _divdi3_s.o
_moddi3_s.o _udivdi3_s.o _umoddi3_s.o _udiv_w_sdiv_s.o _udivmoddi4_s.o
unwind-dw2_s.o unwind-dw2-fde-glibc_s.o unwind-sjlj_s.o gthr-gnat_s.o
unwind-c_s.o emutls_s.o -lc && rm -f 64/libgcc_s.so && if [ -f
64/libgcc_s.so.1 ]; then mv -f 64/libgcc_s.so.1
64/libgcc_s.so.1.backup; else true; fi && mv 64/libgcc_s.so.1.tmp
64/libgcc_s.so.1 && ln -s libgcc_s.so.1 64/libgcc_s.so
/usr/s390-linux-gnu/bin/ld: skipping incompatible
/usr/s390-linux-gnu/lib/libc.so when searching for -lc
/usr/s390-linux-gnu/bin/ld: skipping incompatible
/usr/s390-linux-gnu/lib/libc.a when searching for -lc
/usr/s390-linux-gnu/bin/ld: skipping incompatible
/usr/s390-linux-gnu/bin/../../lib/libc.so when searching for -lc
/usr/s390-linux-gnu/bin/ld: skipping incompatible
/usr/s390-linux-gnu/bin/../../lib/libc.a when searching for -lc
/usr/s390-linux-gnu/bin/ld: s390:31-bit architecture of input file
`/usr/s390-linux-gnu/lib/crti.o' is incompatible with s390:64-bit
output
/usr/s390-linux-gnu/bin/ld: s390:31-bit architecture of input file
`/usr/s390-linux-gnu/lib/crtn.o' is incompatible with s390:64-bit
output
collect2: ld returned 1 exit status

Regards

--
 Héctor Orón



-- 
 Héctor Orón

Reply via email to