diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2018-06-16 05:02:38 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2018-06-16 05:02:38 +0100 |
commit | f1bc537f089cc8477a9a18db597cb349e1b00e91 (patch) | |
tree | c48eb730c43e5f35729fabbe5cb4bfbe4a1bc794 /dev-lang/ghc/files | |
parent | cb3e8c6af7661fbcafdcacc7e0ecdfb610d098fa (diff) |
gentoo resync : 16.06.2018
Diffstat (limited to 'dev-lang/ghc/files')
-rw-r--r-- | dev-lang/ghc/files/ghc-8.0.2-binutils-2.30.patch | 65 | ||||
-rw-r--r-- | dev-lang/ghc/files/ghc-8.0.2-no-relax-everywhere.patch | 17 | ||||
-rw-r--r-- | dev-lang/ghc/files/ghc-8.4.2-allow-cross-bootstrap.patch | 23 |
3 files changed, 105 insertions, 0 deletions
diff --git a/dev-lang/ghc/files/ghc-8.0.2-binutils-2.30.patch b/dev-lang/ghc/files/ghc-8.0.2-binutils-2.30.patch new file mode 100644 index 000000000000..f02cb238c6b9 --- /dev/null +++ b/dev-lang/ghc/files/ghc-8.0.2-binutils-2.30.patch @@ -0,0 +1,65 @@ +From 358b508051333882d4099acca8f269e6fb2b7d65 Mon Sep 17 00:00:00 2001 +From: Bertram Felgenhauer <int-e@gmx.de> +Date: Thu, 3 May 2018 18:03:53 +0300 +Subject: [PATCH] Compute DW_FORM_block length correctly; also fixes #15068 + +Before this patch, the pprUnwindwExpr function computed the length of +by the following assembly fragment: + + .uleb128 1f-.-1 + <expression data> +1: + +That is, to compute the length, it takes the difference of the label 1 +and the address of the .uleb128 directive, and subtracts 1. + +In #15068 it was reported that `as` from binutils 4.30 has trouble with +evaluating the `.` part of the expression. However, there is actually a +problem with the expression, if the length of the data ever becomes +larger than 128: In that case, the .uleb128 directive will emit more +than 1 byte, and the computed length will be wrong. + +The present patch changes the assembly fragment to use two labels, +which fixes both these problems. + + .uleb128 2f-1f +1: + <expression data> +2: + +Test Plan: validate + +Reviewers: bgamari, osa1 + +Reviewed By: bgamari + +Subscribers: thomie, carter + +GHC Trac Issues: #15068 + +Differential Revision: https://phabricator.haskell.org/D4654 +--- + compiler/nativeGen/Dwarf/Types.hs | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/compiler/nativeGen/Dwarf/Types.hs b/compiler/nativeGen/Dwarf/Types.hs +index 23a2c920e7..579ed0d256 100644 +--- a/compiler/nativeGen/Dwarf/Types.hs ++++ b/compiler/nativeGen/Dwarf/Types.hs +@@ -492,9 +492,11 @@ pprUnwindExpr spIsCFA expr + pprE (UwPlus u1 u2) = pprE u1 $$ pprE u2 $$ pprByte dW_OP_plus + pprE (UwMinus u1 u2) = pprE u1 $$ pprE u2 $$ pprByte dW_OP_minus + pprE (UwTimes u1 u2) = pprE u1 $$ pprE u2 $$ pprByte dW_OP_mul +- in text "\t.uleb128 1f-.-1" $$ -- DW_FORM_block length ++ in text "\t.uleb128 2f-1f" $$ -- DW_FORM_block length ++ -- computed as the difference of the following local labels 2: and 1: ++ text "1:" $$ + pprE expr $$ +- text "1:" ++ text "2:" + + -- | Generate code for re-setting the unwind information for a + -- register to @undefined@ +-- +2.17.0 + diff --git a/dev-lang/ghc/files/ghc-8.0.2-no-relax-everywhere.patch b/dev-lang/ghc/files/ghc-8.0.2-no-relax-everywhere.patch new file mode 100644 index 000000000000..d6cff3373801 --- /dev/null +++ b/dev-lang/ghc/files/ghc-8.0.2-no-relax-everywhere.patch @@ -0,0 +1,17 @@ +https://github.com/gentoo-haskell/gentoo-haskell/issues/704 + +Allow users to specify -W,--relax externally and pass +-Wl,-no-relax unconditonally on all arches. + +Reported-by: wmyrda +diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs +index acd0d61..5830517 100644 +--- a/compiler/main/DriverPipeline.hs ++++ b/compiler/main/DriverPipeline.hs +@@ -2172,5 +2172,3 @@ joinObjectFiles dflags o_files output_fn = do + -- disable --relax explicitly. +- ++ (if platformArch (targetPlatform dflags) +- `elem` [ArchSPARC, ArchSPARC64] +- && ldIsGnuLd ++ ++ (if ldIsGnuLd + then [SysTools.Option "-Wl,-no-relax"] diff --git a/dev-lang/ghc/files/ghc-8.4.2-allow-cross-bootstrap.patch b/dev-lang/ghc/files/ghc-8.4.2-allow-cross-bootstrap.patch new file mode 100644 index 000000000000..071d4970a25b --- /dev/null +++ b/dev-lang/ghc/files/ghc-8.4.2-allow-cross-bootstrap.patch @@ -0,0 +1,23 @@ +Allow using cross-compilers to bootstrap GHC. + +In my case I'm using "cross"-compiler from +x86_64-unknown-linux to x86_64-HEAD-linux. + +Those targets have the same ABI and can boot one another. +diff --git a/configure.ac b/configure.ac +index a8b8681a36..791367e8bf 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -228,11 +228,11 @@ FPTOOLS_SET_PLATFORM_VARS + if test "$BuildPlatform" != "$bootstrap_target" + then + echo "This GHC (${WithGhc}) does not generate code for the build platform" + echo " GHC target platform : $bootstrap_target" + echo " Desired build platform : $BuildPlatform" +- exit 1 ++ #exit 1 + fi + + # Testing if we shall enable shared libs support on Solaris. + # Anything older than SunOS 5.11 aka Solaris 11 (Express) is broken. + |