This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


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: powerpc-linux gcc build error


On Thursday 21 July 2005 14:24, Ganesh.Tawde@relianceinfo.com wrote:
> Hi,
> 
> I am trying to build a cross compiler toolset for powerpc-linux on a RH9
> Linux machine. The binutils builds fine. When it comes to building the gcc
> core, I get the following error. I m using gcc-3.4.0, binutils-2.14,
> glibc-2.3.2 and glibc-linuxthreads-2.3.2.
> 
> =======================================================
> /root/ppc_crossgcc/build-gcc/gcc/xgcc -B/root/ppc_crossgcc/build-gcc/gcc/
> -B/opt/crossgcc/powerpc-linux/powerpc-linux/bin/
> -B/opt/crossgcc/powerpc-linux/powerpc-linux/lib/ -isystem
> /opt/crossgcc/powerpc-linux/powerpc-linux/include -isystem
> /opt/crossgcc/powerpc-linux/powerpc-linux/sys-include -O2 -DIN_GCC
> -DCROSS_COMPILE   -W -Wall -Wwrite-strings -Wstrict-prototypes
> -Wmissing-prototypes -Wold-style-definition  -isystem ./include  -I. -I.
> -I../../gcc-3.4.0/gcc -I../../gcc-3.4.0/gcc/. -I../../gcc-3.4.0
> /gcc/../include   -g0 -finhibit-size-directive -fno-inline-functions
> -fno-exceptions -fno-zero-initialized-in-bss -fno-unit-at-a-time -fPIC
> -msdata=none \
>   -Dinhibit_libc -c ../../gcc-3.4.0/gcc/crtstuff.c -DCRT_END -DCRTSTUFFS_O
> \
>   -o crtendS.o
> make \
>   CFLAGS="-g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes
> -Wmissing-prototypes -pedantic -Wno-long-long  " \
>   CONFIG_H="config.h  auto-host.h ../../gcc-3.4.0
> /gcc/../include/ansidecl.h" \
>   MAKEOVERRIDES= \
>   -f libgcc.mk all
> make[2]: Entering directory `/root/ppc_crossgcc/build-gcc/gcc'
> for d in libgcc nof libgcc/nof; do \
>   if [ -d $d ]; then true; else /bin/sh ../../gcc-3.4.0/gcc/mkinstalldirs
> $d; fi; \
> done
> mkdir -p -- libgcc
> mkdir -p -- nof
> mkdir -p -- libgcc/nof
> if [ -f stmp-dirs ]; then true; else touch stmp-dirs; fi
> /root/ppc_crossgcc/build-gcc/gcc/xgcc -B/root/ppc_crossgcc/build-gcc/gcc/
> -B/opt/crossgcc/powerpc-linux/powerpc-linux/bin/
> -B/opt/crossgcc/powerpc-linux/powerpc-linux/lib/ -isystem
> /opt/crossgcc/powerpc-linux/powerpc-linux/include -isystem
> /opt/crossgcc/powerpc-linux/powerpc-linux/sys-include -O2  -DIN_GCC
> -DCROSS_COMPILE   -W -Wall -Wwrite-strings -Wstrict-prototypes
> -Wmissing-prototypes -Wold-style-definition  -isystem ./include  -fPIC -g
> -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -I. -I
> -I../../gcc-3.4.0/gcc -I../../gcc-3.4.0/gcc/ -I../../gcc-3.4.0
> /gcc/../include   -fPIC -mstrict-align -DL_muldi3 -c ../../gcc-3.4.0
> /gcc/libgcc2.c -o libgcc/./_muldi3.o
> In file included from ./tm.h:10,
>                  from ../../gcc-3.4.0/gcc/libgcc2.c:43:
> ../../gcc-3.4.0/gcc/config/rs6000/linux.h:100:20: signal.h: No such file or
> directory
> In file included from ./tm.h:10,
>                  from ../../gcc-3.4.0/gcc/libgcc2.c:43:
> ../../gcc-3.4.0/gcc/config/rs6000/linux.h:109: error: parse error before
> "stack_t"
> ../../gcc-3.4.0/gcc/config/rs6000/linux.h:109: warning: no semicolon at end
> of struct or union
> ../../gcc-3.4.0/gcc/config/rs6000/linux.h:111: error: parse error before
> "uc_sigmask"
> ../../gcc-3.4.0/gcc/config/rs6000/linux.h:111: warning: type defaults to
> `int' in declaration of `uc_sigmask'
> ../../gcc-3.4.0/gcc/config/rs6000/linux.h:111: warning: data definition has
> no type or storage class
> ../../gcc-3.4.0/gcc/config/rs6000/linux.h:110: error: storage size of
> `uc_mcontext' isn't known
> make[2]: *** [libgcc/./_muldi3.o] Error 1
> make[2]: Leaving directory `/root/ppc_crossgcc/build-gcc/gcc'
> make[1]: *** [stmp-multilib] Error 2
> make[1]: Leaving directory `/root/ppc_crossgcc/build-gcc/gcc'
> make: *** [all-gcc] Error 2
> 
> =======================================================
> 
> 
> Googling on this error gave me some results with similar error faced before
> by many people but could not find a proper solution.
> I am using the build procedure as listed in
> 
> http://www.pages.drexel.edu/~sg64/stuff/cross-compile.htm
> 
> and also this one
> 
> http://www.cs.duke.edu/~irwin/gcc_ppc.html
> 
> and also referring to Bill Gatliff's script.
> 
> I also tried copying signal.h from other folders but still get errors as
> the build proceeds.
> 
> Any help would be appreciated.
> 
> Rgds,
> Ganesh

You might want to try the patch below (maybe you need to tweak it for
3.4.0 as it's for 3.4.3), but I think the idea behind will become
clear.

HTH
Gerhard

-- 
Gerhard Jaeger <gjaeger@sysgo.com>            
SYSGO AG                      Embedded and Real-Time Software
www.sysgo.com | www.elinos.com | www.pikeos.com | www.osek.de 

--- gcc-3.4.3/gcc/config/rs6000/linux.h.orig    2004-10-03 05:43:56.000000000 +0200
+++ gcc-3.4.3/gcc/config/rs6000/linux.h 2005-02-09 14:36:33.000000000 +0100
@@ -104,6 +104,8 @@
 /* Do code reading to identify a signal frame, and set the frame
    state data appropriately.  See unwind-dw2.c for the structs.  */

+#ifndef inhibit_libc
+
 #ifdef IN_LIBGCC2
 #include <signal.h>

@@ -187,3 +189,5 @@ enum { SIGNAL_FRAMESIZE = 64 };
     (FS)->retaddr_column = CR0_REGNO;                                  \
     goto SUCCESS;                                                      \
   } while (0)
+
+#endif /* inhibit_libc */


------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


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