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: error in unwind-dw.c while compiling ppc970 cross-gcc




Khem Raj wrote:



Mike Frysinger wrote:

On Thursday 07 April 2005 08:17 pm, Khem Raj wrote:


I have applied part of the patch
http://www.gentoo.org/cgi-bin/viewcvs.cgi/sys-devel/gcc/files/3.4.3/gcc-3.4
.3-cross-compile.patch?rev=1.7&view=markup wrongly which caused this issue.
Once I corrected it. The build
progressed further



erm, i dont think so ... the only thing that patch does is to prevent glibc header files from being included ...


without the fixes in there for gcc/config/rs6000/linux64.h, the build fails much earlier in a typical mannor ... while trying to build libgcc2:

/var/tmp/cross/powerpc64-unknown-linux-gnu/portage/gcc-3.4.3.20050110-r1/work/build/gcc/xgcc -B/var/tmp/cross/powerpc64-unknown-linux-gnu/portage/gcc-3.4.3.20050110-r1/work/build/gcc/ -B/usr/powerpc64-unknown-linux-gnu/bin/ -B/usr/powerpc64-unknown-linux-gnu/lib/ -isystem /usr/powerpc64-unknown-linux-gnu/include -isystem /usr/powerpc64-unknown-linux-gnu/sys-include -O2 -DIN_GCC -DCROSS_COMPILE -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -mno-minimal-toc -fPIC -specs=bispecs -g -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -D_LIBC_PROVIDES_SSP_ -I. -I. -I/var/tmp/cross/powerpc64-unknown-linux-gnu/portage/gcc-3.4.3.20050110-r1/work/gcc-3.4.3/gcc -I/var/tmp/cross/powerpc64-unknown-linux-gnu/portage/gcc-3.4.3.20050110-r1/work/gcc-3.4.3/gcc/. -I/var/tmp/cross/powerpc64-unknown-linux-gnu/portage/gcc-3.4.3.20050110-r1/work/gcc-3.4.3/gcc/../include -fPIC -mstrict-align -DL_muldi3 -c /var/tmp/cross/powerpc64-unknown-linux-gnu/portage/gcc-3.4.3.20050110-r1/work/gcc-3.4.3/gcc/libgcc2.c -o libgcc/./_muldi3.o
In file included from ./tm.h:12,
from /var/tmp/cross/powerpc64-unknown-linux-gnu/portage/gcc-3.4.3.20050110-r1/work/gcc-3.4.3/gcc/libgcc2.c:43:
/var/tmp/cross/powerpc64-unknown-linux-gnu/portage/gcc-3.4.3.20050110-r1/work/gcc-3.4.3/gcc/config/rs6000/linux64.h:583:20: signal.h: No such file or directory
/var/tmp/cross/powerpc64-unknown-linux-gnu/portage/gcc-3.4.3.20050110-r1/work/gcc-3.4.3/gcc/config/rs6000/linux64.h:585:26: sys/ucontext.h: No such file or directory
make[2]: *** [libgcc/./_muldi3.o] Error 1
-mike


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



My source tar does have Alan's patch I looked at it yesterday. However my problem was that I did not apply your patch cleanly plus

I did tweak the patch a little bit. Here is diff of just gcc/config/rs6000/linux64.h

I also covered the defines MD_FALLBACK_FRAME_STATE_FOR and MD_FROB_UPDATE_CONTEXT in the #ifndef inhibit_libc - #endif clause


Index: gcc-3.4.3/gcc/config/rs6000/linux64.h =================================================================== --- gcc-3.4.3.orig/gcc/config/rs6000/linux64.h +++ gcc-3.4.3/gcc/config/rs6000/linux64.h @@ -559,13 +559,12 @@ while (0) /* 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>
#ifdef __powerpc64__
#include <sys/ucontext.h>

-enum { SIGNAL_FRAMESIZE = 128 };
-
#else

/* During the 2.5 kernel series the kernel ucontext was changed, but
@@ -579,7 +578,6 @@ struct kernel_old_ucontext {
  struct sigcontext_struct uc_mcontext;
  sigset_t          uc_sigmask;
};
-enum { SIGNAL_FRAMESIZE = 64 };
#endif

#endif
@@ -733,3 +731,9 @@ enum { SIGNAL_FRAMESIZE = 64 };
  } while (0)

#endif
+#endif /* inhibit_libc */
+#ifdef __powerpc64__
+enum { SIGNAL_FRAMESIZE = 128 };
+#else
+enum { SIGNAL_FRAMESIZE = 64 };
+#endif

--
Khem Raj
MontaVista Software Inc.

http://www.mvista.com
Platform To Innovate

--
Khem Raj
MontaVista Software Inc.
1237 E. Arques Ave.Sunnyvale CA 94085
web http://www.mvista.com


------ 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]