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

building cross-compiler fails for c++


Hi!

Trying to build a c++ cross-compiler fails for me.

host: Linux x86 (SuSE 7.3)
target: arm-uclinux

I use this[1] patch to make the c compiler work (and for plain c it
seems to work).

configure is called with --with-cpu=arm7tdmi --enable-languages="c,c++"
(and, of course, target and prefix).

configure looks ok; make then fails after quite some time with
======
checking for sys/time.h... yes
checking for time.h... yes
checking for sys/resource.h... (cached) yes
checking for sys/stat.h... yes
checking for sys/mman.h... yes
checking for fcntl.h... yes
checking for sys/wait.h that is POSIX.1 compatible... no
checking whether time.h and sys/time.h may both be included... no
checking whether errno must be declared... yes
checking whether the C compiler
(/tmp/avbidder-build-toolchain/build-gcc/gcc/x
c -B/tmp/avbidder-build-toolchain/build-gcc/gcc/
-B/home/avbidder/gcc-3/arm-uc
nux/bin/ -B/home/avbidder/gcc-3/arm-uclinux/lib/ -isystem
/home/avbidder/gcc-3
rm-uclinux/include -g -O2 ) works... no
configure: error: installation or configuration problem: C compiler
cannot cre
e executables.
make: *** [configure-target-libiberty] Error 1
======

For both, configure and make, the (LD|AS|RANLIB|NM)_FOR_TARGET are set
up to point to the arm-uclinux binutils.

(fyi: we do not need C++ std library, I think. So just disabling
something might solve our problem already - it won't correct the build
problem, though)

greets & thank you
-- vbi


[1]
diff -rudN gcc-3.0.2.orig/config.sub gcc-3.0.2/config.sub
--- gcc-3.0.2.orig/config.sub	Mon Jul 16 12:04:04 2001
+++ gcc-3.0.2/config.sub	Tue Oct 30 10:26:47 2001
@@ -1035,7 +1035,8 @@
 	      | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
 	      | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
 	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
-	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* | -os2*)
+	      | -storm-chaos* | -tops10* | -tenex* | -tops20* \
+	      | -its* | -os2* | -uclinux*)
 	# Remember, each alternative MUST END IN *, to match a version number.
 		;;
 	-qnx*)
diff -rudN gcc-3.0.2.orig/gcc/config/arm/linux-gas.h
gcc-3.0.2/gcc/config/arm/linux-gas.h
--- gcc-3.0.2.orig/gcc/config/arm/linux-gas.h	Tue Jan  2 14:38:41 2001
+++ gcc-3.0.2/gcc/config/arm/linux-gas.h	Tue Oct 30 10:26:47 2001
@@ -74,6 +74,7 @@
 
 /* Clear the instruction cache from `beg' to `end'.  This makes an
    inline system call to SYS_cacheflush.  */
+#ifndef __THUMBEL__
 #define CLEAR_INSN_CACHE(BEG, END)					\
 {									\
   register unsigned long _beg __asm ("a1") = (unsigned long) (BEG);	\
@@ -83,3 +84,22 @@
 		    : "=r" (_beg)					\
 		    : "0" (_beg), "r" (_end), "r" (_flg));		\
 }
+#else
+#define CLEAR_INSN_CACHE(BEG, END)					\
+{									\
+  register unsigned long _beg __asm ("a1") = (unsigned long) (BEG);	\
+  register unsigned long _end __asm ("a2") = (unsigned long) (END);	\
+  register unsigned long _flg __asm ("a3") = 0;				
\
+  unsigned long temp;							\
+  __asm __volatile (							\
+	"adr	%1, 0f\n"						\
+"	bx	%1\n"							\
+"	.code 32\n"							\
+"0:	swi 0x9f0002		@ sys_cacheflush\n"			\
+"	adr	%1, 0b + 13\n"						\
+"	bx	%1\n"							\
+"	.code 16"							\
+		    : "=r" (_beg), "=r" (temp)				\
+		    : "0" (_beg), "r" (_end), "r" (_flg));		\
+}
+#endif
diff -rudN gcc-3.0.2.orig/gcc/config/arm/t-arm-elf
gcc-3.0.2/gcc/config/arm/t-arm-elf
--- gcc-3.0.2.orig/gcc/config/arm/t-arm-elf	Thu Sep 21 19:36:19 2000
+++ gcc-3.0.2/gcc/config/arm/t-arm-elf	Tue Oct 30 10:26:47 2001
@@ -31,15 +31,15 @@
 # MULTILIB_EXCEPTIONS  = 
 # MULTILIB_MATCHES     = mbig-endian=mbe mlittle-endian=mle
 # 
-# MULTILIB_OPTIONS    += mhard-float/msoft-float
-# MULTILIB_DIRNAMES   += fpu soft
+MULTILIB_OPTIONS    += mhard-float/msoft-float
+MULTILIB_DIRNAMES   += fpu soft
 # 
 # MULTILIB_OPTIONS    += mapcs-32/mapcs-26
 # MULTILIB_DIRNAMES   += 32bit 26bit
 # 
-# MULTILIB_OPTIONS    += mno-thumb-interwork/mthumb-interwork
-# MULTILIB_DIRNAMES   += normal interwork
-# MULTILIB_EXCEPTIONS += *mapcs-26/*mthumb-interwork*
+MULTILIB_OPTIONS    += mno-thumb-interwork/mthumb-interwork
+MULTILIB_DIRNAMES   += normal interwork
+MULTILIB_EXCEPTIONS += *mapcs-26/*mthumb-interwork*
 # 
 # MULTILIB_OPTIONS    += fno-leading-underscore/fleading-underscore
 # MULTILIB_DIRNAMES   += elf under


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