diff options
author | aszlig <aszlig@nix.build> | 2017-11-08 20:45:32 +0100 |
---|---|---|
committer | aszlig <aszlig@nix.build> | 2017-11-08 20:52:20 +0100 |
commit | a2045e029af174b37e4a2828b0e7febaf9559b14 (patch) | |
tree | 1cefa0294fbd5549d4382c54e7dce6d5d5e5e177 /pkgs/development/libraries | |
parent | 4cb8c5dc3c24f86476d21aab2e31862b8d5fba5f (diff) | |
download | nixlib-a2045e029af174b37e4a2828b0e7febaf9559b14.tar nixlib-a2045e029af174b37e4a2828b0e7febaf9559b14.tar.gz nixlib-a2045e029af174b37e4a2828b0e7febaf9559b14.tar.bz2 nixlib-a2045e029af174b37e4a2828b0e7febaf9559b14.tar.lz nixlib-a2045e029af174b37e4a2828b0e7febaf9559b14.tar.xz nixlib-a2045e029af174b37e4a2828b0e7febaf9559b14.tar.zst nixlib-a2045e029af174b37e4a2828b0e7febaf9559b14.zip |
libstdc++5: Add patch to fix type for ucontext_t
Since glibc 2.26, struct ucontext no longer exists but is wrapped in a typedef ucontext_t. This is basically a backport of the patch to gcc version 4.5 which was introduced by @vcunat in f04b64c1e97fcacf6a6272de5a0562ced97db436. Building against x86_64-linux and i686-linux now succeeds. Signed-off-by: aszlig <aszlig@nix.build> Cc: @abbradar
Diffstat (limited to 'pkgs/development/libraries')
-rw-r--r-- | pkgs/development/libraries/libstdc++5/default.nix | 2 | ||||
-rw-r--r-- | pkgs/development/libraries/libstdc++5/struct-ucontext.patch | 61 |
2 files changed, 63 insertions, 0 deletions
diff --git a/pkgs/development/libraries/libstdc++5/default.nix b/pkgs/development/libraries/libstdc++5/default.nix index abe0538b8a9c..baea981ca4a1 100644 --- a/pkgs/development/libraries/libstdc++5/default.nix +++ b/pkgs/development/libraries/libstdc++5/default.nix @@ -29,6 +29,8 @@ stdenv.mkDerivation rec { sha256 = "11m5lc51b0addhc4yq4rz0dwpv6k73rrj73wya3lqdk8rly6cjpm"; addPrefixes = true; }) + # Required because of glibc 2.26 + ./struct-ucontext.patch ]; postPatch = '' diff --git a/pkgs/development/libraries/libstdc++5/struct-ucontext.patch b/pkgs/development/libraries/libstdc++5/struct-ucontext.patch new file mode 100644 index 000000000000..5462e0e33ecd --- /dev/null +++ b/pkgs/development/libraries/libstdc++5/struct-ucontext.patch @@ -0,0 +1,61 @@ +diff --git a/gcc/config/alpha/linux.h b/gcc/config/alpha/linux.h +index 3a2940c..67f9899 100644 +--- a/gcc/config/alpha/linux.h ++++ b/gcc/config/alpha/linux.h +@@ -89,7 +89,7 @@ Boston, MA 02111-1307, USA. */ + { \ + struct rt_sigframe { \ + struct siginfo info; \ +- struct ucontext uc; \ ++ ucontext_t uc; \ + } *rt_ = (CONTEXT)->cfa; \ + sc_ = &rt_->uc.uc_mcontext; \ + } \ +diff --git a/gcc/config/i386/linux.h b/gcc/config/i386/linux.h +index e86ab3d..30797a7 100644 +--- a/gcc/config/i386/linux.h ++++ b/gcc/config/i386/linux.h +@@ -260,7 +260,7 @@ Boston, MA 02111-1307, USA. */ + siginfo_t *pinfo; \ + void *puc; \ + siginfo_t info; \ +- struct ucontext uc; \ ++ ucontext_t uc; \ + } *rt_ = (CONTEXT)->cfa; \ + sc_ = (struct sigcontext *) &rt_->uc.uc_mcontext; \ + } \ +diff --git a/gcc/config/i386/linux64.h b/gcc/config/i386/linux64.h +index fbfaa58..200c8dc 100644 +--- a/gcc/config/i386/linux64.h ++++ b/gcc/config/i386/linux64.h +@@ -112,7 +112,7 @@ Boston, MA 02111-1307, USA. */ + if (*(unsigned char *)(pc_+0) == 0x48 \ + && *(unsigned long *)(pc_+1) == 0x050f0000000fc0c7) \ + { \ +- struct ucontext *uc_ = (CONTEXT)->cfa; \ ++ ucontext_t *uc_ = (CONTEXT)->cfa; \ + sc_ = (struct sigcontext *) &uc_->uc_mcontext; \ + } \ + else \ +@@ -182,7 +182,7 @@ Boston, MA 02111-1307, USA. */ + struct siginfo *pinfo; \ + void *puc; \ + struct siginfo info; \ +- struct ucontext uc; \ ++ ucontext_t uc; \ + } *rt_ = (CONTEXT)->cfa; \ + sc_ = (struct sigcontext *) &rt_->uc.uc_mcontext; \ + } \ +diff --git a/gcc/config/rs6000/linux.h b/gcc/config/rs6000/linux.h +index ba70ec1..0fff8b1 100644 +--- a/gcc/config/rs6000/linux.h ++++ b/gcc/config/rs6000/linux.h +@@ -101,7 +101,7 @@ Boston, MA 02111-1307, USA. */ + + struct kernel_old_ucontext { + unsigned long uc_flags; +- struct ucontext *uc_link; ++ ucontext_t *uc_link; + stack_t uc_stack; + struct sigcontext_struct uc_mcontext; + sigset_t uc_sigmask; |