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]
Other format: [Raw text]

Error in libstdc++


I'm just testing a patch for x86-64 multilib support in mainline, but I get 
this error at the first c++ compile:

make[4]: Entering directory 
`/suse/bo/Work/gcc/build-m2/x86_64-unknown-linux-gnu/libstdc++-v3/libmath'

/bin/sh ../libtool --mode=compile /suse/bo/Work/gcc/build-m2/gcc/xgcc 
-B/suse/bo/Work/gcc/build-m2/gcc/ 
-B/suse/bo/Work/gcc/installed/x86_64-unknown-linux-gnu/bin/ 
-B/suse/bo/Work/gcc/installed/x86_64-unknown-linux-gnu/lib/ -isystem 
/suse/bo/Work/gcc/installed/x86_64-unknown-linux-gnu/include -DHAVE_CONFIG_H 
-I. -I../../../../mainline/libstdc++-v3/libmath -I..      -g -O2 -c 
../../../../mainline/libstdc++-v3/libmath/stubs.c

libtool: compile: unable to infer tagged configuration
libtool: compile: specify a tag with `--tag'

Any ideas what's wrong here?

This is the patch I'm testing right now:

2002-05-23  Bo Thorsen  <bo@suse.co.uk>

	* config/i386/libgcc-x86_64-glibc.ver: Copy this file from the
	3.1 branch. The file was made by Jakub Jelinek.
	* config/i386/linux64.h (MD_FALLBACK_FRAME_STATE_FOR): Add i386
	support so multilib doesn't break. And don't define this at all
	when -Dinhibit_libc is used.
	(MULTILIB_DEFAULTS): Always set default to 64 bit compilation.
	* config/i386/t-linux64: Implement full multilib support. Patch
	originally done by Andreas Jaeger and Jakub Jelinek.

Index: config/i386/libgcc-x86_64-glibc.ver
===================================================================
RCS file: config/i386/libgcc-x86_64-glibc.ver
diff -N config/i386/libgcc-x86_64-glibc.ver
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ config/i386/libgcc-x86_64-glibc.ver	23 May 2002 12:20:07 -0000
@@ -0,0 +1,25 @@
+# In order to work around the very problems that force us to now generally
+# create a libgcc.so, glibc reexported a number of routines from libgcc.a.
+# By now choosing the same version tags for these specific routines, we
+# maintain enough binary compatibility to allow future versions of glibc
+# to defer implementation of these routines to libgcc.so via DT_AUXILIARY.
+
+%ifndef __x86_64__
+%inherit GCC_3.0 GLIBC_2.0
+GLIBC_2.0 {
+  # Sampling of DImode arithmetic used by (at least) i386 and m68k.
+  __divdi3
+  __moddi3
+  __udivdi3
+  __umoddi3
+
+  # Exception handling support functions used by most everyone.
+  __register_frame
+  __register_frame_table
+  __deregister_frame
+  __register_frame_info
+  __deregister_frame_info
+  __frame_state_for
+  __register_frame_info_table
+}
+%endif
Index: config/i386/linux64.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/linux64.h,v
retrieving revision 1.10
diff -u -r1.10 linux64.h
--- config/i386/linux64.h	26 Apr 2002 07:05:56 -0000	1.10
+++ config/i386/linux64.h	23 May 2002 12:20:07 -0000
@@ -65,14 +65,19 @@
   %{m32:%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s} \
   %{!m32:%{!shared:crtend.o%s} %{shared:crtendS.o%s} /usr/lib64/crtn.o%s}"
 
+#define MULTILIB_DEFAULTS { "m64" }
+
 /* Do code reading to identify a signal frame, and set the frame
-   state data appropriately.  See unwind-dw2.c for the structs.  */
+   state data appropriately.  See unwind-dw2.c for the structs.  
+   Don't use this at all if inhibit_libc is used.  */
 
+#ifndef inhibit_libc
 #ifdef IN_LIBGCC2
 #include <signal.h>
 #include <sys/ucontext.h>
 #endif
 
+#ifdef __x86_64__
 #define MD_FALLBACK_FRAME_STATE_FOR(CONTEXT, FS, SUCCESS)		\
   do {									\
     unsigned char *pc_ = (CONTEXT)->ra;					\
@@ -129,3 +134,59 @@
     (FS)->retaddr_column = 16;						\
     goto SUCCESS;							\
   } while (0)
+#else /* ifdef __x86_64__  */
+#define MD_FALLBACK_FRAME_STATE_FOR(CONTEXT, FS, SUCCESS)		\
+  do {									\
+    unsigned char *pc_ = (CONTEXT)->ra;					\
+    struct sigcontext *sc_;						\
+    long new_cfa_;							\
+									\
+    /* popl %eax ; movl $__NR_sigreturn,%eax ; int $0x80  */		\
+    if (*(unsigned short *)(pc_+0) == 0xb858				\
+	&& *(unsigned int *)(pc_+2) == 119				\
+	&& *(unsigned short *)(pc_+6) == 0x80cd)			\
+      sc_ = (CONTEXT)->cfa + 4;						\
+    /* movl $__NR_rt_sigreturn,%eax ; int $0x80  */			\
+    else if (*(unsigned char *)(pc_+0) == 0xb8				\
+	     && *(unsigned int *)(pc_+1) == 173				\
+	     && *(unsigned short *)(pc_+5) == 0x80cd)			\
+      {									\
+	struct rt_sigframe {						\
+	  int sig;							\
+	  struct siginfo *pinfo;					\
+	  void *puc;							\
+	  struct siginfo info;						\
+	  struct ucontext uc;						\
+	} *rt_ = (CONTEXT)->cfa;					\
+	sc_ = (struct sigcontext *) &rt_->uc.uc_mcontext;		\
+      }									\
+    else								\
+      break;								\
+									\
+    new_cfa_ = sc_->esp;						\
+    (FS)->cfa_how = CFA_REG_OFFSET;					\
+    (FS)->cfa_reg = 4;							\
+    (FS)->cfa_offset = new_cfa_ - (long) (CONTEXT)->cfa;		\
+									\
+    /* The SVR4 register numbering macros aren't usable in libgcc.  */	\
+    (FS)->regs.reg[0].how = REG_SAVED_OFFSET;				\
+    (FS)->regs.reg[0].loc.offset = (long)&sc_->eax - new_cfa_;		\
+    (FS)->regs.reg[3].how = REG_SAVED_OFFSET;				\
+    (FS)->regs.reg[3].loc.offset = (long)&sc_->ebx - new_cfa_;		\
+    (FS)->regs.reg[1].how = REG_SAVED_OFFSET;				\
+    (FS)->regs.reg[1].loc.offset = (long)&sc_->ecx - new_cfa_;		\
+    (FS)->regs.reg[2].how = REG_SAVED_OFFSET;				\
+    (FS)->regs.reg[2].loc.offset = (long)&sc_->edx - new_cfa_;		\
+    (FS)->regs.reg[6].how = REG_SAVED_OFFSET;				\
+    (FS)->regs.reg[6].loc.offset = (long)&sc_->esi - new_cfa_;		\
+    (FS)->regs.reg[7].how = REG_SAVED_OFFSET;				\
+    (FS)->regs.reg[7].loc.offset = (long)&sc_->edi - new_cfa_;		\
+    (FS)->regs.reg[5].how = REG_SAVED_OFFSET;				\
+    (FS)->regs.reg[5].loc.offset = (long)&sc_->ebp - new_cfa_;		\
+    (FS)->regs.reg[8].how = REG_SAVED_OFFSET;				\
+    (FS)->regs.reg[8].loc.offset = (long)&sc_->eip - new_cfa_;		\
+    (FS)->retaddr_column = 8;						\
+    goto SUCCESS;							\
+  } while (0)
+#endif /* ifdef __x86_64__  */
+#endif /* ifdef inhibit_libc  */
Index: config/i386/t-linux64
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/t-linux64,v
retrieving revision 1.1
diff -u -r1.1 t-linux64
--- config/i386/t-linux64	8 Feb 2002 07:53:36 -0000	1.1
+++ config/i386/t-linux64	23 May 2002 12:20:07 -0000
@@ -1,3 +1,15 @@
-# On x86-64 we do not need any exports for glibc, override the settings
+# On x86-64 we do not need any exports for glibc for 64-bit libgcc_s,
+# override the settings
 # from t-slibgcc-elf-ver and t-linux
-SHLIB_MAPFILES = $(srcdir)/libgcc-std.ver
+SHLIB_MAPFILES = $(srcdir)/libgcc-std.ver \
+		 $(srcdir)/config/i386/libgcc-x86_64-glibc.ver
+
+MULTILIB_OPTIONS = m64/m32
+MULTILIB_DIRNAMES = 64 32 
+
+LIBGCC = stmp-multilib
+INSTALL_LIBGCC = install-multilib
+
+EXTRA_MULTILIB_PARTS=crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o
+
+SHLIB_SLIBDIR_SUFFIXES = 64:64 32:


-- 

     Bo Thorsen                 |   Praestevejen 4
     Free software developer    |   5290 Marslev
     SuSE Labs                  |   Denmark


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