OSDN Git Service

2003-06-17 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
authorsirl <sirl@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 17 Jun 2003 15:53:35 +0000 (15:53 +0000)
committersirl <sirl@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 17 Jun 2003 15:53:35 +0000 (15:53 +0000)
* config/rs6000/linux.h (MD_FALLBACK_FRAME_STATE_FOR): Partly revert
2003-01-23 patch. Corrected to handle kernels with changed ucontext.

* config/rs6000/sysv4.h (SUBTARGET_OVERRIDE_OPTIONS): Error on invalid
-msdata=eabi usages.

* gcc/config/rs6000/sysv4.h (USE_LIBC_1): Delete all uses.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@68087 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/rs6000/linux.h
gcc/config/rs6000/sysv4.h

index bcdd107..8910304 100644 (file)
@@ -1,3 +1,13 @@
+2003-06-17  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
+
+       * config/rs6000/linux.h (MD_FALLBACK_FRAME_STATE_FOR): Partly revert
+       2003-01-23 patch. Corrected to handle kernels with changed ucontext.
+
+       * config/rs6000/sysv4.h (SUBTARGET_OVERRIDE_OPTIONS): Error on invalid
+       -msdata=eabi usages.
+
+       * gcc/config/rs6000/sysv4.h (USE_LIBC_1): Delete all uses.
+
 2003-06-17  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
 
        * alloc-pool.c: Don't check HAVE_LONG_DOUBLE.
index 3cfe020..c3e4a58 100644 (file)
 
 #ifdef IN_LIBGCC2
 #include <signal.h>
-#include <sys/ucontext.h>
+
+/* During the 2.5 kernel series the kernel ucontext was changed, but
+   the new layout is compatible with the old one, so we just define
+   and use the old one here for simplicity and compatibility.  */
+
+struct kernel_old_ucontext {
+  unsigned long     uc_flags;
+  struct ucontext  *uc_link;
+  stack_t           uc_stack;
+  struct sigcontext_struct uc_mcontext;
+  sigset_t          uc_sigmask;
+};
 
 enum { SIGNAL_FRAMESIZE = 64 };
 #endif
@@ -129,7 +140,7 @@ enum { SIGNAL_FRAMESIZE = 64 };
          struct siginfo *pinfo;                                        \
          void *puc;                                                    \
          struct siginfo info;                                          \
-         struct ucontext uc;                                           \
+         struct kernel_old_ucontext uc;                                \
        } *rt_ = (CONTEXT)->cfa;                                        \
        sc_ = &rt_->uc.uc_mcontext;                                     \
       }                                                                        \
@@ -153,15 +164,9 @@ enum { SIGNAL_FRAMESIZE = 64 };
     (FS)->regs.reg[LINK_REGISTER_REGNUM].loc.offset                    \
       = (long)&(sc_->regs->link) - new_cfa_;                           \
                                                                        \
-    /* The unwinder expects the IP to point to the following insn,     \
-       whereas the kernel returns the address of the actual            \
-       faulting insn. We store NIP+4 in an unused register slot to     \
-       get the same result for multiple evaluation of the same signal  \
-       frame.  */                                                      \
-    sc_->regs->gpr[47] = sc_->regs->nip + 4;                           \
     (FS)->regs.reg[CR0_REGNO].how = REG_SAVED_OFFSET;                  \
     (FS)->regs.reg[CR0_REGNO].loc.offset                               \
-      = (long)&(sc_->regs->gpr[47]) - new_cfa_;                                \
+      = (long)&(sc_->regs->nip) - new_cfa_;                            \
     (FS)->retaddr_column = CR0_REGNO;                                  \
     goto SUCCESS;                                                      \
   } while (0)
index 3375a23..0982698 100644 (file)
@@ -256,7 +256,8 @@ do {                                                                        \
             rs6000_sdata_name);                                        \
     }                                                                  \
                                                                        \
-  if (rs6000_sdata != SDATA_NONE && DEFAULT_ABI != ABI_V4)             \
+  if ((rs6000_sdata != SDATA_NONE && DEFAULT_ABI != ABI_V4)            \
+      || (rs6000_sdata == SDATA_EABI && !TARGET_EABI))                 \
     {                                                                  \
       rs6000_sdata = SDATA_NONE;                                       \
       error ("-msdata=%s and -mcall-%s are incompatible",              \
@@ -1073,21 +1074,11 @@ extern int fixuplabelno;
     %{symbolic:-Bsymbolic}"
 
 /* GNU/Linux support.  */
-#ifdef USE_GNULIBC_1
-#define LIB_LINUX_SPEC "%{mnewlib: --start-group -llinux -lc --end-group } \
-%{!mnewlib: -lc }"
-#else
 #define LIB_LINUX_SPEC "%{mnewlib: --start-group -llinux -lc --end-group } \
 %{!mnewlib: %{shared:-lc} %{!shared: %{pthread:-lpthread } \
 %{profile:-lc_p} %{!profile:-lc}}}"
-#endif
 
-#ifdef USE_GNULIBC_1
-#define        STARTFILE_LINUX_SPEC "\
-%{!shared: %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} %{!p:crt1.o%s}}} \
-%{mnewlib: ecrti.o%s} %{!mnewlib: crti.o%s} \
-%{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}"
-#elif defined HAVE_LD_PIE
+#ifdef HAVE_LD_PIE
 #define        STARTFILE_LINUX_SPEC "\
 %{!shared: %{pg|p:gcrt1.o%s;pie:Scrt1.o%s;:crt1.o%s}} \
 %{mnewlib:ecrti.o%s;:crti.o%s} \
@@ -1108,25 +1099,16 @@ extern int fixuplabelno;
   %{rdynamic:-export-dynamic} \
   %{!dynamic-linker:-dynamic-linker /lib/ld.so.1}}}"
 
-#if !defined(USE_GNULIBC_1) && defined(HAVE_LD_EH_FRAME_HDR)
+#if defined(HAVE_LD_EH_FRAME_HDR)
 # define LINK_EH_SPEC "%{!static:--eh-frame-hdr} "
 #endif
 
-#ifdef USE_GNULIBC_1
-#define CPP_OS_LINUX_SPEC "-D__unix__ -D__gnu_linux__ -D__linux__ \
-%{!undef:                                                        \
-  %{!ansi:                                                       \
-    %{!std=*:-Dunix -D__unix -Dlinux -D__linux}                          \
-    %{std=gnu*:-Dunix -D__unix -Dlinux -D__linux}}}              \
--Asystem=unix -Asystem=posix"
-#else
 #define CPP_OS_LINUX_SPEC "-D__unix__ -D__gnu_linux__ -D__linux__ \
 %{!undef:                                                        \
   %{!ansi:                                                       \
     %{!std=*:-Dunix -D__unix -Dlinux -D__linux}                          \
     %{std=gnu*:-Dunix -D__unix -Dlinux -D__linux}}}              \
 -Asystem=unix -Asystem=posix %{pthread:-D_REENTRANT}"
-#endif
 
 /* GNU/Hurd support.  */
 #define LIB_GNU_SPEC "%{mnewlib: --start-group -lgnu -lc --end-group } \