view sources/patches/gcc-core-musl.patch @ 1706:dcb7e74a7a71 draft

Tweak rebuild dependencies for ./build.sh $ARCH $STAGENAME
author Rob Landley <rob@landley.net>
date Wed, 12 Nov 2014 09:20:57 -0600
parents b74df510d10d
children
line wrap: on
line source

Build against musl (or current glibc) using the standard name instead of the random implementation detail leakage.

And on powerpc gcc assumes the existence of a nonstandard symbol (__libc_stack_end) which musl hasn't got.

diff -ruN gcc-core/gcc/config/i386/linux-unwind.h gcc-core.bak/gcc/config/i386/linux-unwind.h
--- gcc-core/gcc/config/i386/linux-unwind.h	2006-02-27 11:26:26.000000000 -0600
+++ gcc-core.bak/gcc/config/i386/linux-unwind.h	2014-07-02 18:27:17.931529601 -0500
@@ -137,9 +137,9 @@
     {
       struct rt_sigframe {
 	int sig;
-	struct siginfo *pinfo;
+	siginfo_t *pinfo;
 	void *puc;
-	struct siginfo info;
+	siginfo_t info;
 	struct ucontext uc;
       } *rt_ = context->cfa;
       /* The void * cast is necessary to avoid an aliasing warning.
diff -ru gcc-core.bak/gcc/config/alpha/linux-unwind.h gcc-core/gcc/config/alpha/linux-unwind.h
--- gcc-core.bak/gcc/config/alpha/linux-unwind.h	2014-07-02 13:51:18.938839448 -0500
+++ gcc-core/gcc/config/alpha/linux-unwind.h	2014-07-04 12:27:31.215361161 -0500
@@ -54,7 +54,7 @@
   else if (pc[1] == 0x201f015f)	/* lda $0,NR_rt_sigreturn */
     {
       struct rt_sigframe {
-	struct siginfo info;
+	siginfo_t info;
 	struct ucontext uc;
       } *rt_ = context->cfa;
       sc = &rt_->uc.uc_mcontext;
diff -ru gcc-core.bak/gcc/config/ia64/linux-unwind.h gcc-core/gcc/config/ia64/linux-unwind.h
--- gcc-core.bak/gcc/config/ia64/linux-unwind.h	2005-06-24 20:22:41.000000000 -0500
+++ gcc-core/gcc/config/ia64/linux-unwind.h	2014-07-04 12:27:31.215361161 -0500
@@ -51,7 +51,7 @@
       struct sigframe {
 	char scratch[16];
 	unsigned long sig_number;
-	struct siginfo *info;
+	siginfo_t *info;
 	struct sigcontext *sc;
       } *frame_ = (struct sigframe *)context->psp;
       struct sigcontext *sc = frame_->sc;
@@ -130,7 +130,7 @@
       struct sigframe {
 	char scratch[16];
 	unsigned long sig_number;
-	struct siginfo *info;
+	siginfo_t *info;
 	struct sigcontext *sc;
       } *frame = (struct sigframe *)context->psp;
       struct sigcontext *sc = frame->sc;
diff -ru gcc-core.bak/gcc/config/mips/linux-unwind.h gcc-core/gcc/config/mips/linux-unwind.h
--- gcc-core.bak/gcc/config/mips/linux-unwind.h	2006-05-19 07:52:26.000000000 -0500
+++ gcc-core/gcc/config/mips/linux-unwind.h	2014-07-04 12:27:31.211361161 -0500
@@ -77,7 +77,7 @@
     {
       struct rt_sigframe {
 	u_int32_t trampoline[2];
-	struct siginfo info;
+	siginfo_t info;
 	_sig_ucontext_t uc;
       } *rt_ = context->ra;
       sc = &rt_->uc.uc_mcontext;
diff -ru gcc-core.bak/gcc/config/pa/linux-unwind.h gcc-core/gcc/config/pa/linux-unwind.h
--- gcc-core.bak/gcc/config/pa/linux-unwind.h	2005-11-17 21:22:18.000000000 -0600
+++ gcc-core/gcc/config/pa/linux-unwind.h	2014-07-04 12:27:31.195361161 -0500
@@ -63,7 +63,7 @@
   int i;
   struct sigcontext *sc;
   struct rt_sigframe {
-    struct siginfo info;
+    siginfo_t info;
     struct ucontext uc;
   } *frame;
 
diff -ru gcc-core.bak/gcc/config/sh/linux-unwind.h gcc-core/gcc/config/sh/linux-unwind.h
--- gcc-core.bak/gcc/config/sh/linux-unwind.h	2014-07-02 13:51:18.930839444 -0500
+++ gcc-core/gcc/config/sh/linux-unwind.h	2014-07-04 12:27:31.207361161 -0500
@@ -82,9 +82,9 @@
 	   && (*(unsigned long *) (pc+11)  == 0x6ff0fff0))
     {
       struct rt_sigframe {
-	struct siginfo *pinfo;
+	siginfo_t *pinfo;
 	void *puc;
-	struct siginfo info;
+	siginfo_t info;
 	struct ucontext uc;
       } *rt_ = context->cfa;
       /* The void * cast is necessary to avoid an aliasing warning.
@@ -181,7 +181,7 @@
 		&& (*(unsigned short *) (pc+14)  == 0x00ad))))
     {
       struct rt_sigframe {
-	struct siginfo info;
+	siginfo_t info;
 	struct ucontext uc;
       } *rt_ = context->cfa;
       /* The void * cast is necessary to avoid an aliasing warning.
diff -ru gcc-core/gcc/config/rs6000/linux-unwind.h gcc-core.bak/gcc/config/rs6000/linux-unwind.h
--- gcc-core/gcc/config/rs6000/linux-unwind.h	2007-01-03 17:47:14.000000000 -0600
+++ gcc-core.bak/gcc/config/rs6000/linux-unwind.h	2014-07-04 18:15:48.935951119 -0500
@@ -188,6 +188,7 @@
 static long
 ppc_linux_aux_vector (long which)
 {
+#ifdef __GLIBC__
   /* __libc_stack_end holds the original stack passed to a process.  */
   extern long *__libc_stack_end;
   long argc;
@@ -212,6 +213,10 @@
     if (auxp->a_type == which)
       return auxp->a_val;
   return 0;
+#else
+  /* pretend we have everything, save it all */
+  return -1;
+#endif
 }
 
 /* Do code reading to identify a signal frame, and set the frame