Software > Programmieren, Kompilieren
GCC 2.95.3 für Solaris 2.5.1
escimo:
Danke für deine Antwort Claus.
Echt mal Mist mit dem Unwissen. Ich könnte mir in den Arsch beißen. Das kann ich dann wohl wirklich nur probieren. Ähhh... :-\
escimo:
So...ich habe die Schnauze schon wieder richtig voll. :-\
--- Code: ---# uname -a
SunOS sypho 5.5.1 Generic_103640-42 sun4m sparc SUNW,SPARCstation-20
--- Ende Code ---
Hier mal mein generelles Vorgehen zum Übersetzen des GNU C-Compilers:
Wir nehmen an die Quellen liegen im Verzeichnis /opt/temp/gcc-2.95.3/ , der Compiler zum Übersetzen ist unter /usr/local/ installiert.
Hier noch weiterführende Informationen zu den installierten und genutzten Tools für das Kompilier-Vorhaben:
--- Code: ---# pkginfo | grep SMC
application SMCgcc342 gcc
application SMCliconv libiconv
application SMClintl libintl
application SMCmake make
--- Ende Code ---
Auch hier habe ich es mir vorerst ersparrt, die binutils, automake, autoconf und andere GNU-Tools zu installieren. Ich möchte einen Großteil der Tools von Solaris einsetzen lassen, wie z.B. m4, lex, as oder ar, die sich im Verzeichnis /usr/ccs/bin/ befinden.
--- Code: ---# make --version
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
# gcc --version
This program built for sparc-sun-solaris2.5.1
gcc (GCC) 3.4.2
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
--- Ende Code ---
Wie ihr sicher bemerkt habt, bin ich doch dazu übergegangen einen neuere Compiler-Suite (3.4.2 anstatt 2.95.3 oder 2.7.2) zu nutzen, da ich die libgcc_s.o benötige, die bei 2.95.3 und 2.7.2 nicht enthalten ist, aber zum Beipsiel von GNU make benötigt wird.
Her mal ein Paar Ausgaben, wenn was nicht vorhanden ist:
--- Code: ---...
ld.so.1: make: fatal: libiconv.so.2: open failed: No such file or directory
Killed
# pkgadd -d /home/bli/sun551/*/libiconv-...
...
ld.so.1: make: fatal: libintl.so.3: open failed: No such file or directory
Killed
# pkgadd -d /home/bla/sun551/*/libintl-...
ld.so.1: make: fatal: libgcc_s.so.1: open failed: No such file or directory
Killed
# pkgadd -d /home/blo/sun551/*/libgcc-...
--- Ende Code ---
Umgebungsvariablen habe ich wie folgt unter CDE in einem dtterm-Fenster als root (su) gesetzt:
--- Code: ---# PATH=/usr/local/bin:/usr/ccs/bin:$PATH; export PATH
# LD_LIBRARY_PATH=/usr/local/lib:/usr/ccs/lib:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH
# MANPATH=/usr/local/man:$MANPATH; export MANPATH
# CXX=`which gcc`; export CXX
# CC=`which gcc`; export CC
--- Ende Code ---
So jetzt geht es los:
--- Code: ---# mkdir /opt/temp/gcc-sun4
# cd /opt/temp/gcc-sun4
# ../gcc-2.95.3/configure --help
...bla...
# more ../gcc-2.95.3/gcc/INSTALL
...
We _highly_ recommend that GCC be built using GNU make;
...interessant...
--- Ende Code ---
Den Inhalt zur Datei ../gcc-2.95.3/gcc/INSTALL findet hier auch online hier.
Schritt 1: das configure-Script
--- Code: ---# ../gcc-2.95.3/configure --prefix=/opt/gnu --with-local-prefix=/opt/gnu
Created "Makefile" in /opt/temp/gcc-sun4 using "mh-frag"
Configuring libiberty...
creating cache ../config.cache
checking host system type... sparc-sun-solaris2.5.1
checking build system type... sparc-sun-solaris2.5.1
checking for ar... ar
checking for ranlib... ranlib
checking for gcc... /usr/local/bin/gcc
checking whether we are using GNU C... yes
checking whether /usr/local/bin/gcc accepts -g... yes
checking for POSIXized ISC... no
checking for a BSD compatible install... ../../gcc-2.95.3/libiberty/../install-sh -c
checking how to run the C preprocessor... /usr/local/bin/gcc -E
checking for sys/file.h... yes
checking for sys/param.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for unistd.h... yes
checking for strings.h... yes
checking for sys/time.h... yes
checking for sys/resource.h... yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking whether the C compiler (/usr/local/bin/gcc -g -O2 ) works... yes
checking whether the C compiler (/usr/local/bin/gcc -g -O2 ) is a cross-compiler... no
checking for asprintf... no
checking for atexit... yes
checking for basename... no
checking for bcmp... yes
checking for bcopy... yes
checking for bzero... yes
checking for calloc... yes
checking for clock... yes
checking for getcwd... yes
checking for getpagesize... yes
checking for index... yes
checking for insque... yes
checking for memchr... yes
checking for memcmp... yes
checking for memcpy... yes
checking for memmove... yes
checking for memset... yes
checking for mkstemps... no
checking for putenv... yes
checking for random... yes
checking for rename... yes
checking for rindex... yes
checking for setenv... no
checking for sigsetmask... no
checking for strcasecmp... yes
checking for strchr... yes
checking for strdup... yes
checking for strncasecmp... yes
checking for strrchr... yes
checking for strstr... yes
checking for strtod... yes
checking for strtol... yes
checking for strtoul... yes
checking for tmpnam... yes
checking for vasprintf... no
checking for vfprintf... yes
checking for vprintf... yes
checking for vsprintf... yes
checking for waitpid... yes
checking for working alloca.h... yes
checking for alloca... yes
checking for ANSI C header files... yes
checking for pid_t... yes
checking for vfork.h... no
checking for working vfork... yes
checking for sys_errlist... yes
checking for sys_nerr... yes
checking for sys_siglist... no
checking for getrusage... yes
checking for on_exit... no
checking for psignal... yes
checking for strerror... yes
checking for strsignal... yes
checking for sysconf... yes
checking for times... yes
checking for sbrk... yes
checking for gettimeofday... yes
updating cache ../config.cache
creating ./config.status
creating Makefile
creating testsuite/Makefile
creating config.h
Configuring texinfo...
loading cache ../config.cache
checking for a BSD compatible install... ../../gcc-2.95.3/texinfo/../install-sh -c
checking whether build environment is sane... yes
checking whether make sets ${MAKE}... yes
checking for working aclocal... missing
checking for working autoconf... missing
checking for working automake... missing
checking for working autoheader... missing
checking for working makeinfo... missing
checking for gcc... (cached) /usr/local/bin/gcc
checking whether the C compiler (/usr/local/bin/gcc -g -O2 ) works... yes
checking whether the C compiler (/usr/local/bin/gcc -g -O2 ) is a cross-compiler... no
checking whether we are using GNU C... (cached) yes
checking whether /usr/local/bin/gcc accepts -g... (cached) yes
checking how to run the C preprocessor... (cached) /usr/local/bin/gcc -E
checking whether /usr/local/bin/gcc needs -traditional... no
checking for a BSD compatible install... ../../gcc-2.95.3/texinfo/../install-sh -c
checking for ranlib... (cached) ranlib
checking for texconfig... false
checking for POSIXized ISC... no
checking for minix/config.h... no
checking whether to enable maintainer-specific portions of Makefiles... no
checking for Cygwin32 environment... no
checking for Mingw32 environment... no
checking for executable suffix... no
checking for sigblock... no
checking for sigblock in -lbsd... no
checking for tputs in -lncurses... no
checking for tputs in -lcurses... yes
checking for ANSI C header files... (cached) yes
checking for fcntl.h... yes
checking for pwd.h... yes
checking for string.h... (cached) yes
checking for strings.h... (cached) yes
checking for termcap.h... no
checking for termio.h... yes
checking for termios.h... yes
checking for unistd.h... (cached) yes
checking for sys/fcntl.h... yes
checking for sys/file.h... (cached) yes
checking for sys/ptem.h... yes
checking for sys/time.h... (cached) yes
checking for sys/ttold.h... yes
checking for sys/wait.h... (cached) yes
checking for off_t... yes
checking return type of signal handlers... void
checking for working const... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for working alloca.h... (cached) yes
checking for alloca... (cached) yes
checking for vprintf... (cached) yes
checking for setvbuf... yes
checking for getcwd... (cached) yes
checking for memset... (cached) yes
checking for bzero... (cached) yes
checking for strchr... (cached) yes
checking for strcasecmp... (cached) yes
checking for sigprocmask... yes
checking for sigsetmask... (cached) no
checking for memcpy... (cached) yes
checking for memmove... (cached) yes
checking for strdup... (cached) yes
checking for strerror... (cached) yes
checking for inline... inline
checking for size_t... yes
checking for unistd.h... (cached) yes
checking for getpagesize... (cached) yes
checking for working mmap... yes
checking for argz.h... no
checking for limits.h... yes
checking for locale.h... yes
checking for nl_types.h... yes
checking for malloc.h... yes
checking for string.h... (cached) yes
checking for unistd.h... (cached) yes
checking for values.h... yes
checking for sys/param.h... (cached) yes
checking for getcwd... (cached) yes
checking for munmap... yes
checking for putenv... (cached) yes
checking for setenv... (cached) no
checking for setlocale... yes
checking for strchr... (cached) yes
checking for strcasecmp... (cached) yes
checking for __argz_count... no
checking for __argz_stringify... no
checking for __argz_next... no
checking for stpcpy... no
checking for LC_MESSAGES... yes
checking whether NLS is requested... yes
checking whether included gettext is requested... no
checking for libintl.h... yes
checking for gettext in libc... no
checking for bindtextdomain in -lintl... yes
checking for gettext in libintl... no
checking whether catgets can be used... no
checking for msgfmt... /usr/bin/msgfmt
checking for gmsgfmt... /usr/bin/msgfmt
checking for xgettext... /usr/bin/xgettext
found xgettext programs is not GNU xgettext; ignore it
checking for catalogs to be installed... de fr
updating cache ../config.cache
creating ./config.status
creating Makefile
creating doc/Makefile
creating info/Makefile
creating intl/Makefile
creating lib/Makefile
creating makeinfo/Makefile
creating po/Makefile.in
creating util/Makefile
creating config.h
linking ../../gcc-2.95.3/texinfo/intl/libgettext.h to intl/libintl.h
Configuring gcc...
loading cache ../config.cache
checking LIBRARY_PATH variable... ok
checking GCC_EXEC_PREFIX variable... ok
checking host system type... sparc-sun-solaris2.5.1
checking target system type... sparc-sun-solaris2.5.1
checking build system type... sparc-sun-solaris2.5.1
checking for gcc... (cached) /usr/local/bin/gcc
checking whether the C compiler (/usr/local/bin/gcc -g -O2 ) works... yes
checking whether the C compiler (/usr/local/bin/gcc -g -O2 ) is a cross-compiler... no
checking whether we are using GNU C... (cached) yes
checking whether /usr/local/bin/gcc accepts -g... (cached) yes
checking whether make sets ${MAKE}... (cached) yes
checking whether a default assembler was specified... no
checking whether a default linker was specified... no
checking for gawk... no
checking for mawk... no
checking for nawk... nawk
checking for flex... lex
checking for yywrap in -ll... yes
checking whether ln works... yes
checking whether ln -s works... yes
checking for volatile... yes
checking for ranlib... (cached) ranlib
checking for bison... no
checking for byacc... no
checking for a BSD compatible install... ../../gcc-2.95.3/gcc/../install-sh -c
checking how to run the C preprocessor... (cached) /usr/local/bin/gcc -E
checking for ANSI C header files... (cached) yes
checking whether time.h and sys/time.h may both be included... yes
checking whether string.h and strings.h may both be included... yes
checking for sys/wait.h that is POSIX.1 compatible... (cached) yes
checking for limits.h... (cached) yes
checking for stddef.h... yes
checking for string.h... (cached) yes
checking for strings.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for time.h... yes
checking for fcntl.h... (cached) yes
checking for unistd.h... (cached) yes
checking for stab.h... no
checking for sys/file.h... (cached) yes
checking for sys/time.h... (cached) yes
checking for sys/resource.h... (cached) yes
checking for sys/param.h... (cached) yes
checking for sys/times.h... yes
checking for sys/stat.h... yes
checking for direct.h... no
checking for thread.h... yes
checking for pthread.h... yes
checking for gnatbind... no
checking whether cpp understands the stringify operator... yes
checking for inttypes.h... no
checking for strtoul... (cached) yes
checking for bsearch... yes
checking for strerror... (cached) yes
checking for putenv... (cached) yes
checking for popen... yes
checking for bcopy... (cached) yes
checking for bzero... (cached) yes
checking for bcmp... (cached) yes
checking for index... (cached) yes
checking for rindex... (cached) yes
checking for strchr... (cached) yes
checking for strrchr... (cached) yes
checking for kill... yes
checking for getrlimit... yes
checking for setrlimit... yes
checking for atoll... yes
checking for atoq... no
checking for sysconf... (cached) yes
checking for isascii... yes
checking for gettimeofday... (cached) yes
checking for strsignal... (cached) yes
checking for putc_unlocked... yes
checking for fputc_unlocked... no
checking for fputs_unlocked... no
checking for vprintf... (cached) yes
checking whether the printf functions support %p... yes
checking for pid_t... (cached) yes
checking for vfork.h... (cached) no
checking for working vfork... (cached) yes
checking whether malloc must be declared... no
checking whether realloc must be declared... no
checking whether calloc must be declared... no
checking whether free must be declared... no
checking whether bcopy must be declared... no
checking whether bzero must be declared... no
checking whether bcmp must be declared... no
checking whether index must be declared... no
checking whether rindex must be declared... no
checking whether getenv must be declared... no
checking whether atol must be declared... no
checking whether sbrk must be declared... no
checking whether abort must be declared... no
checking whether atof must be declared... no
checking whether strerror must be declared... no
checking whether getcwd must be declared... no
checking whether getwd must be declared... yes
checking whether strsignal must be declared... no
checking whether putc_unlocked must be declared... yes
checking whether fputs_unlocked must be declared... yes
checking whether strstr must be declared... no
checking whether getrlimit must be declared... no
checking whether setrlimit must be declared... no
checking for sys_siglist declaration in signal.h or unistd.h... no
checking if mkdir takes one argument... no
Using `../../gcc-2.95.3/gcc/config/sparc/sparc.c' to output insns.
Using `../../gcc-2.95.3/gcc/config/sparc/sparc.md' as machine description file.
Using `../../gcc-2.95.3/gcc/config/sparc/sol2-sld.h' as target machine macro file.
Using the following host machine macro files:
../../gcc-2.95.3/gcc/config/xm-siglist.h
../../gcc-2.95.3/gcc/config/sparc/xm-sysv4.h
../../gcc-2.95.3/gcc/config/sparc/xm-sol2.h
checking for strerror in -lcposix... no
checking for working const... (cached) yes
checking for inline... (cached) inline
checking for off_t... (cached) yes
checking for size_t... (cached) yes
checking for working alloca.h... (cached) yes
checking for alloca... (cached) yes
checking for unistd.h... (cached) yes
checking for getpagesize... (cached) yes
checking for working mmap... (cached) yes
checking for argz.h... (cached) no
checking for limits.h... (cached) yes
checking for locale.h... (cached) yes
checking for nl_types.h... (cached) yes
checking for malloc.h... (cached) yes
checking for string.h... (cached) yes
checking for unistd.h... (cached) yes
checking for sys/param.h... (cached) yes
checking for getcwd... (cached) yes
checking for munmap... (cached) yes
checking for putenv... (cached) yes
checking for setenv... (cached) no
checking for setlocale... (cached) yes
checking for strchr... (cached) yes
checking for strcasecmp... (cached) yes
checking for strdup... (cached) yes
checking for __argz_count... (cached) no
checking for __argz_stringify... (cached) no
checking for __argz_next... (cached) no
checking for LC_MESSAGES... (cached) yes
checking whether NLS is requested... no
checking assembler alignment features...
checking assembler subsection support...
checking assembler instructions...
Using the Haifa scheduler.
updating cache ../config.cache
creating ./config.status
creating Makefile
creating intl/Makefile
creating po/Makefile.in
creating fixinc/Makefile
creating cp/Makefile
creating f/Makefile
creating java/Makefile
creating auto-host.h
linking ../../gcc-2.95.3/gcc/intl/libgettext.h to intl/libintl.h
Merged sparc/x-sysv4.
Merged sparc/t-sol2 and t-install-cpp.
Created `ch/Makefile'.
Merged sparc/x-sysv4.
Merged sparc/t-sol2 and t-install-cpp.
Created `objc/Makefile'.
creating libintl.h
Configuring etc...
loading cache ../config.cache
checking for a BSD compatible install... ../../gcc-2.95.3/etc/../install-sh -c
creating ./config.status
creating Makefile
--- Ende Code ---
Schritt 2 und 3 lager ich in den/die nächsten Beitrag/Beiträge aus, da mich die Forensoftware höflich über eine Begrenzung informiert hat: "Beitrag hat die max. Länge erreicht (20000 Zeichen)." Wenn das so ist...
escimo:
Schritt 2: das Komilieren mit make (gekürzt ;))
--- Code: ---# make LANGUAGES="c"
make[1]: Entering directory `/opt/temp/gcc-sun4/libiberty'
if [ x"no" = xyes ] && [ ! -d pic ]; then \
mkdir pic; \
else true; fi
touch stamp-picdir
test x"no" != xyes || \
/usr/local/bin/gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../gcc-2.95.3/libiberty/../include ../../gcc-2.95.3/libiberty/argv.c -o pic/argv.o
/usr/local/bin/gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../gcc-2.95.3/libiberty/../include ../../gcc-2.95.3/libiberty/argv.c
test x"no" != xyes || \
/usr/local/bin/gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../gcc-2.95.3/libiberty/../include ../../gcc-2.95.3/libiberty/choose-temp.c -o pic/choose-temp.o
/usr/local/bin/gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../gcc-2.95.3/libiberty/../include ../../gcc-2.95.3/libiberty/choose-temp.c
test x"no" != xyes || \
/usr/local/bin/gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../gcc-2.95.3/libiberty/../include ../../gcc-2.95.3/libiberty/concat.c -o pic/concat.o
/usr/local/bin/gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../gcc-2.95.3/libiberty/../include ../../gcc-2.95.3/libiberty/concat.c
test x"no" != xyes || \
/usr/local/bin/gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../gcc-2.95.3/libiberty/../include ../../gcc-2.95.3/libiberty/cplus-dem.c -o pic/cplus-dem.o
/usr/local/bin/gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../gcc-2.95.3/libiberty/../include ../../gcc-2.95.3/libiberty/cplus-dem.c
test x"no" != xyes || \
/usr/local/bin/gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../gcc-2.95.3/libiberty/../include ../../gcc-2.95.3/libiberty/fdmatch.c -o pic/fdmatch.o
/usr/local/bin/gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../gcc-2.95.3/libiberty/../include ../../gcc-2.95.3/libiberty/fdmatch.c
test x"no" != xyes || \
/usr/local/bin/gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../gcc-2.95.3/libiberty/../include ../../gcc-2.95.3/libiberty/fnmatch.c -o pic/fnmatch.o
/usr/local/bin/gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../gcc-2.95.3/libiberty/../include ../../gcc-2.95.3/libiberty/fnmatch.c
test x"no" != xyes || \
/usr/local/bin/gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../gcc-2.95.3/libiberty/../include ../../gcc-2.95.3/libiberty/getopt.c -o pic/getopt.o
/usr/local/bin/gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../gcc-2.95.3/libiberty/../include ../../gcc-2.95.3/libiberty/getopt.c
test x"no" != xyes || \
/usr/local/bin/gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../gcc-2.95.3/libiberty/../include ../../gcc-2.95.3/libiberty/getopt1.c -o pic/getopt1.o
/usr/local/bin/gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../gcc-2.95.3/libiberty/../include ../../gcc-2.95.3/libiberty/getopt1.c
test x"no" != xyes || \
/usr/local/bin/gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../gcc-2.95.3/libiberty/../include ../../gcc-2.95.3/libiberty/getruntime.c -o pic/getruntime.o
/usr/local/bin/gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../gcc-2.95.3/libiberty/../include ../../gcc-2.95.3/libiberty/getruntime.c
test x"no" != xyes || \
/usr/local/bin/gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../gcc-2.95.3/libiberty/../include ../../gcc-2.95.3/libiberty/hex.c -o pic/hex.o
/usr/local/bin/gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../gcc-2.95.3/libiberty/../include ../../gcc-2.95.3/libiberty/hex.c
test x"no" != xyes || \
/usr/local/bin/gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../gcc-2.95.3/libiberty/../include ../../gcc-2.95.3/libiberty/floatformat.c -o pic/floatformat.o
/usr/local/bin/gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../gcc-2.95.3/libiberty/../include ../../gcc-2.95.3/libiberty/floatformat.c
test x"no" != xyes || \
/usr/local/bin/gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../gcc-2.95.3/libiberty/../include ../../gcc-2.95.3/libiberty/objalloc.c -o pic/objalloc.o
/usr/local/bin/gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../gcc-2.95.3/libiberty/../include ../../gcc-2.95.3/libiberty/objalloc.c
test x"no" != xyes || \
/usr/local/bin/gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../gcc-2.95.3/libiberty/../include ../../gcc-2.95.3/libiberty/obstack.c -o pic/obstack.o
/usr/local/bin/gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../gcc-2.95.3/libiberty/../include ../../gcc-2.95.3/libiberty/obstack.c
test x"no" != xyes || \
/usr/local/bin/gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../gcc-2.95.3/libiberty/../include ../../gcc-2.95.3/libiberty/pexecute.c -o pic/pexecute.o
/usr/local/bin/gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../gcc-2.95.3/libiberty/../include ../../gcc-2.95.3/libiberty/pexecute.c
test x"no" != xyes || \
/usr/local/bin/gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../gcc-2.95.3/libiberty/../include ../../gcc-2.95.3/libiberty/spaces.c -o pic/spaces.o
/usr/local/bin/gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../gcc-2.95.3/libiberty/../include ../../gcc-2.95.3/libiberty/spaces.c
test x"no" != xyes || \
/usr/local/bin/gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../gcc-2.95.3/libiberty/../include ../../gcc-2.95.3/libiberty/splay-tree.c -o pic/splay-tree.o
/usr/local/bin/gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../gcc-2.95.3/libiberty/../include ../../gcc-2.95.3/libiberty/splay-tree.c
test x"no" != xyes || \
/usr/local/bin/gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../gcc-2.95.3/libiberty/../include ../../gcc-2.95.3/libiberty/strerror.c -o pic/strerror.o
/usr/local/bin/gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../gcc-2.95.3/libiberty/../include ../../gcc-2.95.3/libiberty/strerror.c
test x"no" != xyes || \
/usr/local/bin/gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../gcc-2.95.3/libiberty/../include ../../gcc-2.95.3/libiberty/strsignal.c -o pic/strsignal.o
/usr/local/bin/gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../gcc-2.95.3/libiberty/../include ../../gcc-2.95.3/libiberty/strsignal.c
test x"no" != xyes || \
/usr/local/bin/gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../gcc-2.95.3/libiberty/../include ../../gcc-2.95.3/libiberty/xatexit.c -o pic/xatexit.o
/usr/local/bin/gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../gcc-2.95.3/libiberty/../include ../../gcc-2.95.3/libiberty/xatexit.c
test x"no" != xyes || \
/usr/local/bin/gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../gcc-2.95.3/libiberty/../include ../../gcc-2.95.3/libiberty/xexit.c -o pic/xexit.o
/usr/local/bin/gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../gcc-2.95.3/libiberty/../include ../../gcc-2.95.3/libiberty/xexit.c
test x"no" != xyes || \
/usr/local/bin/gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../gcc-2.95.3/libiberty/../include ../../gcc-2.95.3/libiberty/xmalloc.c -o pic/xmalloc.o
/usr/local/bin/gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../gcc-2.95.3/libiberty/../include ../../gcc-2.95.3/libiberty/xmalloc.c
test x"no" != xyes || \
/usr/local/bin/gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../gcc-2.95.3/libiberty/../include ../../gcc-2.95.3/libiberty/xstrdup.c -o pic/xstrdup.o
/usr/local/bin/gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../gcc-2.95.3/libiberty/../include ../../gcc-2.95.3/libiberty/xstrdup.c
test x"no" != xyes || \
/usr/local/bin/gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../gcc-2.95.3/libiberty/../include ../../gcc-2.95.3/libiberty/xstrerror.c -o pic/xstrerror.o
/usr/local/bin/gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../gcc-2.95.3/libiberty/../include ../../gcc-2.95.3/libiberty/xstrerror.c
test x"no" != xyes || \
/usr/local/bin/gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../gcc-2.95.3/libiberty/../include ../../gcc-2.95.3/libiberty/asprintf.c -o pic/asprintf.o
/usr/local/bin/gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../gcc-2.95.3/libiberty/../include ../../gcc-2.95.3/libiberty/asprintf.c
test x"no" != xyes || \
/usr/local/bin/gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../gcc-2.95.3/libiberty/../include ../../gcc-2.95.3/libiberty/basename.c -o pic/basename.o
/usr/local/bin/gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../gcc-2.95.3/libiberty/../include ../../gcc-2.95.3/libiberty/basename.c
test x"no" != xyes || \
/usr/local/bin/gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../gcc-2.95.3/libiberty/../include ../../gcc-2.95.3/libiberty/mkstemps.c -o pic/mkstemps.o
/usr/local/bin/gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../gcc-2.95.3/libiberty/../include ../../gcc-2.95.3/libiberty/mkstemps.c
test x"no" != xyes || \
/usr/local/bin/gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../gcc-2.95.3/libiberty/../include ../../gcc-2.95.3/libiberty/setenv.c -o pic/setenv.o
/usr/local/bin/gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../gcc-2.95.3/libiberty/../include ../../gcc-2.95.3/libiberty/setenv.c
test x"no" != xyes || \
/usr/local/bin/gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../gcc-2.95.3/libiberty/../include ../../gcc-2.95.3/libiberty/sigsetmask.c -o pic/sigsetmask.o
/usr/local/bin/gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../gcc-2.95.3/libiberty/../include ../../gcc-2.95.3/libiberty/sigsetmask.c
test x"no" != xyes || \
/usr/local/bin/gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../gcc-2.95.3/libiberty/../include ../../gcc-2.95.3/libiberty/vasprintf.c -o pic/vasprintf.o
/usr/local/bin/gcc -c -DHAVE_CONFIG_H -g -O2 -I. -I../../gcc-2.95.3/libiberty/../include ../../gcc-2.95.3/libiberty/vasprintf.c
rm -f libiberty.a
ar rc libiberty.a \
argv.o choose-temp.o concat.o cplus-dem.o fdmatch.o fnmatch.o getopt.o getopt1.o getruntime.o hex.o floatformat.o objalloc.o obstack.o pexecute.o spaces.o splay-tree.o strerror.o strsignal.o xatexit.o xexit.o xmalloc.o xstrdup.o xstrerror.o asprintf.o basename.o mkstemps.o setenv.o sigsetmask.o vasprintf.o
true libiberty.a
...
...
...
make[1]: Leaving directory `/opt/temp/gcc-sun4/gcc'
Configuring in sparc-sun-solaris2.5.1/libio
Configuring in sparc-sun-solaris2.5.1/libiberty
creating cache ./config.cache
checking host system type... sparc-sun-solaris2.5.1
checking build system type... sparc-sun-solaris2.5.1
checking for ar... ar
checking for ranlib... true
checking for gcc... /opt/temp/gcc-sun4/gcc/xgcc -B/opt/temp/gcc-sun4/gcc/ -B/opt/gnu/sparc-sun-solaris2.5.1/bin/
checking whether we are using GNU C... yes
checking whether /opt/temp/gcc-sun4/gcc/xgcc -B/opt/temp/gcc-sun4/gcc/ -B/opt/gnu/sparc-sun-solaris2.5.1/bin/ accepts -g... yes
checking for POSIXized ISC... no
checking for a BSD compatible install... ../../../gcc-2.95.3/libiberty/../install-sh -c
checking how to run the C preprocessor... /opt/temp/gcc-sun4/gcc/xgcc -B/opt/temp/gcc-sun4/gcc/ -B/opt/gnu/sparc-sun-solaris2.5.1/bin/ -E
checking for sys/file.h... yes
checking for sys/param.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for unistd.h... yes
checking for strings.h... yes
checking for sys/time.h... yes
checking for sys/resource.h... yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking whether the C compiler (/opt/temp/gcc-sun4/gcc/xgcc -B/opt/temp/gcc-sun4/gcc/ -B/opt/gnu/sparc-sun-solaris2.5.1/bin/ -g -O2 ) works... yes
checking whether the C compiler (/opt/temp/gcc-sun4/gcc/xgcc -B/opt/temp/gcc-sun4/gcc/ -B/opt/gnu/sparc-sun-solaris2.5.1/bin/ -g -O2 ) is a cross-compiler... no
checking for asprintf... no
checking for atexit... yes
checking for basename... no
checking for bcmp... yes
checking for bcopy... yes
checking for bzero... yes
checking for calloc... yes
checking for clock... yes
checking for getcwd... yes
checking for getpagesize... yes
checking for index... yes
checking for insque... yes
checking for memchr... yes
checking for memcmp... yes
checking for memcpy... yes
checking for memmove... yes
checking for memset... yes
checking for mkstemps... no
checking for putenv... yes
checking for random... yes
checking for rename... yes
checking for rindex... yes
checking for setenv... no
checking for sigsetmask... no
checking for strcasecmp... yes
checking for strchr... yes
checking for strdup... yes
checking for strncasecmp... yes
checking for strrchr... yes
checking for strstr... yes
checking for strtod... yes
checking for strtol... yes
checking for strtoul... yes
checking for tmpnam... yes
checking for vasprintf... no
checking for vfprintf... yes
checking for vprintf... yes
checking for vsprintf... yes
checking for waitpid... yes
checking for working alloca.h... yes
checking for alloca... yes
checking for ANSI C header files... yes
checking for pid_t... yes
checking for vfork.h... no
checking for working vfork... yes
checking for sys_errlist... yes
checking for sys_nerr... yes
checking for sys_siglist... no
checking for getrusage... yes
checking for on_exit... no
checking for psignal... yes
checking for strerror... yes
checking for strsignal... yes
checking for sysconf... yes
checking for times... yes
checking for sbrk... yes
checking for gettimeofday... yes
updating cache ./config.cache
creating ./config.status
creating Makefile
creating testsuite/Makefile
creating config.h
Adding multilib support to Makefile in ../../../gcc-2.95.3/libiberty
multidirs=
with_multisubdir=
make[1]: Entering directory `/opt/temp/gcc-sun4/sparc-sun-solaris2.5.1/libiberty'
...
...
...
rm -f libiberty.a
ar rc libiberty.a \
argv.o choose-temp.o concat.o cplus-dem.o fdmatch.o fnmatch.o getopt.o getopt1.o getruntime.o hex.o floatformat.o objalloc.o obstack.o pexecute.o spaces.o splay-tree.o strerror.o strsignal.o xatexit.o xexit.o xmalloc.o xstrdup.o xstrerror.o asprintf.o basename.o mkstemps.o setenv.o sigsetmask.o vasprintf.o
true libiberty.a
rm -f needed-list; touch needed-list; \
for f in atexit calloc memchr memcmp memcpy memmove memset rename strchr strerror strrchr strstr strtol strtoul tmpnam vfprintf vprintf vfork waitpid bcmp bcopy bzero; do \
for g in asprintf.o basename.o mkstemps.o setenv.o sigsetmask.o vasprintf.o ; do \
case "$g" in \
*$f*) echo $g >> needed-list ;; \
esac; \
done; \
done
echo argv.o choose-temp.o concat.o cplus-dem.o fdmatch.o fnmatch.o getopt.o getopt1.o getruntime.o hex.o floatformat.o objalloc.o obstack.o pexecute.o spaces.o splay-tree.o strerror.o strsignal.o xatexit.o xexit.o xmalloc.o xstrdup.o xstrerror.o > required-list
make[2]: Entering directory `/opt/temp/gcc-sun4/sparc-sun-solaris2.5.1/libiberty/testsuite'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/opt/temp/gcc-sun4/sparc-sun-solaris2.5.1/libiberty/testsuite'
make[2]: Entering directory `/opt/temp/gcc-sun4/sparc-sun-solaris2.5.1/libiberty'
if [ -z "" ]; then \
true; \
else \
rootpre=`pwd`/; export rootpre; \
srcrootpre=`cd ../../../gcc-2.95.3/libiberty; pwd`/; export srcrootpre; \
lib=`echo ${rootpre} | sed -e 's,^.*/\([^/][^/]*\)/$,\1,'`; \
compiler="/opt/temp/gcc-sun4/gcc/xgcc -B/opt/temp/gcc-sun4/gcc/ -B/opt/gnu/sparc-sun-solaris2.5.1/bin/"; \
for i in `${compiler} --print-multi-lib 2>/dev/null`; do \
dir=`echo $i | sed -e 's/;.*$//'`; \
if [ "${dir}" = "." ]; then \
true; \
else \
if [ -d ../${dir}/${lib} ]; then \
flags=`echo $i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; \
if (cd ../${dir}/${lib}; make "AR=ar" "AR_FLAGS=rc" "CC=/opt/temp/gcc-sun4/gcc/xgcc -B/opt/temp/gcc-sun4/gcc/ -B/opt/gnu/sparc-sun-solaris2.5.1/bin/" "CFLAGS=-g -O2" "LIBCFLAGS=-g -O2" "EXTRA_OFILES=" "HDEFINES=" "INSTALL=/bin/sh /opt/temp/gcc-2.95.3/install-sh -c" "INSTALL_DATA=/bin/sh /opt/temp/gcc-2.95.3/install-sh -c -m 644" "INSTALL_PROGRAM=/bin/sh /opt/temp/gcc-2.95.3/install-sh -c " "LDFLAGS=" "LOADLIBES=" "RANLIB=true" "SHELL=/bin/sh" "prefix=/opt/gnu" "exec_prefix=/opt/gnu" "libdir=/opt/gnu/lib" "libsubdir=/opt/gnu/lib/gcc-lib/sparc-sun-solaris2.5.1/2.95.3" "tooldir=/opt/gnu/sparc-sun-solaris2.5.1" \
CFLAGS="-g -O2 ${flags}" \
CXXFLAGS="-g -O2 ${flags}" \
LIBCFLAGS="-g -O2 ${flags}" \
LIBCXXFLAGS="-g -O2 -fno-implicit-templates ${flags}" \
LDFLAGS=" ${flags}" \
all); then \
true; \
else \
exit 1; \
fi; \
else true; \
fi; \
fi; \
done; \
fi
make[2]: Leaving directory `/opt/temp/gcc-sun4/sparc-sun-solaris2.5.1/libiberty'
make[1]: Leaving directory `/opt/temp/gcc-sun4/sparc-sun-solaris2.5.1/libiberty'
Configuring in sparc-sun-solaris2.5.1/libstdc++
Configuring in sparc-sun-solaris2.5.1/libf2c
creating cache ./config.cache
checking if compiler f771 has been built... no
Configuring in sparc-sun-solaris2.5.1/libchill
creating cache ./config.cache
checking if compiler cc1chill has been built... no
Configuring in sparc-sun-solaris2.5.1/libobjc
creating cache ./config.cache
checking if compiler cc1obj has been built... no
--- Ende Code ---
mmhhh ... 1 Stunde und 10 Minuten später ... das sieht ganz gut aus.
Schritt 3: die Installation des Kompilats
--- Code: --- # make install
/bin/sh ../gcc-2.95.3/mkinstalldirs /opt/gnu /opt/gnu
make[1]: Entering directory `/opt/temp/gcc-sun4/gcc'
(cd intl && make all)
make[2]: Entering directory `/opt/temp/gcc-sun4/gcc/intl'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/opt/temp/gcc-sun4/gcc/intl'
cd ch; make "AR_FLAGS_FOR_TARGET=rc" "AR_FOR_TARGET=ar" "BISON=bison" "BISONFLAGS=" "CFLAGS=-g -O2" "CLIB=" "GCC_FOR_TARGET=/opt/temp/gcc-sun4/gcc/xgcc -B/opt/temp/gcc-sun4/gcc/ -B/opt/gnu/sparc-sun-solaris2.5.1/bin/ -I/opt/gnu/sparc-sun-solaris2.5.1/include" "LDFLAGS=" "LEX=lex" "LEXFLAGS=" "LN=ln" "LN_S=ln -s" "MAKEINFO=/opt/temp/gcc-sun4/texinfo/makeinfo/makeinfo " "MAKEINFOFLAGS=" "RANLIB_FOR_TARGET=true" "RANLIB_TEST_FOR_TARGET=[ -f true ] || ( [ "sparc-sun-solaris2.5.1" = "sparc-sun-solaris2.5.1" ] && [ -f /usr/bin/ranlib -o -f /bin/ranlib ] )" "SHELL=/bin/sh" "STAGE_PREFIX=" "exeext=" "build_exeext=" "objext=.o" "exec_prefix=/opt/gnu" "prefix=/opt/gnu" "local_prefix=/opt/gnu" "gxx_include_dir=/opt/gnu/lib/gcc-lib/sparc-sun-solaris2.5.1/2.95.3/../../../..`echo /opt/gnu | sed -e 's|^/opt/gnu||' -e 's|/[^/]*|/..|g'`/include/g++-3" "tooldir=/opt/gnu/sparc-sun-solaris2.5.1" "gcc_tooldir=/opt/gnu/lib/gcc-lib/sparc-sun-solaris2.5.1/2.95.3/../../../../sparc-sun-solaris2.5.1" "bindir=/opt/gnu/bin" "libsubdir=/opt/gnu/lib/gcc-lib/sparc-sun-solaris2.5.1/2.95.3" "datadir=/opt/gnu/share" "distdir=../tmp/\$(subdir)" "localedir=/opt/gnu/share/locale" "CC=/usr/local/bin/gcc" "CHILLFLAGS=-g -O2" "CHILL_FOR_TARGET=/opt/temp/gcc-sun4/gcc/xgcc -B/opt/temp/gcc-sun4/gcc/ -B/opt/gnu/sparc-sun-solaris2.5.1/bin/ -L/opt/temp/gcc-sun4/gcc/ch/runtime/" "CHILL_LIB=-lchill" "GNUCHILL_VERSION=1.5.2" ../cc1chill
make[2]: Entering directory `/opt/temp/gcc-sun4/gcc/ch'
/usr/local/bin/gcc -c -DIN_GCC -DSVR4 -g -O2 -I. -I.. -I../../../gcc-2.95.3/gcc/ch -I../../../gcc-2.95.3/gcc/ch/.. -I../../../gcc-2.95.3/gcc/ch/../config -I../../../gcc-2.95.3/gcc/ch/../../include ../../../gcc-2.95.3/gcc/ch/decl.c
make[2]: Leaving directory `/opt/temp/gcc-sun4/gcc/ch'
make[1]: Leaving directory `/opt/temp/gcc-sun4/gcc'
# ls /opt/gnu
#
--- Ende Code ---
... Chill? Wieso? Davon habe ich nichts für die Übersetztung (LANGUAGES="c") ausgewählt ...
Kann mir jemand mal einen Tipp geben, was ich hier falsch gemacht habe?
Jedenfalls möchte ich einzig den C Compiler (evtl. noch C++ Compiler) übersetzen. Die restlichen Compiler sind mir "Wurst". ;)
Viele Grüße
Stephan
escimo:
Habe gestern den ganzen Vorgang nocheinmal wiederholt, nachdem ich mich bei Linux From Scratch nochmal kundig gemacht habe. Da ist mir mein Fehler doch glatt ins Auge gefallen: ::)
--- Zitat ---# ../gcc-2.95.3/configure --prefix=/opt/gnu --with-local-prefix=/opt/gnu
--- Ende Zitat ---
# rm -Rf /opt/temp/gcc-sun4/*
# cd /opt/temp/gcc-sun4
# ../gcc-2.95.3/configure --prefix=/opt/gnu --enable-shared --enable-languages=c --enable-threads=solaris
...
# make bootstrap LANGUAGES="c"
...
# make install
...
# ls /opt/gnu
bin include info lib man sun-sparc-solaris2.5.1Und obwohl die Option "--enable-languages=c" notiert ist, habe ich sie erstmal ignoriert, weil ich von der INSTALL-Datei "vernebelt" gewesen bin. :-\
Beim make habe ich noch "bootstrap" hinzugefügt, da...
--- Zitat ---If you do not have to install any additional GNU tools, you may use the command
make bootstrap LANGUAGES=language-list BOOT_CFLAGS=option-list
instead of making `stage1', `stage2', and performing the two compiler builds.
--- Ende Zitat ---
Der übernächste Schritt ist nun die Erstellung eines Paketes, was aufgrund der Dokumentationen auch nicht weiter schwer fallen sollte.
"Übernächst"? Wieso? - Ganz einfach. Ich muss den Compiler noch auf Funktionsfähigkeit testen. Am besten an einem anderen kleinen C-Programm.
Gruß
Stephan
escimo:
Die "Tests" sind vorerst abgeschlossen. ;D - Immehin konnte ich mich durchringen wenigstens ein kleines C-Programm einzutippen und zu übersetzen:
--- Code: ---sypho% sh
$ cd $HOME/source
$ PATH=/opt/gnu/bin:.:$PATH; export PATH
$ LD_LIBRARY_PATH=/opt/gnu/lib:/usr/lib:.:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH
$ gcc -S hello.c
$ gcc -o hello hello.c
--- Ende Code ---
Programm 1 als C-Source:
--- Code: (c) ---#include <stdio.h>
int main()
{
printf("hello sypho !\n");
return 0;
}
--- Ende Code ---
Programm 1 als Assembler-Source:
--- Code: (asm) --- .file "hello.c"
gcc2_compiled.:
.section ".rodata"
.align 8
.LLC0:
.asciz "hello sypho !\n"
.section ".text"
.align 4
.global main
.type main,#function
.proc 04
main:
!#PROLOGUE# 0
save %sp, -112, %sp
!#PROLOGUE# 1
sethi %hi(.LLC0), %o1
or %o1, %lo(.LLC0), %o0
call printf, 0
nop
mov 0, %i0
b .LL2
nop
.LL2:
ret
restore
.LLfe1:
.size main,.LLfe1-main
.ident "GCC: (GNU) 2.95.3 20010315 (release)"
--- Ende Code ---
Programm 1 Output:
--- Code: ---sypho% pwd
/home/schaarst/source
sypho% hello
hello sypho !
sypho%
--- Ende Code ---
Demnächst noch was zum Erstellen eines System-V Paketes für den C-Compiler, wie SunOS 5.x sie standardmäßig verwendet...***gähn*** :-[
Gruß
escimo
Navigation
[0] Themen-Index
[#] Nächste Seite
[*] Vorherige Sete
Zur normalen Ansicht wechseln