From 4b19be30aa626b327c885dae62c559ec0e9fb935 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 13 Oct 2019 22:19:36 +0100 Subject: gentoo resync : 13.10.2019 --- dev-lang/ghc/files/ghc-8.6.5-numa.patch | 22 ++++++++++++ dev-lang/ghc/files/ghc-8.8.1-no-alex.patch | 33 +++++++++++++++++ dev-lang/ghc/files/ghc-8.8.1-revert-CPP.patch | 52 +++++++++++++++++++++++++++ 3 files changed, 107 insertions(+) create mode 100644 dev-lang/ghc/files/ghc-8.6.5-numa.patch create mode 100644 dev-lang/ghc/files/ghc-8.8.1-no-alex.patch create mode 100644 dev-lang/ghc/files/ghc-8.8.1-revert-CPP.patch (limited to 'dev-lang/ghc/files') diff --git a/dev-lang/ghc/files/ghc-8.6.5-numa.patch b/dev-lang/ghc/files/ghc-8.6.5-numa.patch new file mode 100644 index 000000000000..61c6cfdbfb13 --- /dev/null +++ b/dev-lang/ghc/files/ghc-8.6.5-numa.patch @@ -0,0 +1,22 @@ +Disable automagic NUMA linking. + +Reported-by: Sergey Alirzaev +Bug: https://github.com/gentoo-haskell/gentoo-haskell/issues/955 +--- a/configure.ac ++++ b/configure.ac +@@ -1264,10 +1264,14 @@ dnl ** Have libnuma? + dnl -------------------------------------------------------------- + HaveLibNuma=0 + AC_CHECK_HEADERS([numa.h numaif.h]) +- + if test "$ac_cv_header_numa_h$ac_cv_header_numaif_h" = "yesyes" ; then + AC_CHECK_LIB(numa, numa_available,HaveLibNuma=1) + fi ++AC_ARG_ENABLE(numa, ++ [AC_HELP_STRING([--enable-numa], ++ [Enable NUMA thread balancing support in the runtime system via numactl's libnuma [default=auto]])]) ++AS_IF([test "x$enable_numa" = "xno"], [HaveLibNuma=0]) ++ + AC_DEFINE_UNQUOTED([HAVE_LIBNUMA], [$HaveLibNuma], [Define to 1 if you have libnuma]) + if test $HaveLibNuma = "1" ; then + AC_SUBST([CabalHaveLibNuma],[True]) diff --git a/dev-lang/ghc/files/ghc-8.8.1-no-alex.patch b/dev-lang/ghc/files/ghc-8.8.1-no-alex.patch new file mode 100644 index 000000000000..39b6eeedd566 --- /dev/null +++ b/dev-lang/ghc/files/ghc-8.8.1-no-alex.patch @@ -0,0 +1,33 @@ +https://github.com/gentoo-haskell/gentoo-haskell/issues/959 + +From 144abba394c6a23eb877fbde727111a5e75b9d47 Mon Sep 17 00:00:00 2001 +From: Ben Gamari +Date: Wed, 18 Sep 2019 23:50:20 -0400 +Subject: [PATCH] configure: Don't depend upon alex in source dist build + +This fixes #16860 by verifying that the generated sources don't already +exist before asserting that the `alex` executable was found. This +replicates the logic already used for `happy` in the case of `alex`. +--- + aclocal.m4 | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +--- a/aclocal.m4 ++++ b/aclocal.m4 +@@ -984,8 +984,11 @@ else + fi; + changequote([, ])dnl + ]) +-FP_COMPARE_VERSIONS([$fptools_cv_alex_version],[-lt],[3.1.7], +- [AC_MSG_ERROR([Alex version 3.1.7 or later is required to compile GHC.])])[] ++if test ! -f compiler/parser/Lexer.hs ++then ++ FP_COMPARE_VERSIONS([$fptools_cv_alex_version],[-lt],[3.1.7], ++ [AC_MSG_ERROR([Alex version 3.1.7 or later is required to compile GHC.])])[] ++fi + AlexVersion=$fptools_cv_alex_version; + AC_SUBST(AlexVersion) + ]) +-- +2.23.0 + diff --git a/dev-lang/ghc/files/ghc-8.8.1-revert-CPP.patch b/dev-lang/ghc/files/ghc-8.8.1-revert-CPP.patch new file mode 100644 index 000000000000..8535cf09ef34 --- /dev/null +++ b/dev-lang/ghc/files/ghc-8.8.1-revert-CPP.patch @@ -0,0 +1,52 @@ +Don't pass CPP options. Otherwise ghc-8.8.1 can't build itself. +Eventually ghc will fix it's headers at propagate defines. + +https://gitlab.haskell.org/ghc/ghc/commit/cfd3e0f1cfd16c8f35cae139d2a871a32eb4d2e1 +https://gitlab.haskell.org/ghc/ghc/issues/17146 + +--- a/compiler/main/DriverPipeline.hs ++++ b/compiler/main/DriverPipeline.hs +@@ -1190,6 +1190,9 @@ runPhase (RealPhase Cmm) input_fn dflags + ----------------------------------------------------------------------------- + -- Cc phase + ++-- we don't support preprocessing .c files (with -E) now. Doing so introduces ++-- way too many hacks, and I can't say I've ever used it anyway. ++ + runPhase (RealPhase cc_phase) input_fn dflags + | any (cc_phase `eqPhase`) [Cc, Ccxx, HCc, Cobjc, Cobjcxx] + = do +@@ -1211,16 +1214,6 @@ runPhase (RealPhase cc_phase) input_fn dflags + (includePathsQuote cmdline_include_paths) + let include_paths = include_paths_quote ++ include_paths_global + +- -- pass -D or -optP to preprocessor when compiling foreign C files +- -- (#16737). Doing it in this way is simpler and also enable the C +- -- compiler to performs preprocessing and parsing in a single pass, +- -- but it may introduce inconsistency if a different pgm_P is specified. +- let more_preprocessor_opts = concat +- [ ["-Xpreprocessor", i] +- | not hcc +- , i <- getOpts dflags opt_P +- ] +- + let gcc_extra_viac_flags = extraGccViaCFlags dflags + let pic_c_flags = picCCOpts dflags + +@@ -1230,7 +1223,7 @@ runPhase (RealPhase cc_phase) input_fn dflags + -- hc code doesn't not #include any header files anyway, so these + -- options aren't necessary. + pkg_extra_cc_opts <- liftIO $ +- if hcc ++ if cc_phase `eqPhase` HCc + then return [] + else getPackageExtraCcOpts dflags pkgs + +@@ -1312,7 +1305,6 @@ runPhase (RealPhase cc_phase) input_fn dflags + ++ [ "-include", ghcVersionH ] + ++ framework_paths + ++ include_paths +- ++ more_preprocessor_opts + ++ pkg_extra_cc_opts + )) + -- cgit v1.2.3