[Git][haskell-team/DHG_packages][experimental] 2 commits: ghc: Backport upstream commit ec9aacf3eb2 (add -latomic to ghc-prim)
Ilias Tsitsimpis
gitlab at salsa.debian.org
Tue Sep 18 15:29:14 BST 2018
Ilias Tsitsimpis pushed to branch experimental at Debian Haskell Group / DHG_packages
Commits:
b0a20146 by Ilias Tsitsimpis at 2018-09-18T11:27:05Z
ghc: Backport upstream commit ec9aacf3eb2 (add -latomic to ghc-prim)
- - - - -
e29b92f5 by Ilias Tsitsimpis at 2018-09-18T11:30:49Z
ghc: Use system's default ld (ld.bfd) on sparc64, instead of ld.gold
- - - - -
4 changed files:
- p/ghc/debian/changelog
- + p/ghc/debian/patches/add_-latomic_to_ghc-prim
- p/ghc/debian/patches/series
- p/ghc/debian/rules
Changes:
=====================================
p/ghc/debian/changelog
=====================================
@@ -1,3 +1,11 @@
+ghc (8.4.3-7) experimental; urgency=medium
+
+ * Backport upstream commit ec9aacf3eb2 (add -latomic to ghc-prim)
+ * Use system's default ld (ld.bfd) on sparc64, instead of ld.gold
+ (Closes: #908998)
+
+ -- Ilias Tsitsimpis <iliastsi at debian.org> Tue, 18 Sep 2018 14:30:06 +0300
+
ghc (8.4.3-6) experimental; urgency=medium
[ Gianfranco Costamagna ]
=====================================
p/ghc/debian/patches/add_-latomic_to_ghc-prim
=====================================
@@ -0,0 +1,128 @@
+commit ec9aacf3eb2975fd302609163aaef429962ecd87
+Author: Moritz Angermann <moritz.angermann at gmail.com>
+Date: Thu Feb 8 16:07:07 2018 +0800
+
+ adds -latomic to. ghc-prim
+
+ Reviewers: bgamari, hvr
+
+ Reviewed By: bgamari
+
+ Subscribers: erikd, hvr, rwbarton, thomie, carter
+
+ Differential Revision: https://phabricator.haskell.org/D4378
+
+ iliastsi: The original patch fails to correctly detect and use C11
+ atomics, so I modified it based on https://phabricator.haskell.org/D5154.
+
+Index: b/aclocal.m4
+===================================================================
+--- a/aclocal.m4
++++ b/aclocal.m4
+@@ -1284,24 +1284,6 @@ AC_SUBST(GccIsClang)
+ rm -f conftest.txt
+ ])
+
+-# FP_GCC_SUPPORTS__ATOMICS
+-# ------------------------
+-# Does gcc support the __atomic_* family of builtins?
+-AC_DEFUN([FP_GCC_SUPPORTS__ATOMICS],
+-[
+- AC_REQUIRE([AC_PROG_CC])
+- AC_MSG_CHECKING([whether GCC supports __atomic_ builtins])
+- echo 'int test(int *x) { int y; __atomic_load(&x, &y, __ATOMIC_SEQ_CST); return x; }' > conftest.c
+- if $CC -c conftest.c > /dev/null 2>&1; then
+- CONF_GCC_SUPPORTS__ATOMICS=YES
+- AC_MSG_RESULT([yes])
+- else
+- CONF_GCC_SUPPORTS__ATOMICS=NO
+- AC_MSG_RESULT([no])
+- fi
+- rm -f conftest.c conftest.o
+-])
+-
+ # FP_GCC_SUPPORTS_NO_PIE
+ # ----------------------
+ # Does gcc support the -no-pie option? If so we should pass it to gcc when
+Index: b/configure.ac
+===================================================================
+--- a/configure.ac
++++ b/configure.ac
+@@ -714,11 +714,6 @@ FP_GCC_VERSION
+ dnl ** See whether gcc supports -no-pie
+ FP_GCC_SUPPORTS_NO_PIE
+
+-dnl ** Used to determine how to compile ghc-prim's atomics.c, used by
+-dnl unregisterised, Sparc, and PPC backends.
+-FP_GCC_SUPPORTS__ATOMICS
+-AC_DEFINE([HAVE_C11_ATOMICS], [$CONF_GCC_SUPPORTS__ATOMICS], [Does GCC support __atomic primitives?])
+-
+ FP_GCC_EXTRA_FLAGS
+
+ dnl ** look to see if we have a C compiler using an llvm back end.
+Index: b/libraries/ghc-prim/Setup.hs
+===================================================================
+--- a/libraries/ghc-prim/Setup.hs
++++ b/libraries/ghc-prim/Setup.hs
+@@ -18,7 +18,7 @@ import System.Exit
+ import System.Directory
+
+ main :: IO ()
+-main = do let hooks = simpleUserHooks {
++main = do let hooks = autoconfUserHooks {
+ regHook = addPrimModule
+ $ regHook simpleUserHooks,
+ buildHook = build_primitive_sources
+Index: b/libraries/ghc-prim/aclocal.m4
+===================================================================
+--- /dev/null
++++ b/libraries/ghc-prim/aclocal.m4
+@@ -0,0 +1,17 @@
++# FP_GCC_SUPPORTS__ATOMICS
++# ------------------------
++# Does gcc support the __atomic_* family of builtins?
++AC_DEFUN([FP_GCC_SUPPORTS__ATOMICS],
++[
++ AC_REQUIRE([AC_PROG_CC])
++ AC_MSG_CHECKING([whether GCC supports __atomic_ builtins])
++ echo 'int test(int *x) { int y; __atomic_load(x, &y, __ATOMIC_SEQ_CST); return y; }' > conftest.c
++ if $CC -c conftest.c > /dev/null 2>&1; then
++ CONF_GCC_SUPPORTS__ATOMICS=YES
++ AC_MSG_RESULT([yes])
++ else
++ CONF_GCC_SUPPORTS__ATOMICS=NO
++ AC_MSG_RESULT([no])
++ fi
++ rm -f conftest.c conftest.o
++])
+Index: b/libraries/ghc-prim/configure.ac
+===================================================================
+--- /dev/null
++++ b/libraries/ghc-prim/configure.ac
+@@ -0,0 +1,18 @@
++AC_INIT([ghc-prim package], [2.1], [glasgow-haskell-bugs at haskell.org], [ghc-prim])
++
++AC_CONFIG_SRCDIR([ghc-prim.cabal])
++
++# -------------------------------------------------------------------------
++dnl ** Used to determine how to compile ghc-prim's atomics.c, used by
++dnl unregisterised, Sparc, and PPC backends.
++FP_GCC_SUPPORTS__ATOMICS
++AC_DEFINE([HAVE_C11_ATOMICS], [$CONF_GCC_SUPPORTS__ATOMICS], [Does GCC support __atomic primitives?])
++
++if test "$CONF_GCC_SUPPORTS__ATOMICS" = "YES"
++then PRIM_CFLAGS=-DHAVE_C11_ATOMICS
++ PRIM_EXTRA_LIBRARIES=atomic
++fi
++AC_SUBST([PRIM_CFLAGS])
++AC_SUBST([PRIM_EXTRA_LIBRARIES])
++AC_CONFIG_FILES([ghc-prim.buildinfo])
++AC_OUTPUT
+Index: b/libraries/ghc-prim/ghc-prim.buildinfo.in
+===================================================================
+--- /dev/null
++++ b/libraries/ghc-prim/ghc-prim.buildinfo.in
+@@ -0,0 +1,2 @@
++cc-options: @PRIM_CFLAGS@
++extra-libraries: @PRIM_EXTRA_LIBRARIES@
+\ No newline at end of file
=====================================
p/ghc/debian/patches/series
=====================================
@@ -12,3 +12,4 @@ e175aaf6918bb2b497b83618dc4c270a0d231a1c.patch
risc-support.patch
armel-revert-ghci-fixes.patch
fix-build-using-unregisterized-v8.2
+add_-latomic_to_ghc-prim
=====================================
p/ghc/debian/rules
=====================================
@@ -49,7 +49,8 @@ endif
# NOTE: This should probably be removed, and revert back to using ld.gold,
# once #901947 has been fixed.
# Do the same for powerpcspe, due to https://bugs.debian.org/904915
-ifneq (,$(filter mips mipsel powerpcspe, $(DEB_HOST_ARCH)))
+# Do the same for sparc64, due to https://bugs.debian.org/908998
+ifneq (,$(filter mips mipsel powerpcspe sparc64, $(DEB_HOST_ARCH)))
EXTRA_CONFIGURE_FLAGS += --disable-ld-override
endif
View it on GitLab: https://salsa.debian.org/haskell-team/DHG_packages/compare/d211bc014c70e7c4b0a061b6a9e49bea2c1cb17e...e29b92f5a3ac07b1baa9031f9b3e152bcc4de3fe
--
View it on GitLab: https://salsa.debian.org/haskell-team/DHG_packages/compare/d211bc014c70e7c4b0a061b6a9e49bea2c1cb17e...e29b92f5a3ac07b1baa9031f9b3e152bcc4de3fe
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-haskell-commits/attachments/20180918/7bc749cb/attachment-0001.html>
More information about the Pkg-haskell-commits
mailing list