This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gcc 4.2.1 minsys build problems


I get the following errors when building gcc-4.2.1 in minsys using the
i686-pc-mingw32 toolchain.

In file included from ../../../src/gcc-4.2.1/gcc/libgcc2.c:35:
./tm.h:6:35: error: config/rs6000/rs6000.h: No such file or directory
./tm.h:7:28: error: config/dbxelf.h: No such file or directory
./tm.h:8:27: error: config/elfos.h: No such file or directory
./tm.h:9:26: error: config/svr4.h: No such file or directory
./tm.h:10:34: error: config/freebsd-spec.h: No such file or directory
./tm.h:11:34: error: config/rs6000/sysv4.h: No such file or directory
./tm.h:12:33: error: config/rs6000/eabi.h: No such file or directory
./tm.h:13:23: error: defaults.h: No such file or directory
In file included from ../../../src/gcc-4.2.1/gcc/libgcc2.c:65:
../../../src/gcc-4.2.1/gcc/libgcc2.h:255:3: error: #error "expand the table"
../../../src/gcc-4.2.1/gcc/libgcc2.c: In function '__mulhi3':
../../../src/gcc-4.2.1/gcc/libgcc2.c:536: error: 'BITS_PER_UNIT' undeclared
(first use in this function)
../../../src/gcc-4.2.1/gcc/libgcc2.c:536: error: (Each undeclared identifier
is reported only once
../../../src/gcc-4.2.1/gcc/libgcc2.c:536: error: for each function it
appears in.)
make[3]: *** [libgcc/./_muldi3.o] Error 1
make[3]: Leaving directory `/home/kevin/build/gcc-4.2.1/gcc'
make[2]: *** [stmp-multilib] Error 2
make[2]: Leaving directory `/home/kevin/build/gcc-4.2.1/gcc'
make[1]: *** [all-gcc] Error 2
make[1]: Leaving directory `/home/kevin/build/gcc-4.2.1'
make: *** [all] Error 2

I used the following to configure,

../../src/gcc-4.2.1/configure -target=powerpc-750-eabi -with-cpu=750
-prefix=/powerpc -exec-prefix=/powerpc-disable-threads -disable-nls
-disable-multilib -enable-version-specific-runtime-libs
-enable-languages=c,c++

The problem is that tm.h is located in /build/gcc-4.2.1/gcc and the config
directory is located in /src/gcc-4.2.1/gcc.  I can work around this problem
by copying the entire config directory from my source tree to my build tree,
however it seems like this something is wrong with my config since the
include paths are wrong in the make rule that caused these errors.

make[4]: Leaving directory `/home/kevin/build/gcc-4.2.1/gcc'
/home/kevin/build/gcc-4.2.1/./gcc/xgcc -B/home/kevin/build/gcc-4.2.1/./gcc/
-B/powerpc/powerpc-750-eabi/bin/ -B/powerpc/powerpc-750-eabi/lib/ -isystem
/pc/powerpc-750-eabi/include -isystem /powerpc/powerpc-750-eabi/sys-include
-O2  -O2 -g -O2  -DIN_GCC -DCROSS_COMPILE   -W -Wall -Wwrite-strings
-Wstrictotypes -Wmissing-prototypes -Wold-style-definition  -isystem
./include   -g  -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -I. -I
-I../../../src/.2.1/gcc -I../../../src/gcc-4.2.1/gcc/
-I../../../src/gcc-4.2.1/gcc/../include
-I../../../src/gcc-4.2.1/gcc/../libcpp/include
-I../../../src/gcc-4.2.1/./libdecnumber -I../libdecnumber -DL_muldi3 -c
../../../src/gcc-4.2.1/gcc/libgcc2.c -o libgcc/./_muldi3.o

After leaving /build/gcc-4.2.1/gcc, there is an extra ../ in the relative
paths that lead to /src.

Is this a bug or am I just doing something wrong?

Also, once I get the compiler built and installed it doesn't seem to know
how to locate the startup libraries and the default linker command scripts.
I get undefined reference to _start and undefined reference to __eabi, etc.
I tried playing around with --with-sysroot and --with-build-sysroot, however
I don't quite understand what they mean.  The description is not very clear.
It makes reference to ${gcc_tooldir} that is not mentioned anywhere else in
the documentation.  Could somebody please clarify?

Thanks,

Kevin




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]