Before installing the system, which includes installing
gcc
, you might want to do some minimum checking
to ensure that some basic things work.
Here are some commands you can try, and output typically printed by them when they work:
sh# cd /usr/src/gcc sh# ./g77 --driver=./xgcc -B./ -v g77 version 0.5.21 ./xgcc -B./ -v -fnull-version -o /tmp/gfa18047 ... Reading specs from ./specs gcc version 2.7.2.3.f.1 ./cpp -lang-c -v -isystem ./include -undef ... GNU CPP version 2.7.2.3.f.1 (Linux/Alpha) #include "..." search starts here: #include <...> search starts here: ./include /usr/local/include /usr/alpha-unknown-linux/include /usr/lib/gcc-lib/alpha-unknown-linux/2.7.2.3.f.1/include /usr/include End of search list. ./f771 /tmp/cca18048.i -fset-g77-defaults -quiet -dumpbase ... GNU F77 version 2.7.2.3.f.1 (Linux/Alpha) compiled ... GNU Fortran Front End version 0.5.21 compiled: ... as -nocpp -o /tmp/cca180481.o /tmp/cca18048.s ld -G 8 -O1 -o /tmp/gfa18047 /usr/lib/crt0.o -L. ... __G77_LIBF77_VERSION__: 0.5.21 @(#)LIBF77 VERSION 19970404 __G77_LIBI77_VERSION__: 0.5.21 @(#) LIBI77 VERSION pjw,dmg-mods 19970816 __G77_LIBU77_VERSION__: 0.5.21 @(#) LIBU77 VERSION 19970609 sh# ./xgcc -B./ -v -o /tmp/delete-me -xc /dev/null -xnone Reading specs from ./specs gcc version 2.7.2.3.f.1 ./cpp -lang-c -v -isystem ./include -undef ... GNU CPP version 2.7.2.3.f.1 (Linux/Alpha) #include "..." search starts here: #include <...> search starts here: ./include /usr/local/include /usr/alpha-unknown-linux/include /usr/lib/gcc-lib/alpha-unknown-linux/2.7.2.3.f.1/include /usr/include End of search list. ./cc1 /tmp/cca18063.i -quiet -dumpbase null.c -version ... GNU C version 2.7.2.3.f.1 (Linux/Alpha) compiled ... as -nocpp -o /tmp/cca180631.o /tmp/cca18063.s ld -G 8 -O1 -o /tmp/delete-me /usr/lib/crt0.o -L. ... /usr/lib/crt0.o: In function `__start': crt0.S:110: undefined reference to `main' /usr/lib/crt0.o(.lita+0x28): undefined reference to `main' sh#
(Note that long lines have been truncated, and `...' used to indicate such truncations.)
The above two commands test whether g77
and gcc
,
respectively, are able to compile empty (null) source files,
whether invocation of the C preprocessor works, whether libraries
can be linked, and so on.
If the output you get from either of the above two commands
is noticeably different, especially if it is shorter or longer
in ways that do not look consistent with the above sample
output, you probably should not install gcc
and g77
until you have investigated further.
For example, you could try compiling actual applications and seeing how that works. (You might want to do that anyway, even if the above tests work.)
To compile using the not-yet-installed versions of gcc
and g77
, use the following commands to invoke them.
To invoke g77
, type:
/usr/src/gcc/g77 --driver=/usr/src/gcc/xgcc -B/usr/src/gcc/ ...
To invoke gcc
, type:
/usr/src/gcc/xgcc -B/usr/src/gcc/ ...
Go to the first, previous, next, last section, table of contents.