L1g3r Logo           SignalQ Sites: NetAdminTools - Coprolite - SpotBridge - NAW
RoboCoop - AreWeDown - SysAdminTools
Xfig - Gold Loaf - GeekPapa - FixGMC - FixRambler
gcc-4.1.2
Topic:MCJ GNU/Linux Reference OS   Date: 2009-05-24
Printer Friendly: Print   

spacerspacer
<<  <   >  >>

Base Reference GNU/Linux Build Sequence

Source code is available here.

To compile and install, run these commands:

cd /sources/ &&
rm -rf /sources/gcc-4.1.2 && 
rm -rf /sources/gcc-build &&
tar -xjf gcc-4.1.2.tar.bz2 &&
cd gcc-4.1.2 && 
sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in &&
sed -i 's/^XCFLAGS =$/& -fomit-frame-pointer/' gcc/Makefile.in &&
sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in &&
sed -i 's/@have_mktemp_command@/yes/' gcc/gccbug.in &&
mkdir ../gcc-build && 
cd ../gcc-build && 
../gcc-4.1.2/configure --prefix=/usr \
    --libexecdir=/usr/lib --enable-shared \
    --enable-threads=posix --enable-__cxa_atexit \
    --enable-clocale=gnu --enable-languages=c,c++ &&
make &&
make install &&
rm -rf /sources/gcc-3.4.5 && 
rm -rf /sources/gcc-build 

The output should look something like this:

creating cache ./config.cache
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking build system type... i686-pc-linux-gnu
checking for a BSD compatible install... /bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for gcc... gcc
checking whether the C compiler (gcc  ) works... yes
checking whether the C compiler (gcc  ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking for gnatbind... no
checking whether compiler driver understands Ada... no
checking how to compare bootstrapped objects... cmp --ignore-initial=16 $$f1 $$f2
checking for correct version of gmp.h... no
*** This configuration is not supported in the following subdirectories:
     target-libada gnattools target-libgfortran target-libffi target-boehm-gc target-zlib target-libjava 
zlib fastjar target-libobjc
    (Any other directories should still work fine.)
checking for bison... bison -y
checking for bison... bison
checking for gm4... no
checking for gnum4... no
checking for m4... m4
checking for flex... flex
checking for flex... flex
checking for makeinfo... makeinfo
checking for expect... no
checking for runtest... no
checking for i686-pc-linux-gnu-ar... no
checking for ar... ar
checking for i686-pc-linux-gnu-as... no
checking for as... as
checking for i686-pc-linux-gnu-dlltool... no
checking for dlltool... no
checking for i686-pc-linux-gnu-ld... /usr/lib/gcc/i686-pc-linux-gnu/4.1.2/../../
../../i686-pc-linux-gnu/bin/ld
checking for i686-pc-linux-gnu-lipo... no
checking for lipo... no
checking for i686-pc-linux-gnu-nm... no
checking for nm... nm
checking for i686-pc-linux-gnu-ranlib... no
checking for ranlib... ranlib
checking for i686-pc-linux-gnu-strip... no
checking for strip... strip
checking for i686-pc-linux-gnu-windres... no
checking for windres... no
checking for i686-pc-linux-gnu-objcopy... no
checking for objcopy... objcopy
checking for i686-pc-linux-gnu-objdump... no
checking for objdump... objdump
checking for i686-pc-linux-gnu-ar... no
checking for ar... ar
checking for i686-pc-linux-gnu-as... no
checking for as... as
checking for i686-pc-linux-gnu-cc... no
checking for cc... cc
checking for i686-pc-linux-gnu-c++... i686-pc-linux-gnu-c++
checking for i686-pc-linux-gnu-dlltool... no
checking for dlltool... no
checking for i686-pc-linux-gnu-gcc... i686-pc-linux-gnu-gcc
checking for i686-pc-linux-gnu-gcj... no
checking for gcj... no
checking for i686-pc-linux-gnu-gfortran... no
checking for gfortran... no
checking for i686-pc-linux-gnu-ld... no
checking for ld... ld
checking for i686-pc-linux-gnu-lipo... no
checking for lipo... no
checking for i686-pc-linux-gnu-nm... no
checking for nm... nm
checking for i686-pc-linux-gnu-objdump... no
checking for objdump... objdump
checking for i686-pc-linux-gnu-ranlib... no
checking for ranlib... ranlib
checking for i686-pc-linux-gnu-strip... no
checking for strip... strip
checking for i686-pc-linux-gnu-windres... no
checking for windres... no
checking where to find the target ar... host tool
checking where to find the target as... host tool
checking where to find the target cc... just compiled
checking where to find the target c++... just compiled
checking where to find the target c++ for libstdc++... just compiled
checking where to find the target dlltool... host tool
checking where to find the target gcc... just compiled
checking where to find the target gcj... host tool
checking where to find the target gfortran... host tool
checking where to find the target ld... host tool
checking where to find the target lipo... host tool
checking where to find the target nm... host tool
checking where to find the target objdump... host tool
checking where to find the target ranlib... host tool
checking where to find the target strip... host tool
checking where to find the target windres... host tool
checking whether to enable maintainer-specific portions of Makefiles... no
checking if symbolic links between directories work... yes
updating cache ./config.cache
creating ./config.status
creating Makefile
make[1]: Entering directory `/sources/gcc-build'
mkdir -p -- ./fixincludes
Configuring in ./fixincludes
configure: creating cache ./config.cache
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for i686-pc-linux-gnu-gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking whether gcc supports -W... yes
checking whether gcc supports -Wall... yes
checking whether gcc supports -Wwrite-strings... yes
checking whether gcc supports -Wstrict-prototypes... yes
checking whether gcc supports -Wmissing-prototypes... yes
checking whether gcc supports -Wold-style-definition... yes
checking whether gcc supports -Wmissing-format-attribute... yes
checking whether gcc supports -pedantic -Wno-long-long... yes
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking stddef.h usability... yes
checking stddef.h presence... yes
checking for stddef.h... yes
checking for stdlib.h... (cached) yes
checking for strings.h... (cached) yes
checking for unistd.h... (cached) yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
.
.
.
chmod 644 /usr/lib/libssp.a
ranlib /usr/lib/libssp.a
PATH="$PATH:/sbin" ldconfig -n /usr/lib
----------------------------------------------------------------------
Libraries have been installed in:
   /usr/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,--rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
 /bin/sh ./libtool --mode=install /bin/install -c  'libssp_nonshared.la' '/usr/lib/libssp_nonshared.la'
/bin/install -c .libs/libssp_nonshared.lai /usr/lib/libssp_nonshared.la
/bin/install -c .libs/libssp_nonshared.a /usr/lib/libssp_nonshared.a

chmod 644 /usr/lib/libssp_nonshared.a
ranlib /usr/lib/libssp_nonshared.a
PATH="$PATH:/sbin" ldconfig -n /usr/lib
----------------------------------------------------------------------
Libraries have been installed in:
   /usr/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,--rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
test -z "/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include" || mkdir -p -- 
"/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include"

 /sources/gcc-4.1.2/install-sh -c -m 644 'ssp/ssp.h' '
/usr/lib/gcc/i686-pc-linux-gnu/4.1.2/include/ssp/ssp.h'
 /sources/gcc-4.1.2/install-sh -c -m 644 '../../../gcc-4.1.2/libssp/ssp/string.h' 
'/usr/lib/gcc/i686-pc-linux-gnu/
4.1.2
/include/ssp/string.h'
 /sources/gcc-4.1.2/install-sh -c -m 644 '../../../gcc-4.1.2/libssp/ssp/stdio.h'
 '/usr/lib/gcc/i686-pc-linux-gnu/
4.1.2
/include/ssp/stdio.h'
 /sources/gcc-4.1.2/install-sh -c -m 644 '../../../gcc-4.1.2/libssp/ssp/unistd.h'
 '/usr/lib/gcc/i686-pc-linux-gnu/
4.1.2
/include/ssp/unistd.h'
make[3]: Leaving directory `/sources/gcc-build/i686-pc-linux-gnu/libssp'
make[2]: Leaving directory `/sources/gcc-build/i686-pc-linux-gnu/libssp'
make[2]: Entering directory `/sources/gcc-build/i686-pc-linux-gnu/libiberty'
make[3]: Entering directory `/sources/gcc-build/i686-pc-linux-gnu/libiberty/testsuite'
make[3]: Nothing to be done for `install'.
make[3]: Leaving directory `/sources/gcc-build/i686-pc-linux-gnu/libiberty/testsuite'
make[2]: Leaving directory `/sources/gcc-build/i686-pc-linux-gnu/libiberty'
make[1]: Leaving directory `/sources/gcc-build'


People:
Places:
Things:
gcc
Times:



None of this would be possible without the diligent work of the Linux From Scratch (LFS) project. A tip o' the hat to those intrepid hackers. Much of the OS buld configuration is taken directly from LFS and BLFS.