This is the mail archive of the gcc-patches@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]

sh-elf build failure on mainline]


The build fails with:

/mnt/scratch/nightly/2006-06-14/sh-elf/./gcc/xgcc -B/mnt/scratch/nightly/2006-06-14/sh-elf/./gcc/ -nostdinc -B/mnt/scratch/nightly/2006-06-14/sh-elf/sh-elf/newlib/ -isystem /mnt/scratch/nightly/2006-06-14/sh-elf/sh-elf/newlib/targ-include -isystem /mnt/scratch/nightly/2006-06-14/srcw/newlib/libc/include -B/usr/local/sh-elf/bin/ -B/usr/local/sh-elf/lib/ -isystem /usr/local/sh-elf/include -isystem /usr/local/sh-elf/sys-include -L/mnt/scratch/nightly/2006-06-14/sh-elf/./ld -DHAVE_CONFIG_H -I/mnt/scratch/nightly/2006-06-14/srcw/boehm-gc/include -fexceptions -Iinclude -I././targ-include -I.//libc/include -O2 -g -O2 -fexceptions -Iinclude -I././targ-include -I.//libc/include -c ../../../srcw/boehm-gc/allchblk.c -o allchblk.o
In file included from /mnt/scratch/nightly/2006-06-14/srcw/boehm-gc/include/private/gc_priv.h:70,
from ../../../srcw/boehm-gc/allchblk.c:19:
/mnt/scratch/nightly/2006-06-14/srcw/boehm-gc/include/private/gcconfig.h:462: error: expected identifier or '(' before '--' token
make[2]: *** [allchblk.lo] Error 1
make[2]: Leaving directory `/mnt/scratch/nightly/2006-06-14/sh-elf/sh-elf/boehm-gc'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/mnt/scratch/nightly/2006-06-14/sh-elf/sh-elf/boehm-gc'
make: *** [all-target-boehm-gc] Error 2


The attached patch alows the build to proceed past this obstacle, although I don't know how patches to this files are supposed to be handled, or if the build will eventually succeed.
Or why we need to cross-build boehm-gc for the target of a C / C++ / objc cross compiler in the first place. We didn't one or two weeks ago.



2006-06-14  J"orn Rennecke <joern.rennecke@st.com>

	* gcconfig.h (SH): Test for embedded target.

Index: gcconfig.h
===================================================================
/usr/bin/diff -p -d -F^( -u -L gcconfig.h	(revision 114639) -L gcconfig.h	(working copy) .svn/text-base/gcconfig.h.svn-base gcconfig.h
--- gcconfig.h	(revision 114639)
+++ gcconfig.h	(working copy)
@@ -420,6 +420,20 @@
 #   define NOSYS
 #   define mach_type_known
 # endif
+/* Embedded SH uses a leading _ for user labels.  */
+# if defined (__GNUC__) && defined(__sh__) && !defined(__SH5__)
+#   define CHECK_LABEL_PREFIX(X) CHECK_LABEL_PREFIX1(X)
+#   define CHECK_LABEL_PREFIX1(X)  \
+	CHECK_LABEL_PREFIX2(CHECK_LABEL_PREFIX_NUM##X)
+#   define CHECK_LABEL_PREFIX2(X) X
+#   define CHECK_LABEL_PREFIX_NUM 0
+#   define CHECK_LABEL_PREFIX_NUM_ 1
+#   if CHECK_LABEL_PREFIX(__USER_LABEL_PREFIX__)
+#     define SH
+#     define NOSYS
+#     define mach_type_known
+#   endif
+# endif
 /* Ivan Demakov */
 # if defined(__WATCOMC__) && defined(__386__)
 #   define I386
@@ -1888,6 +1902,16 @@
 #       define USE_GENERIC_PUSH_REGS
 #      define DYNAMIC_LOADING
 #   endif
+#   ifdef NOSYS
+      extern char _etext[];
+#     define DATASTART ((ptr_t)(&_etext))
+      extern char _end[];
+#     define DATAEND (_end)
+#     define OS_TYPE "NOSYS"
+      extern char stack[];
+#     define STACKBOTTOM ((ptr_t)stack)
+#     define USE_GENERIC_PUSH_REGS
+#   endif
 # endif
  
 # ifdef SH4


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