public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Building a cross-compiler
@ 2008-01-29  4:17 Wenton L. Davis
  2008-01-29  4:32 ` John Carter
  2008-01-29 19:04 ` Andrew Haley
  0 siblings, 2 replies; 12+ messages in thread
From: Wenton L. Davis @ 2008-01-29  4:17 UTC (permalink / raw)
  To: gcc-help

I am finally going to admit defeat and come ask for help on this.  I am 
trying to build a cross-compiler to run on an x86 machine for several 
targets: ARM, MIPS, AVR, and m681x.  I would like a single compiler to 
handle those 4 architectures in addition to the x86, eventually.  
However, for now, I am just trying to get the individual targets able to 
compile.

I can get the binutils to compile/install/run just fine.  The compiler 
build, however, is not cooperating, and I am almost certain I am 
overlooking something remarkably simple, but I just don't see it.  I 
have my source tree installed in /mnt/tmp/gcc-4.1.2 and I am building in 
/mnt/tmp/objdir.  (I found one recommendation to always build in a 
seperate directory.)  I configure it with the following (as run from in 
objdir):

../gcc-4.1.2/configure --prefix=/mnt/tmp --program-prefix=mips-elf- \
  --target=mips-elf --enable-threads=posix --enable-shared \
  --enable-languages=c --disable-checking --with-gnu-ld --verbose


This should, as I understand it, build the MIPS's compiler and after 
running "make install"put it in the /mnt/tmp/bin directory, prefixing 
each executable with "mips-elf-"  right?

After configure runs, I just type 'make' to build the compiler.

Everything goes OK (now that I figured out the --enable-threads=posix 
thing), until I get to this  (I apologize about the formatting, but I 
wanted to send exactly what I see):

/mnt/tmp/objdir/./gcc/xgcc -B/mnt/tmp/objdir/./gcc/ 
-B/mnt/tmp/mips-elf/bin/ -B/mnt/tmp/mips-elf/lib/ -isystem 
/mnt/tmp/mips-elf/include -isystem /mnt/tmp/mips-elf/sys-include -O2  
-O2 -g -O2  -DIN_GCC -DCROSS_COMPILE   -W -Wall -Wwrite-strings 
-Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  
-isystem ./include  -G 0 -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 
-D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -I. -I. -I../../gcc-4.1.2/gcc 
-I../../gcc-4.1.2/gcc/. -I../../gcc-4.1.2/gcc/../include 
-I../../gcc-4.1.2/gcc/../libcpp/include   -fexceptions -c 
../../gcc-4.1.2/gcc/unwind-dw2.c -o libgcc/./unwind-dw2.o
In file included from ./gthr-default.h:1,
                 from ../../gcc-4.1.2/gcc/gthr.h:114,
                 from ../../gcc-4.1.2/gcc/unwind-dw2.c:42:
../../gcc-4.1.2/gcc/gthr-posix.h:43:21: error: pthread.h: No such file 
or directory
../../gcc-4.1.2/gcc/gthr-posix.h:44:20: error: unistd.h: No such file or 
directory
In file included from ./gthr-default.h:1,
                 from ../../gcc-4.1.2/gcc/gthr.h:114,
                 from ../../gcc-4.1.2/gcc/unwind-dw2.c:42:
../../gcc-4.1.2/gcc/gthr-posix.h:46: error: expected '=', ',', ';', 
'asm' or '__attribute__' before '__gthread_key_t'
../../gcc-4.1.2/gcc/gthr-posix.h:47: error: expected '=', ',', ';', 
'asm' or '__attribute__' before '__gthread_once_t'
../../gcc-4.1.2/gcc/gthr-posix.h:48: error: expected '=', ',', ';', 
'asm' or '__attribute__' before '__gthread_mutex_t'
../../gcc-4.1.2/gcc/gthr-posix.h:49: error: expected '=', ',', ';', 
'asm' or '__attribute__' before '__gthread_recursive_mutex_t'
../../gcc-4.1.2/gcc/gthr-posix.h:88: error: 'pthread_once' undeclared 
here (not in a function)
../../gcc-4.1.2/gcc/gthr-posix.h:88: warning: type defaults to 'int' in 
declaration of '__gthrw_pthread_once'
../../gcc-4.1.2/gcc/gthr-posix.h:89: error: 'pthread_getspecific' 
undeclared here (not in a function)
../../gcc-4.1.2/gcc/gthr-posix.h:89: warning: type defaults to 'int' in 
declaration of '__gthrw_pthread_getspecific'
../../gcc-4.1.2/gcc/gthr-posix.h:90: error: 'pthread_setspecific' 
undeclared here (not in a function)
../../gcc-4.1.2/gcc/gthr-posix.h:90: warning: type defaults to 'int' in 
declaration of '__gthrw_pthread_setspecific'
../../gcc-4.1.2/gcc/gthr-posix.h:91: error: 'pthread_create' undeclared 
here (not in a function)
../../gcc-4.1.2/gcc/gthr-posix.h:91: warning: type defaults to 'int' in 
declaration of '__gthrw_pthread_create'
../../gcc-4.1.2/gcc/gthr-posix.h:92: error: 'pthread_cancel' undeclared 
here (not in a function)
../../gcc-4.1.2/gcc/gthr-posix.h:92: warning: type defaults to 'int' in 
declaration of '__gthrw_pthread_cancel'
../../gcc-4.1.2/gcc/gthr-posix.h:93: error: 'pthread_mutex_lock' 
undeclared here (not in a function)
../../gcc-4.1.2/gcc/gthr-posix.h:93: warning: type defaults to 'int' in 
declaration of '__gthrw_pthread_mutex_lock'
../../gcc-4.1.2/gcc/gthr-posix.h:94: error: 'pthread_mutex_trylock' 
undeclared here (not in a function)
../../gcc-4.1.2/gcc/gthr-posix.h:94: warning: type defaults to 'int' in 
declaration of '__gthrw_pthread_mutex_trylock'
../../gcc-4.1.2/gcc/gthr-posix.h:95: error: 'pthread_mutex_unlock' 
undeclared here (not in a function)
../../gcc-4.1.2/gcc/gthr-posix.h:95: warning: type defaults to 'int' in 
declaration of '__gthrw_pthread_mutex_unlock'
../../gcc-4.1.2/gcc/gthr-posix.h:96: error: 'pthread_mutex_init' 
undeclared here (not in a function)
../../gcc-4.1.2/gcc/gthr-posix.h:96: warning: type defaults to 'int' in 
declaration of '__gthrw_pthread_mutex_init'
../../gcc-4.1.2/gcc/gthr-posix.h:99: error: 'pthread_key_create' 
undeclared here (not in a function)
../../gcc-4.1.2/gcc/gthr-posix.h:99: warning: type defaults to 'int' in 
declaration of '__gthrw_pthread_key_create'
../../gcc-4.1.2/gcc/gthr-posix.h:100: error: 'pthread_key_delete' 
undeclared here (not in a function)
../../gcc-4.1.2/gcc/gthr-posix.h:100: warning: type defaults to 'int' in 
declaration of '__gthrw_pthread_key_delete'
../../gcc-4.1.2/gcc/gthr-posix.h:101: error: 'pthread_mutexattr_init' 
undeclared here (not in a function)
../../gcc-4.1.2/gcc/gthr-posix.h:101: warning: type defaults to 'int' in 
declaration of '__gthrw_pthread_mutexattr_init'
../../gcc-4.1.2/gcc/gthr-posix.h:102: error: 'pthread_mutexattr_settype' 
undeclared here (not in a function)
../../gcc-4.1.2/gcc/gthr-posix.h:102: warning: type defaults to 'int' in 
declaration of '__gthrw_pthread_mutexattr_settype'
../../gcc-4.1.2/gcc/gthr-posix.h:103: error: 'pthread_mutexattr_destroy' 
undeclared here (not in a function)
../../gcc-4.1.2/gcc/gthr-posix.h:103: warning: type defaults to 'int' in 
declaration of '__gthrw_pthread_mutexattr_destroy'
../../gcc-4.1.2/gcc/gthr-posix.h:513: error: expected ')' before '*' token
../../gcc-4.1.2/gcc/gthr-posix.h:522: error: expected ')' before '*' token
../../gcc-4.1.2/gcc/gthr-posix.h:528: error: expected ')' before 'key'
../../gcc-4.1.2/gcc/gthr-posix.h:534: error: expected ')' before 'key'
../../gcc-4.1.2/gcc/gthr-posix.h:540: error: expected ')' before 'key'
../../gcc-4.1.2/gcc/gthr-posix.h:546: error: expected ')' before '*' token
../../gcc-4.1.2/gcc/gthr-posix.h:555: error: expected ')' before '*' token
../../gcc-4.1.2/gcc/gthr-posix.h:564: error: expected ')' before '*' token
../../gcc-4.1.2/gcc/gthr-posix.h:574: error: expected ')' before '*' token
../../gcc-4.1.2/gcc/gthr-posix.h:595: error: expected ')' before '*' token
../../gcc-4.1.2/gcc/gthr-posix.h:601: error: expected ')' before '*' token
../../gcc-4.1.2/gcc/gthr-posix.h:607: error: expected ')' before '*' token
../../gcc-4.1.2/gcc/unwind-dw2.c: In function 'uw_init_context_1':
../../gcc-4.1.2/gcc/unwind-dw2.c:1259: error: expected '=', ',', ';', 
'asm' or '__attribute__' before 'once_regsizes'
../../gcc-4.1.2/gcc/unwind-dw2.c:1259: error: 'once_regsizes' undeclared 
(first use in this function)
../../gcc-4.1.2/gcc/unwind-dw2.c:1259: error: (Each undeclared 
identifier is reported only once
../../gcc-4.1.2/gcc/unwind-dw2.c:1259: error: for each function it 
appears in.)
../../gcc-4.1.2/gcc/unwind-dw2.c:1259: error: 'PTHREAD_ONCE_INIT' 
undeclared (first use in this function)
../../gcc-4.1.2/gcc/unwind-dw2.c:1260: warning: implicit declaration of 
function '__gthread_once'
make[3]: *** [libgcc/./unwind-dw2.o] Error 1
make[3]: Leaving directory `/mnt/tmp/objdir/gcc'
make[2]: *** [stmp-multilib] Error 2
make[2]: Leaving directory `/mnt/tmp/objdir/gcc'
make[1]: *** [all-gcc] Error 2
make[1]: Leaving directory `/mnt/tmp/objdir'
make: *** [all] Error 2

I have tried this same process using different versions (4.1.1, 4.1.2, 
4.2.2) of gcc and I keep hitting this same wall. II can find 
gcc-4.1.2/fixincludes/tests/base/sys/pthread.h and 
gcc-4.1.2/fixincludes/tests/base/pthread.h as well as 
gcc-4.1.2/fixincludes/tests/base/unistd.h and 
gcc-4.1.2/libssp/ssp/unistd.h, but none of these directory paths appear 
to be included with -I ... parameters.  This is what leads me to believe 
that I am somehow missing something in my configure command, but I just 
can't figure it out.

Alternatively, I am only untar-ing  the gcc-core-4.x.x.tar.gz.... I only 
need the 'C' compiler, not the C++ or ada or others.  I have tried 
untar-ing all of them, but the build still failed.

Please help!
Wenton L. Davis
wenton@ieee.org

^ permalink raw reply	[flat|nested] 12+ messages in thread
* Re: Building a cross-compiler
@ 2008-01-31 15:33 Wenton L. Davis
  0 siblings, 0 replies; 12+ messages in thread
From: Wenton L. Davis @ 2008-01-31 15:33 UTC (permalink / raw)
  To: gcc-help


Michael Witten wrote:
>
> On 28 Jan 2008, at 6:44 PM, Wenton L. Davis wrote:
>
>> John Carter wrote:
>>>
>>> It's a _very_ dark art....
>> No kidding!!!!
>
> I disagree wholeheartedly.
>
> Creating a cross compiler _should_ be the easiest
> thing in the world, but the gcc is so backasswards
> that it can be troublesome.
>
I definitely agree that this should be one of the simplest tasks, 
because it's so vital.  I will say that building the native compiler was 
1..2..3.. simple.  I got the kernal to compile more easily than this!


>>>
>>> Last time I did it, I found I had to have the binutils --prefix 
>>> directory
>>> the same --prefix as the compiler.
>
> This is definitely the case; gcc is really just an
> interface to a bunch of different tools, so it needs
> to know where to find those tools.
>
> It would be nice if there were a configure directive
> to specify the location of binutils tools for greater
> flexibility. For now, just make --prefix the same for
> both.
>
> In any case, you're supposed to be able to put the
> binutils source subdirectories (gprof, opcodes,
> bintutils, ...) inside the top level of the gcc source
> code so that one configure invocation handles both; both
> source trees are actually 2 separate views of a larger
> tree.
>
I'm not sure I understand you clearly.  Right now, in my /mnt/tmp 
directory, I have a binutils-2.18.50 directory, and a gcc-4.1.2 
directory  (and all the others that were results of building).  Are you 
saying the binutils directory should be moved up into the gcc-4.1.2 
directory?

>> At this point, I tried the brute force, copying the exact command 
>> line, but adding to it the -I../../(etc) to find the unistd.h and 
>> pthreads.h, but it failed because of an #endif without #if error... I 
>> thought I'd manually modify this file, but it was automagically 
>> created by fixincludes.  (?!?!?)
>
> Do you need libc on these other targets? If not, use
> --without-headers to indicate that you have no intention
> of building libc or the runtime libraries like libstdc++.
> See below.
>
Well, the answer to this is "eventually."  For now, just the compiler is 
needed, and eventually, I will need the libc.  I suppose that if I can 
get the compiler built, I'll be able to use it to build the libc.  
(Since most of my targets communicate via RS-232c, libc will need to be 
customized anyway.)

So, I went ahead with the --without-headers, and I eliminated the 
--enable-threads and --enable-shared.  Now, I run make, and I see 
several of these:

Next, I had to disable libssp because it failed (because it needs 
libc?)  Not happy about eliminating this, but I'll deal with it.

and viola! there it is!  I had to do a "echo $?" just to make sure I 
wasn't imagining things!

My final configure command line was:

../gcc-4.1.2/configure --prefix=/mnt/tmp --program-prefix=mips-elf- 
--target=mips-elf --enable-languages=c --disable-checking --verbose 
--without-headers --disable-nls --disable-libssp

Now, I am assuming that this is just about the bare-bones compiler, but 
I have something I can work with now.

THANKS ALL!!!!

I will go ahead and try John's scripts and see how they work for me, but 
now that I can at least get something working, I have a better (slightly 
better) clue what I'm doing.




Just for the sake of neatness, here's what I did (either run as root or 
use sudo for the install steps!):

export DESTINATION=/usr/local
export TARGET=mips-elf
mkdir objdir
tar jxvf binutils-2.18.50.tar.bz2
tar zxfv gcc-core-4.1.2.tar.gz [&& other gcc-(lang)-4.1.2.tar.gz optional]
cd objdir
../binutils-2.18.50/configure --prefix=$DESTINATION \
      --target=$TARGET --program-prefix=$(TARGET)-
make
make install
../gcc-4.1.2/configure --prefix=$DESTINATION \
      --program-prefix=$(TARGET)- --target=$TARGET \
      --enable-languages=c --without-headers --disable-nls --disable-libssp
make
make install

I hope this helps someone.  Thanks, again, everyone that helped me!

(Still open to suggestions on building the various libc's! :-)  )

Wenton L. Davis
wenton@ieee.org

^ permalink raw reply	[flat|nested] 12+ messages in thread
* RE: Building a cross-compiler
@ 2003-03-03 14:33 James Don
  0 siblings, 0 replies; 12+ messages in thread
From: James Don @ 2003-03-03 14:33 UTC (permalink / raw)
  To: 'Jeff Elkins'; +Cc: 'gcc-help@gcc.gnu.org'

[-- Attachment #1: Type: text/plain, Size: 1269 bytes --]

Hi Jeff,

Here's a script I slopped together for gcc-2.95.3 from some www sources ... 

I recommend you don't use libstdc++ part of the script ... use what ever stl
etc comes with the g++-core package ... people will just ignore you for the
better part if you have troubles building this and tell you to read the FAQ
etc (which is not really that useful) ...

I'll hopefully clean it up and make a Makefile version later this month when
I have a free moment ...

Hope this helps,
Jim



-----Original Message-----
From: Jeff Elkins [mailto:jeffelkins@earthlink.net] 
Sent: Monday, March 03, 2003 9:28 AM
To: gcc-help@gcc.gnu.org
Subject: Building a cross-compiler

I'm attempting to build a cross-compiler for i686->powerpc using directions
I 
found  at http://www.x86-64.org/documentation_folder/build and  
http://penguinppc.org/embedded/cross-compiling/

I get the error:

config/rs6000/linux.h:81:20: signal.h: No such file or directory
config/rs6000/linux.h:82:26: sys/ucontext.h: No such file or directory
make[2]: *** [libgcc/./_muldi3.o] Error 1
make[2]: Leaving directory `/home/jeff/gcc-3.2.2/gcc'
make[1]: *** [stmp-multilib] Error 2
make[1]: Leaving directory `/home/jeff/gcc-3.2.2/gcc'
make: *** [all-gcc] Error 2

Thanks for any assistance,

Jeff Elkins


[-- Attachment #2: buildgcc.sh --]
[-- Type: application/octet-stream, Size: 6649 bytes --]

#!/bin/bash

#
# Get, build and install the latest cross-development tools and libraries
#

#
# Specify the architectures for which the tools are to be built
# To build for multiple targets: ARCHS="m68k ppc i386"
#
ARCHS="powerpc-linux"

#
# Where to install
#
PREFIX=$HOME/ppcgcc/

#
# My kernel includes
#
KERNEL=$HOME/ppclinux/include/

#
# Where to get the GNU tools
#
RTEMS_BINUTILS_URL=ftp://ftp.gnu.org/gnu/binutils/
RTEMS_GCC_URL=ftp://ftp.gnu.org/gnu/gcc/gcc-2.95.3/
RTEMS_NEWLIB_URL=ftp://sources.redhat.com/pub/newlib/
GLIBC_URL=ftp://ftp.gnu.org/gnu/glibc
LIBSTDC_URL=ftp://ftp.gnu.org/gnu/libstdc++

#
# Specify the versions
#
GCC_VER=2.95.3
GCC=gcc-core-$GCC_VER
BINUTILS=binutils-2.13.2.1
NEWLIB=newlib-1.10.0
GLIBC_VER=2.2.5

#
# Get the source
#
getSource() {
    wget --passive-ftp --no-directories --retr-symlinks $RTEMS_BINUTILS_URL/$BINUTILS.tar.gz
    wget --passive-ftp --no-directories --retr-symlinks $RTEMS_BINUTILS_URL/$BINUTILS*.diff

    wget --passive-ftp --no-directories --retr-symlinks $RTEMS_GCC_URL/$GCC.tar.gz
    wget --passive-ftp --no-directories --retr-symlinks $RTEMS_GCC_URL/$GCC*.diff

    wget --passive-ftp --no-directories --retr-symlinks $RTEMS_NEWLIB_URL/$NEWLIB.tar.gz
    wget --passive-ftp --no-directories --retr-symlinks $RTEMS_NEWLIB_URL/$NEWLIB*.diff
}

getSourceGLIBC() {
    wget --passive-ftp --no-directories --retr-symlinks $GLIBC_URL/glibc-$GLIBC_VER.tar.gz
    wget --passive-ftp --no-directories --retr-symlinks $GLIBC_URL/glibc-$GLIBC_VER*.diff
    wget --passive-ftp --no-directories --retr-symlinks $GLIBC_URL/glibc-linuxthreads-$GLIBC_VER.tar.gz

    

}


#
# UnpackGCC
#
unpackGCC() {

   rm -rf gcc-$GCC_VER
    tar xvfz $GCC.tar.gz
    for d in $GCC*.diff
    do
        if [ -r "$d" ]
        then
            cat "$d" | (cd gcc-$GCC_VER ; patch -p1)
        fi
    done
}

#
# Unpack the source
#
unpackSource() {
    rm -rf $BINUTILS
    tar xvfz $BINUTILS.tar.gz 
    for d in $BINUTILS*.diff
    do
        if [ -r "$d" ]
        then
            cat "$d" | (cd $BINUTILS ; patch -p1)
        fi
    done

    unpackGCC

    rm -rf $NEWLIB
    tar xvfz $NEWLIB.tar.gz
    for d in $NEWLIB*.diff
    do
        if [ -r "$d" ]
        then
            cat "$d" | (cd $NEWLIB ; patch -p1)
        fi
    done
    cd gcc-$GCC_VER 
    ln -s ../$NEWLIB/newlib newlib
    ln -s ../$NEWLIB/libgloss libgloss
    cd ..
}

unpackGLIBC() {

   rm -rf glibc-$GLIBC_VER
   tar xvfz glibc-$GLIBC_VER.tar.gz
   for d in glibc-$GLIBC_VER*.diff
   do
      if [ -r "$d" ]
      then
         cat "$d" | (cd glibc-$GLIBC_VER ; patch -p1)
        fi
    done
    cd glibc-$GLIBC_VER
    tar xvfz ../glibc-linuxthreads-$GLIBC_VER.tar.gz
    cd ..

}

#
# Build
#
build() {
    PATH=$PREFIX/bin:$PATH
    export PATH
    for arch in $ARCHS
    do
        rm -rf BINUTILS
        mkdir BINUTILS
        cd BINUTILS
        ../$BINUTILS/configure --target=$arch --prefix=$PREFIX
	make
        make install
        cd ..

        rm -rf GCC
        mkdir  GCC
        cd GCC
        ../gcc-$GCC_VER/configure --target=$arch --prefix=$PREFIX \
            --with-gnu-as --with-gnu-ld --verbose \
            --with-system-zlib --disable-nls \
            --disable-threads \
	    --disable-shared  \
            --with-newlib \
	    --with-headers=$KERNEL \
            --enable-languages=c

	make
        make install
        cd ..
    done
}

build_glibc() {
    PATH=$PREFIX/bin:$PATH
    export PATH
    for arch in $ARCHS
    do
	rm -rf GLIBC
	mkdir GLIBC
	cd GLIBC
	rm -rf $PREFIX/$arch/include $PREFIX/$arch/sys-include $PREFIX/$arch/lib

        CC=powerpc-linux-gcc AR=powerpc-linux-ar RANLIB=powerpc-linux-ranlib \
                ../glibc-$GLIBC_VER/configure \
	 	--host=$arch \
                --enable-add-ons=linuxthreads \
                --with-headers=$KERNEL  \
                --prefix=$PREFIX/$arch
	make
	make install
	cd ..
   done
}

build_gcc_glibc() {
    PATH=$PREFIX/bin:$PATH
    export PATH
    for arch in $ARCHS
    do

	
	rm -rf GCC_GLIBC
	mkdir GCC_GLIBC
	cd GCC_GLIBC
        ../gcc-$GCC_VER/configure --target=$arch --prefix=$PREFIX/ \
                 --with-gnu-as --with-gnu-ld \
                 --enable-shared \
                 --enable-threads=posix \
                 --enable-languages=c \
                 --with-headers=$KERNEL
	make
        make install
	cd ..


    done
}

getCPPSource() {
    wget --passive-ftp --no-directories --retr-symlinks $RTEMS_GCC_URL/gcc-g++-$GCC_VER.tar.gz
    wget --passive-ftp --no-directories --retr-symlinks $RTEMS_GCC_URL/gcc-g++-$GCC_VER*.diff
    wget --passive-ftp --no-directories --retr-symlinks $LIBSTDC_URL/libstdc++-2.90.8.tar.gz
}

unpackCPPSource(){
    pwd
    echo UNPACK G++
    tar xfz gcc-g++-$GCC_VER.tar.gz
}

build_g++_glibc() {
    PATH=$PREFIX/bin:$PATH
    export PATH
    for arch in $ARCHS
    do

	
	rm -rf G++_GLIBC
	mkdir G++_GLIBC
	cd G++_GLIBC
        #cd gcc-$GCC_VER
        ../gcc-$GCC_VER/configure --target=$arch --prefix=$PREFIX \
	    --with-gnu-as --with-gnu-ld \
	    --enable-shared \
	    --enable-threads=posix \
	    --enable-languages=c,c++ \
	    --enable-version-specific-runtime-libs \
	    --with-headers=$KERNEL --with-sysroot=$PREFIX/

	make
        #make install
	cd ..


    done
}

unpackStd() {
    pwd
    echo UNPASK STDC
    tar xfz libstdc++-2.90.8.tar.gz
    patch -p0 -b -z.ORIG < libstdc++-2.90.8-compat-gcc-2.95.3.diff
    cd gcc-$GCC_VER
    mv libstdc++ libstdc++ORIG
    mv libio     libioORIG
    cp -rf ../libstdc++-2.90.8 ./
    mv ./libstdc++-2.90.8 ./libstdc++ 
    cd ..
}


#
# Do everything
#
# Comment out any activities you wish to omit
#
#set -ex

export PATH=$PREFIX/bin/:$PATH

echo ====================================
echo BUILD BOOT STRAPPED COMPILER
echo ====================================
#sleep 10
#getSource
#unpackSource
#unpackCPPSource
#build


echo ====================================
echo BUILD GLIBC
echo ====================================
#getSourceGLIBC
unpackGLIBC
build_glibc

echo ====================================
echo BUILD GCC WITH GLIBC
echo ====================================
unpackGCC
build_gcc_glibc

echo =====================================
echo BUILD G++/GCC WITH GLIBC AND LIBSTC++
echo =====================================
#getCPPSource
#unpackGCC
#unpackCPPSource
#unpackStd
#build_g++_glibc

^ permalink raw reply	[flat|nested] 12+ messages in thread
* Building a cross-compiler
@ 2003-03-03 14:28 Jeff Elkins
  0 siblings, 0 replies; 12+ messages in thread
From: Jeff Elkins @ 2003-03-03 14:28 UTC (permalink / raw)
  To: gcc-help

I'm attempting to build a cross-compiler for i686->powerpc using directions I 
found  at http://www.x86-64.org/documentation_folder/build and  
http://penguinppc.org/embedded/cross-compiling/

I get the error:

config/rs6000/linux.h:81:20: signal.h: No such file or directory
config/rs6000/linux.h:82:26: sys/ucontext.h: No such file or directory
make[2]: *** [libgcc/./_muldi3.o] Error 1
make[2]: Leaving directory `/home/jeff/gcc-3.2.2/gcc'
make[1]: *** [stmp-multilib] Error 2
make[1]: Leaving directory `/home/jeff/gcc-3.2.2/gcc'
make: *** [all-gcc] Error 2

Thanks for any assistance,

Jeff Elkins

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2008-01-29 20:31 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-29  4:17 Building a cross-compiler Wenton L. Davis
2008-01-29  4:32 ` John Carter
2008-01-29  4:47   ` Wenton L. Davis
2008-01-29  5:05     ` Michael Witten
2008-01-29  6:54       ` James Tebneff
2008-01-29 20:24       ` Kai Ruottu
2008-01-29  6:11     ` Rupert Wood
2008-01-29  9:58     ` John Carter
2008-01-29 19:04 ` Andrew Haley
  -- strict thread matches above, loose matches on Subject: below --
2008-01-31 15:33 Wenton L. Davis
2003-03-03 14:33 James Don
2003-03-03 14:28 Jeff Elkins

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).