RE: help needed for builing gcc tool-chain

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



-----Original Message-----
From: Ian Lance Taylor [mailto:iant@xxxxxxxxxx] 
Sent: Sunday, February 12, 2012 11:04 AM
To: Prashant Batra (prbatra)
Cc: Jonathan Wakely; gcc-help@xxxxxxxxxxx
Subject: Re: help needed for builing gcc tool-chain

"Prashant Batra (prbatra)" <prbatra@xxxxxxxxx> writes:

> Still it fails saying - "The directory that should contain system
> headers does not exist:"

What precisely did you do, and what precisely did you see?


> The documentation of --with-sysroot says "sysroot will be searched for
> target system headers, libraries and run time objects", but I am
> building gcc at this stage, so if I am building gcc forsome target,
how
> are these target system headers be present there"

You put them there yourself beforehand.  E.g., if the target system is a
Unix system, you put the contens of /usr/include and /lib and /usr/lib
in the sysroot (in SYSROOT/usr/include, SYSROOT/lib, etc.).

[Prashant] Yes, I had put /usr/include, /usr/lib, etc into
SYSROOT/usr/include, /SYSROOT/usr/lib, and compilation moved ahead.
Not, it fails at at-
/auto/nobackup-bgl-mitg-dev56/prbatra/fresh2/objdir/./gcc/xgcc
-B/auto/nobackup-bgl-mitg-dev56/prbatra/fresh2/objdir/./gcc/
-B/auto/nobackup-bgl-mitg-dev56/prbatra/fresh2/build//x86_64-unknown-lin
ux-gnu/bin/
-B/auto/nobackup-bgl-mitg-dev56/prbatra/fresh2/build//x86_64-unknown-lin
ux-gnu/lib/ -isystem
/auto/nobackup-bgl-mitg-dev56/prbatra/fresh2/build//x86_64-unknown-linux
-gnu/include -isystem
/auto/nobackup-bgl-mitg-dev56/prbatra/fresh2/build//x86_64-unknown-linux
-gnu/sys-include -O2  -O2 -g -O2  -DIN_GCC    -W -Wall -Wwrite-strings
-Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition
-isystem ./include  -fPIC -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2
-D__GCC_FLOAT_NOT_NEEDED  -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/./_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/./_fixunssfsi_s.o
libgcc/./_fixunsdfsi_s.o libgcc/./_fixunsxfsi_s.o libgcc/./_fixsfdi_s.o
libgcc/./_fixunssfdi_s.o libgcc/./_floatdisf_s.o libgcc/./_fixdfdi_s.o
libgcc/./_fixunsdfdi_s.o libgcc/./_floatdidf_s.o libgcc/./_fixxfdi_s.o
libgcc/./_fixunsxfdi_s.o libgcc/./_floatdixf_s.o libgcc/./_fixtfdi_s.o
libgcc/./_fixunstfdi_s.o libgcc/./_floatditf_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/./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
-lc && rm -f ./libgcc_s.so && if [ -f ./libgcc_s.so.1 ]; then mv -f
./libgcc_s.so.1 ./libgcc_s.so.1.backup; else true; fi && mv
./libgcc_s.so.1.tmp ./libgcc_s.so.1 && ln -s libgcc_s.so.1 ./libgcc_s.so
/usr/bin/ld: this linker was not configured to use sysroots
collect2: ld returned 1 exit status
make-3.79.1-p7[3]: *** [libgcc_s.so] Error 1
make-3.79.1-p7[3]: Leaving directory
`/auto/nobackup-bgl-mitg-dev56/prbatra/fresh2/objdir/gcc'

Do, I need to build binutils with sysroot as well, and install it into
the same prefix?

If yes, after building and installing binutils, how do I make use of
this linker while building gcc?

Thanks for the help.

Ian



[Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

Add to Google