/bin/sh ../../../gcc/libgfortran/mk-kinds-h.sh '/test/gnu/gcc-4.1/objdir/./gcc/g fortran -B/test/gnu/gcc-4.1/objdir/./gcc/ -B/opt/gnu64/gcc/gcc-4.1.0/hppa64-hp-h pux11.11/bin/ -B/opt/gnu64/gcc/gcc-4.1.0/hppa64-hp-hpux11.11/lib/ -isystem /opt/ gnu64/gcc/gcc-4.1.0/hppa64-hp-hpux11.11/include -isystem /opt/gnu64/gcc/gcc-4.1. 0/hppa64-hp-hpux11.11/sys-include -I . -Wall -fno-repack-arrays -fno-underscorin g ' > kinds.h || rm kinds.h ../../../gcc/libgfortran/mk-kinds-h.sh: Unknown type grep '^#' < kinds.h > kinds.inc /bin/sh: kinds.h: Cannot find or open the file. make[3]: *** [kinds.inc] Error 1 make[3]: Leaving directory `/test/gnu/gcc-4.1/objdir/hppa64-hp-hpux11.11/libgfor tran' # /test/gnu/gcc-4.1/objdir/./gcc/g fortran -B/test/gnu/gcc-4.1/objdir/./gcc/ -B/opt/gnu64/gcc/gcc-4.1.0/hppa64-hp-h pux11.11/bin/ -B/opt/gnu64/gcc/gcc-4.1.0/hppa64-hp-hpux11.11/lib/ -isystem /opt/ gnu64/gcc/gcc-4.1.0/hppa64-hp-hpux11.11/include -isystem /opt/gnu64/gcc/gcc-4.1. 0/hppa64-hp-hpux11.11/sys-include -I . -Wall -fno-repack-arrays -fno-underscorin g /opt/gnu64/gcc/gcc-4.1.0/lib/gcc/hppa64-hp-hpux11.11/4.1.0/../../../libgfortranbegin.a(fmain.o): In function `main': undefined reference to `MAIN__' collect2: ld returned 1 exit status Adding -Wl,-debug: Convert string '/test/gnu/gcc-4.1/objdir/./gcc/hppa64-hp-hpux11.11/4.1.0/:/test/gnu/gcc-4.1/objdir/./gcc/:/opt/gnu64/gcc/gcc-4.1.0/hppa64-hp-hpux11.11/bin/hppa64-hp-hpux11.11/4.1.0/:/opt/gnu64/gcc/gcc-4.1.0/hppa64-hp-hpux11.11/bin/:/opt/gnu64/gcc/gcc-4.1.0/hppa64-hp-hpux11.11/lib/hppa64-hp-hpux11.11/4.1.0/:/opt/gnu64/gcc/gcc-4.1.0/hppa64-hp-hpux11.11/lib/:/test/gnu/gcc-4.1/objdir/gcc/../libexec/gcc/hppa64-hp-hpux11.11/4.1.0/:/test/gnu/gcc-4.1/objdir/gcc/../libexec/gcc/:/opt/gnu64/gcc/gcc-4.1.0/libexec/gcc/hppa64-hp-hpux11.11/4.1.0/:/opt/gnu64/gcc/gcc-4.1.0/libexec/gcc/hppa64-hp-hpux11.11/4.1.0/:/opt/gnu64/gcc/gcc-4.1.0/libexec/gcc/hppa64-hp-hpux11.11/:/opt/gnu64/gcc/gcc-4.1.0/lib/gcc/hppa64-hp-hpux11.11/4.1.0/:/opt/gnu64/gcc/gcc-4.1.0/lib/gcc/hppa64-hp-hpux11.11/:/usr/libexec/gcc/hppa64-hp-hpux11.11/4.1.0/:/usr/libexec/gcc/hppa64-hp-hpux11.11/:/usr/lib/gcc/hppa64-hp-hpux11.11/4.1.0/:/usr/lib/gcc/hppa64-hp-hpux11.11/:/test/gnu/gcc-4.1/objdir/gcc/../lib/gcc/hppa64-hp-hpux11.11/4.1.0/../../../../hppa64-hp-hpux11.11/bin/hppa64-hp-hpux11.11/4.1.0/:/test/gnu/gcc-4.1/objdir/gcc/../lib/gcc/hppa64-hp-hpux11.11/4.1.0/../../../../hppa64-hp-hpux11.11/bin/:/opt/gnu64/gcc/gcc-4.1.0/lib/gcc/hppa64-hp-hpux11.11/4.1.0/../../../../hppa64-hp-hpux11.11/bin/hppa64-hp-hpux11.11/4.1.0/:/opt/gnu64/gcc/gcc-4.1.0/lib/gcc/hppa64-hp-hpux11.11/4.1.0/../../../../hppa64-hp-hpux11.11/bin/:/usr/ccs/binhppa64-hp-hpux11.11/4.1.0/:/usr/ccs/bin' into prefixes, separator = ':' - add prefix: /test/gnu/gcc-4.1/objdir/./gcc/hppa64-hp-hpux11.11/4.1.0/ - add prefix: /test/gnu/gcc-4.1/objdir/./gcc/ - add prefix: /opt/gnu64/gcc/gcc-4.1.0/hppa64-hp-hpux11.11/bin/hppa64-hp-hpux11.11/4.1.0/ - add prefix: /opt/gnu64/gcc/gcc-4.1.0/hppa64-hp-hpux11.11/bin/ - add prefix: /opt/gnu64/gcc/gcc-4.1.0/hppa64-hp-hpux11.11/lib/hppa64-hp-hpux11.11/4.1.0/ - add prefix: /opt/gnu64/gcc/gcc-4.1.0/hppa64-hp-hpux11.11/lib/ - add prefix: /test/gnu/gcc-4.1/objdir/gcc/../libexec/gcc/hppa64-hp-hpux11.11/4.1.0/ - add prefix: /test/gnu/gcc-4.1/objdir/gcc/../libexec/gcc/ - add prefix: /opt/gnu64/gcc/gcc-4.1.0/libexec/gcc/hppa64-hp-hpux11.11/4.1.0/ - add prefix: /opt/gnu64/gcc/gcc-4.1.0/libexec/gcc/hppa64-hp-hpux11.11/4.1.0/ - add prefix: /opt/gnu64/gcc/gcc-4.1.0/libexec/gcc/hppa64-hp-hpux11.11/ - add prefix: /opt/gnu64/gcc/gcc-4.1.0/lib/gcc/hppa64-hp-hpux11.11/4.1.0/ - add prefix: /opt/gnu64/gcc/gcc-4.1.0/lib/gcc/hppa64-hp-hpux11.11/ - add prefix: /usr/libexec/gcc/hppa64-hp-hpux11.11/4.1.0/ - add prefix: /usr/libexec/gcc/hppa64-hp-hpux11.11/ - add prefix: /usr/lib/gcc/hppa64-hp-hpux11.11/4.1.0/ - add prefix: /usr/lib/gcc/hppa64-hp-hpux11.11/ - add prefix: /test/gnu/gcc-4.1/objdir/gcc/../lib/gcc/hppa64-hp-hpux11.11/4.1.0/../../../../hppa64-hp-hpux11.11/bin/hppa64-hp-hpux11.11/4.1.0/ - add prefix: /test/gnu/gcc-4.1/objdir/gcc/../lib/gcc/hppa64-hp-hpux11.11/4.1.0/../../../../hppa64-hp-hpux11.11/bin/ - add prefix: /opt/gnu64/gcc/gcc-4.1.0/lib/gcc/hppa64-hp-hpux11.11/4.1.0/../../../../hppa64-hp-hpux11.11/bin/hppa64-hp-hpux11.11/4.1.0/ - add prefix: /opt/gnu64/gcc/gcc-4.1.0/lib/gcc/hppa64-hp-hpux11.11/4.1.0/../../../../hppa64-hp-hpux11.11/bin/ - add prefix: /usr/ccs/binhppa64-hp-hpux11.11/4.1.0/ - add prefix: /usr/ccs/bin/ Convert string '/opt/gnu64/bin:/opt/gnu/bin:/opt/perl5/bin:/usr/bin:/usr/sbin:/sbin' into prefixes, separator = ':' - add prefix: /opt/gnu64/bin/ - add prefix: /opt/gnu/bin/ - add prefix: /opt/perl5/bin/ - add prefix: /usr/bin/ - add prefix: /usr/sbin/ - add prefix: /sbin/ Looking for 'gnm' Looking for 'gnm' Looking for 'nm' Looking for 'gstrip' Looking for 'gstrip' Looking for 'strip' Looking for '/test/gnu/gcc-4.1/objdir/./gcc/gfortran' - found: absolute path collect2 version 4.1.0 (hppa) ld_file_name = /opt/gnu64/bin/ld c_file_name = /test/gnu/gcc-4.1/objdir/./gcc/gfortran nm_file_name = /test/gnu/gcc-4.1/objdir/./gcc/nm strip_file_name = /usr/ccs/bin/strip c_file = /var/tmp//ccNsq2qg.c o_file = /var/tmp//ccqLqEDm.o COLLECT_GCC_OPTIONS = '-B/test/gnu/gcc-4.1/objdir/./gcc/' '-B/opt/gnu64/gcc/gcc-4.1.0/hppa64-hp-hpux11.11/bin/' '-B/opt/gnu64/gcc/gcc-4.1.0/hppa64-hp-hpux11.11/lib/' '-isystem' '/opt/gnu64/gcc/gcc-4.1.0/hppa64-hp-hpux11.11/include' '-isystem' '/opt/gnu64/gcc/gcc-4.1.0/hppa64-hp-hpux11.11/sys-include' '-I' '.' '-Wall' '-fno-repack-arrays' '-fno-underscoring' '-shared-libgcc' COLLECT_GCC = /test/gnu/gcc-4.1/objdir/./gcc/gfortran COMPILER_PATH = /test/gnu/gcc-4.1/objdir/./gcc/hppa64-hp-hpux11.11/4.1.0/:/test/gnu/gcc-4.1/objdir/./gcc/:/opt/gnu64/gcc/gcc-4.1.0/hppa64-hp-hpux11.11/bin/hppa64-hp-hpux11.11/4.1.0/:/opt/gnu64/gcc/gcc-4.1.0/hppa64-hp-hpux11.11/bin/:/opt/gnu64/gcc/gcc-4.1.0/hppa64-hp-hpux11.11/lib/hppa64-hp-hpux11.11/4.1.0/:/opt/gnu64/gcc/gcc-4.1.0/hppa64-hp-hpux11.11/lib/:/test/gnu/gcc-4.1/objdir/gcc/../libexec/gcc/hppa64-hp-hpux11.11/4.1.0/:/test/gnu/gcc-4.1/objdir/gcc/../libexec/gcc/:/opt/gnu64/gcc/gcc-4.1.0/libexec/gcc/hppa64-hp-hpux11.11/4.1.0/:/opt/gnu64/gcc/gcc-4.1.0/libexec/gcc/hppa64-hp-hpux11.11/4.1.0/:/opt/gnu64/gcc/gcc-4.1.0/libexec/gcc/hppa64-hp-hpux11.11/:/opt/gnu64/gcc/gcc-4.1.0/lib/gcc/hppa64-hp-hpux11.11/4.1.0/:/opt/gnu64/gcc/gcc-4.1.0/lib/gcc/hppa64-hp-hpux11.11/:/usr/libexec/gcc/hppa64-hp-hpux11.11/4.1.0/:/usr/libexec/gcc/hppa64-hp-hpux11.11/:/usr/lib/gcc/hppa64-hp-hpux11.11/4.1.0/:/usr/lib/gcc/hppa64-hp-hpux11.11/:/test/gnu/gcc-4.1/objdir/gcc/../lib/gcc/hppa64-hp-hpux11.11/4.1.0/../../../../hppa64-hp-hpux11.11/bin/hppa64-hp-hpux11.11/4.1.0/:/test/gnu/gcc-4.1/objdir/gcc/../lib/gcc/hppa64-hp-hpux11.11/4.1.0/../../../../hppa64-hp-hpux11.11/bin/:/opt/gnu64/gcc/gcc-4.1.0/lib/gcc/hppa64-hp-hpux11.11/4.1.0/../../../../hppa64-hp-hpux11.11/bin/hppa64-hp-hpux11.11/4.1.0/:/opt/gnu64/gcc/gcc-4.1.0/lib/gcc/hppa64-hp-hpux11.11/4.1.0/../../../../hppa64-hp-hpux11.11/bin/:/usr/ccs/binhppa64-hp-hpux11.11/4.1.0/:/usr/ccs/bin LIBRARY_PATH = /test/gnu/gcc-4.1/objdir/./gcc/hppa64-hp-hpux11.11/4.1.0/:/test/gnu/gcc-4.1/objdir/./gcc/:/opt/gnu64/gcc/gcc-4.1.0/hppa64-hp-hpux11.11/bin/hppa64-hp-hpux11.11/4.1.0/:/opt/gnu64/gcc/gcc-4.1.0/hppa64-hp-hpux11.11/bin/:/opt/gnu64/gcc/gcc-4.1.0/hppa64-hp-hpux11.11/lib/hppa64-hp-hpux11.11/4.1.0/:/opt/gnu64/gcc/gcc-4.1.0/hppa64-hp-hpux11.11/lib/:/test/gnu/gcc-4.1/objdir/gcc/../lib/gcc/hppa64-hp-hpux11.11/4.1.0/:/test/gnu/gcc-4.1/objdir/gcc/../lib/gcc/:/opt/gnu64/gcc/gcc-4.1.0/lib/gcc/hppa64-hp-hpux11.11/4.1.0/:/usr/lib/gcc/hppa64-hp-hpux11.11/4.1.0/:/test/gnu/gcc-4.1/objdir/gcc/../lib/gcc/hppa64-hp-hpux11.11/4.1.0/../../../../hppa64-hp-hpux11.11/lib/hppa64-hp-hpux11.11/4.1.0/:/test/gnu/gcc-4.1/objdir/gcc/../lib/gcc/hppa64-hp-hpux11.11/4.1.0/../../../../hppa64-hp-hpux11.11/lib/:/opt/gnu64/gcc/gcc-4.1.0/lib/gcc/hppa64-hp-hpux11.11/4.1.0/../../../../hppa64-hp-hpux11.11/lib/hppa64-hp-hpux11.11/4.1.0/:/opt/gnu64/gcc/gcc-4.1.0/lib/gcc/hppa64-hp-hpux11.11/4.1.0/../../../../hppa64-hp-hpux11.11/lib/:/usr/ccs/lib/pa20_64/hppa64-hp-hpux11.11/4.1.0/:/usr/ccs/lib/pa20_64/:/opt/langtools/lib/pa20_64/hppa64-hp-hpux11.11/4.1.0/:/opt/langtools/lib/pa20_64/:/test/gnu/gcc-4.1/objdir/gcc/../lib/gcc/hppa64-hp-hpux11.11/4.1.0/../../../hppa64-hp-hpux11.11/4.1.0/:/test/gnu/gcc-4.1/objdir/gcc/../lib/gcc/hppa64-hp-hpux11.11/4.1.0/../../../:/opt/gnu64/gcc/gcc-4.1.0/lib/gcc/hppa64-hp-hpux11.11/4.1.0/../../../hppa64-hp-hpux11.11/4.1.0/:/opt/gnu64/gcc/gcc-4.1.0/lib/gcc/hppa64-hp-hpux11.11/4.1.0/../../../:/lib/pa20_64/hppa64-hp-hpux11.11/4.1.0/:/lib/pa20_64/:/usr/lib/pa20_64/hppa64-hp-hpux11.11/4.1.0/:/usr/lib/pa20_64/ /opt/gnu64/bin/ld -E -u main /usr/ccs/lib/pa20_64/crt0.o /lib/pa20_64/unix98.o /test/gnu/gcc-4.1/objdir/./gcc/crtbegin.o -L/test/gnu/gcc-4.1/objdir/./gcc -L/opt/gnu64/gcc/gcc-4.1.0/lib/gcc/hppa64-hp-hpux11.11/4.1.0 -L/usr/ccs/lib/pa20_64 -L/opt/langtools/lib/pa20_64 -L/opt/gnu64/gcc/gcc-4.1.0/lib/gcc/hppa64-hp-hpux11.11/4.1.0/../../.. -L/lib/pa20_64 -L/usr/lib/pa20_64 -lgfortranbegin -lgfortran -lm -lgcc_s -lgcc -lc /usr/lib/pa20_64/milli.a -lgcc_s -lgcc /test/gnu/gcc-4.1/objdir/./gcc/crtend.o /opt/gnu64/gcc/gcc-4.1.0/lib/gcc/hppa64-hp-hpux11.11/4.1.0/../../../libgfortranbegin.a(fmain.o): In function `main': undefined reference to `MAIN__' collect2: ld returned 1 exit status [Leaving /var/tmp//ccNsq2qg.c] [Leaving /var/tmp//ccqLqEDm.o] [Leaving /var/tmp//ccltDO2s.ld] [Leaving /var/tmp//ccyYkwmz.le] [Leaving a.out] # ./xgcc -B./ -v Reading specs from ./specs Target: hppa64-hp-hpux11.11 Configured with: ../gcc/configure --with-gnu-as --with-as=/opt/gnu64/bin/as --with-gnu-ld --with-ld=/opt/gnu64/bin/ld --enable-shared --disable-nls --with-local-prefix=/opt/gnu64 --prefix=/opt/gnu64/gcc/gcc-4.1.0 --host=hppa64-hp-hpux11.11 --enable-threads=posix --disable-libmudflap --with-gmp=/opt/gnu64/gcc/gcc-4.1.0 --enable-languages=c,c++,objc,obj-c++,fortran,java Thread model: posix gcc version 4.1.0 At the moment, I'm not sure where 'MAIN__' is defined, or why the gfortran driver adds '-lgfortranbegin -lgfortran' in the above and -L options which cause libgfortranbegin to be linked in from the --prefix directory tree. At this point, libgfortranbegin and libgfortran haven't been built.
wait this test should not be linking at this point.
Just adding '-v' to the command, I see that all the command does is link: Driving: /test/gnu/gcc-4.1/objdir/./gcc/gfortran -B/test/gnu/gcc-4.1/objdir/./gc c/ -B/opt/gnu64/gcc/gcc-4.1.0/hppa64-hp-hpux11.11/bin/ -B/opt/gnu64/gcc/gcc-4.1. 0/hppa64-hp-hpux11.11/lib/ -isystem /opt/gnu64/gcc/gcc-4.1.0/hppa64-hp-hpux11.11 /include -isystem /opt/gnu64/gcc/gcc-4.1.0/hppa64-hp-hpux11.11/sys-include -I . -Wall -fno-repack-arrays -fno-underscoring -v -lgfortranbegin -lgfortran -lm -sh ared-libgcc Reading specs from /test/gnu/gcc-4.1/objdir/./gcc/specs Target: hppa64-hp-hpux11.11 Configured with: ../gcc/configure --with-gnu-as --with-as=/opt/gnu64/bin/as --wi th-gnu-ld --with-ld=/opt/gnu64/bin/ld --enable-shared --disable-nls --with-local -prefix=/opt/gnu64 --prefix=/opt/gnu64/gcc/gcc-4.1.0 --host=hppa64-hp-hpux11.11 --enable-threads=posix --disable-libmudflap --with-gmp=/opt/gnu64/gcc/gcc-4.1.0 --enable-languages=c,c++,objc,obj-c++,fortran,java Thread model: posix gcc version 4.1.0 /test/gnu/gcc-4.1/objdir/./gcc/collect2 -E -u main /usr/ccs/lib/pa20_64/crt0.o /lib/pa20_64/unix98.o /test/gnu/gcc-4.1/objdir/./gcc/crtbegin.o -L/test/gnu/gcc- 4.1/objdir/./gcc -L/opt/gnu64/gcc/gcc-4.1.0/lib/gcc/hppa64-hp-hpux11.11/4.1.0 -L /usr/ccs/lib/pa20_64 -L/opt/langtools/lib/pa20_64 -L/opt/gnu64/gcc/gcc-4.1.0/lib /gcc/hppa64-hp-hpux11.11/4.1.0/../../.. -L/lib/pa20_64 -L/usr/lib/pa20_64 -lgfor tranbegin -lgfortran -lm -lgcc_s -lgcc -lc /usr/lib/pa20_64/milli.a -lgcc_s -lgc c /test/gnu/gcc-4.1/objdir/./gcc/crtend.o /opt/gnu64/gcc/gcc-4.1.0/lib/gcc/hppa64-hp-hpux11.11/4.1.0/../../../libgfortranb egin.a(fmain.o): In function `main': undefined reference to `MAIN__' collect2: ld returned 1 exit status Possibly, the driver is mislinked (this doesn't seem to happen with HP ld), but it's a bit strange.
same happens on ppc with gcc-4.1.1
Does this work now?
Fixed.