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]

Re: Cross Compiler Host MinGW Target PowerPC


Brian Dessent schrieb:
Brian Dessent wrote:

I have read some good informations in the Web and use now a combined
build tree.
So I am able to compile the GCC in Linux now!
Today I tried the same procedure in MinGW and fail.
You need to provide more information.  What *exact* configure command
are you using, specifically what are you providing for --host, --build,
--target, and --prefix?  What is the build host, MSYS or Cygwin?  Are
you providing a relative path to the location of configure or an
absolute path?

build/gengtype.exe
/home/seb/combined/gcc/input.h: No such file or directory
Here it looks like you have a mingw program trying to access posix
paths. That won't work, mingw programs need to use win32 paths.

Just to clarify, the reason that MinGW can be a difficult host is because the build tools (MSYS) understand posix paths but native MinGW binaries do not. This means that you have to be careful that all paths that are compiled into binaries/headers (such as in specs or the build helper programs like gengtype) are either relative paths or win32 paths (c:/foo/bar).

In the case above it looks like you've got a gengtype.exe that
apparently got a posix-style absolute path leaked into it somewhere.  So
you have to ensure that the $srcdir, $builddir, $prefix etc. in the
Makefile end up as either relative paths or win32 paths.  $srcdir gets
set based on the path used to invoke configure, which is why the
particulars of how you do this can matter greatly on MinGW.

It would be a lot easier to instead use Cygwin as the host for a cross
compiler because you don't have to worry about any of this, as all
Cygwin binaries understand posix paths so there is none of this
"cognitive dissonance" between the build system and the actual binaries.

Brian


Thank you Brian,

now I am using relative paths. The Compile process runs much longer but fail again.

Configuration in dir: "/home/seb/build/combined"
Source dir: "/home/seb/combined"

export srcdir=../../combined
export builddir=.
export prefix=../../bin/ppc
../../combined/configure --target=powerpc-405-eabi --with-newlib --disable-shared --disable-libssp --enable-languages=c,c++
make


...
cat ../../../combined/gcc/config/rs6000/crtsavres.asm >crtsavres.S
/home/seb/build/combined/./gcc/xgcc -B/home/seb/build/combined/./gcc/ -nostdinc -B/home/seb/build/combined/powerpc-405-eabi/newlib/ -isystem /home/seb/build/combined/powerpc-405-eabi/newlib/targ-include -isystem /home/seb/combined/newlib/libc/include -B/usr/local/powerpc-405-eabi/bin/ -B/usr/local/powerpc-405-eabi/lib/ -isystem /usr/local/powerpc-405-eabi/include -isystem /usr/local/powerpc-405-eabi/sys-include -O2 -g -O2 -DIN_GCC -DCROSS_COMPILE -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -I. -I. -I../../../combined/gcc -I../../../combined/gcc/. -I../../../combined/gcc/../include -I./../intl -I../../../combined/gcc/../libcpp/include -mrelocatable-lib -mno-eabi -mstrict-align -c crtsavres.S -o crtsavres.o
make[4]: Leaving directory `/home/seb/build/combined/gcc'
/home/seb/build/combined/./gcc/xgcc -B/home/seb/build/combined/./gcc/ -nostdinc -B/home/seb/build/combined/powerpc-405-eabi/newlib/ -isystem /home/seb/build/combined/powerpc-405-eabi/newlib/targ-include -isystem /home/seb/combined/newlib/libc/include -B/usr/local/powerpc-405-eabi/bin/ -B/usr/local/powerpc-405-eabi/lib/ -isystem /usr/local/powerpc-405-eabi/include -isystem /usr/local/powerpc-405-eabi/sys-include -O2 -O2 -g -O2 -DIN_GCC -DCROSS_COMPILE -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -specs=ldblspecs -g -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -I. -I -I../../../combined/gcc -I../../../combined/gcc/ -I../../../combined/gcc/../include -I./../intl -I../../../combined/gcc/../libcpp/include -mrelocatable-lib -mno-eabi -mstrict-align -DL_muldi3 -c ../../../combined/gcc/libgcc2.c -o libgcc/./_muldi3.o
In file included from ../../../combined/gcc/libgcc2.c:35:
./tm.h:5:35: error: config/rs6000/rs6000.h: No such file or directory
./tm.h:6:28: error: config/dbxelf.h: No such file or directory
./tm.h:7:27: error: config/elfos.h: No such file or directory
./tm.h:8:26: error: config/svr4.h: No such file or directory
./tm.h:9:34: error: config/freebsd-spec.h: No such file or directory
./tm.h:10:34: error: config/rs6000/sysv4.h: No such file or directory
./tm.h:11:33: error: config/rs6000/eabi.h: No such file or directory
./tm.h:12:23: error: defaults.h: No such file or directory
In file included from ../../../combined/gcc/libgcc2.c:43:
../../../combined/gcc/libgcc2.h:214:3: error: #error "expand the table"
../../../combined/gcc/libgcc2.c: In function '__mulhi3':
../../../combined/gcc/libgcc2.c:514: error: 'BITS_PER_UNIT' undeclared (first use in this function)
../../../combined/gcc/libgcc2.c:514: error: (Each undeclared identifier is reported only once
../../../combined/gcc/libgcc2.c:514: error: for each function it appears in.)
make[3]: *** [libgcc/./_muldi3.o] Error 1
make[3]: Leaving directory `/home/seb/build/combined/gcc'
make[2]: *** [stmp-multilib] Error 2
make[2]: Leaving directory `/home/seb/build/combined/gcc'
make[1]: *** [all-gcc] Error 2
make[1]: Leaving directory `/home/seb/build/combined'
make: *** [all] Error 2



Result of "ls -l /home/seb/combined/gcc/config/rs6000/rs6000.h"
-rw-r--r-- 2 seb Administ 110375 Apr 13 2006 /home/seb/combined/gcc/config/rs6000/rs6000.h


Is this the same error again?
If yes, how can I make relative paths on configuration?

Sebastian


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