crosstool-0.42+NPTL-khem, ppc860, NPTL - dup symbols in crtn.S and crti.S fixed.

Nye Liu nyet@mrv.com
Sat Aug 19 00:26:00 GMT 2006


I have successfully compiled a toolchain and libraries for ppc860 using
nptl, gcc-4.1.0, and glibc-2.3.6

the problem below was solved by adding
GLIBC_EXTRA_CC_ARGS="-fno-unit-at-a-time"
to my powerpc-860.dat

im using a combination of khem's patch
http://sourceware.org/ml/crossgcc/2006-03/msg00090.html

plus a bit of steve's patch
http://sourceware.org/ml/crossgcc/2006-06/msg00096.html

also, i had to use
GCC_EXTRA_CONFIG="--disable-multilib"
to get rid of the GCC_NO_EXECUTABLES problem.

im still sort of confused how GLIBC_EXTRA_CONFIG can co-exist in both
gcc*.dat and the architecture .dats... do they get merged somewhere that
i dont see?

patch forthcoming once i clean it up some, there are a few more
important changes

On Wed, Jun 14, 2006 at 11:36:13AM -0700, Nye Liu wrote:
> Im making another pass at getting NPTL working with: ppc860,
> gcc-4.1.0 and glibc-2.3.6 using khem's latest 0.42 nptl patch
> http://sourceware.org/ml/crossgcc/2006-03/msg00090.html, but i'm having
> problems convincing glibc to use -nostartfiles on the shared library link.
> 
> The command that is failing is in
> build/powerpc-860-linux-gnu/gcc-4.1.0-glibc-2.3.6/build-gcc-core-shared/gcc:
> (excuse the very long line)
> 
> ./xgcc -B./ -B/local/crosstool/gcc-4.1.0-glibc-2.3.6/powerpc-860-linux-gnu/powerpc-860-linux-gnu/bin/ -isystem /local/crosstool/gcc-4.1.0-glibc-2.3.6/powerpc-860-linux-gnu/powerpc-860-linux-gnu/include -isystem /local/crosstool/gcc-4.1.0-glibc-2.3.6/powerpc-860-linux-gnu/powerpc-860-linux-gnu/sys-include -L/local/crosstool-build/crosstool-0.42-nyet/build/powerpc-860-linux-gnu/gcc-4.1.0-glibc-2.3.6/build-gcc-core-shared/gcc/../ld -O2   -DIN_GCC -DCROSS_COMPILE   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include  -fPIC -specs=ldblspecs -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -shared -nodefaultlibs -Wl,--soname=libgcc_s.so.1 -Wl,--version-script=libgcc/./libgcc.map -o ./libgcc_s.so.1.tmp libgcc/./_muldi3_s.o libgcc/./_negdi2_s.o libgcc/./_lshrdi3_s.o libgcc/./_ashldi3_s.o libgcc/./_ashrdi3_s.o libgcc/./_cmpdi2_s.o libgcc/./_ucmpdi2_s.o libgcc/./_floatdidf_s.o libgcc/./_floatdisf_s.o libgcc/./_fixunsdfsi_s.o libgcc/./_fixunssfsi_s.o libgcc/./_fixunsdfdi_s.o libgcc/./_fixdfdi_s.o libgcc/./_fixunssfdi_s.o libgcc/./_fixsfdi_s.o libgcc/./_fixxfdi_s.o libgcc/./_fixunsxfdi_s.o libgcc/./_floatdixf_s.o libgcc/./_fixunsxfsi_s.o libgcc/./_fixtfdi_s.o libgcc/./_fixunstfdi_s.o libgcc/./_floatditf_s.o libgcc/./_clear_cache_s.o libgcc/./_enable_execute_stack_s.o libgcc/./_trampoline_s.o libgcc/./__main_s.o libgcc/./_absvsi2_s.o libgcc/./_absvdi2_s.o libgcc/./_addvsi3_s.o libgcc/./_addvdi3_s.o libgcc/./_subvsi3_s.o libgcc/./_subvdi3_s.o libgcc/./_mulvsi3_s.o libgcc/./_mulvdi3_s.o libgcc/./_negvsi2_s.o libgcc/./_negvdi2_s.o libgcc/./_ctors_s.o libgcc/./_ffssi2_s.o libgcc/./_ffsdi2_s.o libgcc/./_clz_s.o libgcc/./_clzsi2_s.o libgcc/./_clzdi2_s.o libgcc/./_ctzsi2_s.o libgcc/./_ctzdi2_s.o libgcc/./_popcount_tab_s.o libgcc/./_popcountsi2_s.o libgcc/./_popcountdi2_s.o libgcc/./_paritysi2_s.o libgcc/./_paritydi2_s.o libgcc/./_powisf2_s.o libgcc/./_powidf2_s.o libgcc/./_powixf2_s.o libgcc/./_powitf2_s.o libgcc/./_mulsc3_s.o libgcc/./_muldc3_s.o libgcc/./_mulxc3_s.o libgcc/./_multc3_s.o libgcc/./_divsc3_s.o libgcc/./_divdc3_s.o libgcc/./_divxc3_s.o libgcc/./_divtc3_s.o libgcc/./_divdi3_s.o libgcc/./_moddi3_s.o libgcc/./_udivdi3_s.o libgcc/./_umoddi3_s.o libgcc/./_udiv_w_sdiv_s.o libgcc/./_udivmoddi4_s.o libgcc/./_pack_sf_s.o libgcc/./_unpack_sf_s.o libgcc/./_addsub_sf_s.o libgcc/./_mul_sf_s.o libgcc/./_div_sf_s.o libgcc/./_fpcmp_parts_sf_s.o libgcc/./_compare_sf_s.o libgcc/./_eq_sf_s.o libgcc/./_ne_sf_s.o libgcc/./_gt_sf_s.o libgcc/./_ge_sf_s.o libgcc/./_lt_sf_s.o libgcc/./_le_sf_s.o libgcc/./_unord_sf_s.o libgcc/./_si_to_sf_s.o libgcc/./_sf_to_si_s.o libgcc/./_negate_sf_s.o libgcc/./_make_sf_s.o libgcc/./_sf_to_df_s.o libgcc/./_thenan_sf_s.o libgcc/./_sf_to_usi_s.o libgcc/./_usi_to_sf_s.o libgcc/./_pack_df_s.o libgcc/./_unpack_df_s.o libgcc/./_addsub_df_s.o libgcc/./_mul_df_s.o libgcc/./_div_df_s.o libgcc/./_fpcmp_parts_df_s.o libgcc/./_compare_df_s.o libgcc/./_eq_df_s.o libgcc/./_ne_df_s.o libgcc/./_gt_df_s.o libgcc/./_ge_df_s.o libgcc/./_lt_df_s.o libgcc/./_le_df_s.o libgcc/./_unord_df_s.o libgcc/./_si_to_df_s.o libgcc/./_df_to_si_s.o libgcc/./_negate_df_s.o libgcc/./_make_df_s.o libgcc/./_df_to_sf_s.o libgcc/./_thenan_df_s.o libgcc/./_df_to_usi_s.o libgcc/./_usi_to_df_s.o libgcc/./tramp_s.o libgcc/./darwin-ldouble_s.o libgcc/./unwind-dw2_s.o libgcc/./unwind-dw2-fde-glibc_s.o libgcc/./unwind-sjlj_s.o libgcc/./gthr-gnat_s.o libgcc/./unwind-c_s.o
> 
> The error is duplicate symbols from crtn.o and crti.o (dummy, _init, etc)
> 
> Note that the link command has "-nodefaultlibs" but NOT "-nostartfiles"
> 
> If i hack in "-nostartfiles", and run the cmd by hand it links fine.
> 
> Whats the "correct" way of getting "-nostartfiles" added to SHLIB_LINK? i
> can hack libgcc.mk, but it is autogenned, and if i make sure it doesn't
> get re-genned, i get the same errors later in the gcc-core-shared build.
> 
> I am using GLIBC_ADDON_NPTL=1 and my .dat file looks like:
> 
> BINUTILS_DIR=binutils-2.16.1
> GCC_DIR=gcc-4.1.0
> GLIBC_DIR=glibc-2.3.6
> LINUX_DIR=linux-2.6.15.4
> LINUX_SANITIZED_HEADER_DIR=linux-libc-headers-2.6.12.0
> GDB_DIR=gdb-6.4
> GCC_EXTRA_CONFIG=--disable-libunwind-exceptions
> 
> also, khem, your patch is missing a trailing fi in getandpatch.sh:
> 
>    # And one is derived if not set explicitly.
> -  test -z "${GLIBCTHREADS_FILENAME}" &&
> -  GLIBCTHREADS_FILENAME=`echo $GLIBC_DIR | sed 's/glibc-/glibc-linuxthreads-/'`
> +if test '!' -z "${GLIBC_ADDON_LINUXTHREADS}"; then
> +    GLIBCTHREADS_FILENAME=`echo $GLIBC_DIR | sed 's/glibc-/glibc-linuxthreads-/'`
> +fi <---- MUY IMPORTANTE! :)
>  fi
> 
> and "GLIBCTHREADS_FILENAME=glibc-nptl" in the .dat file didn't work, since neither
> ftp://ftp.gnu.org/pub/gnu/glibc/ nor ftp://gcc.gnu.org/pub/glibc/releases
> has glibc-nptl-(version).tar.gz
> 
> -- 
> Nye Liu
> nliu@mrv.com
> (818) 772-6235x248
> (818) 772-0576 fax
> 
> "Who would be stupid enough to quote a fictitious character?"
> 	-- Don Quixote

-- 
Nye Liu
nliu@mrv.com
(818) 772-6235x248
(818) 772-0576 fax

"Who would be stupid enough to quote a fictitious character?"
	-- Don Quixote

--
For unsubscribe information see http://sourceware.org/lists.html#faq



More information about the crossgcc mailing list