From 686e37351f312e6b4e53efac7c1a2936024c7fc8acc8328a67862ae557a73a3b Mon Sep 17 00:00:00 2001 From: Peter Trommler Date: Sun, 15 Mar 2015 14:17:35 +0000 Subject: [PATCH] - add ghc-glibc-2.20_BSD_SOURCE.patch * fixes build on unregisterised architectures (openSUSE: ppc64le) OBS-URL: https://build.opensuse.org/package/show/devel:languages:haskell/ghc?expand=0&rev=164 --- ghc-glibc-2.20_BSD_SOURCE.patch | 26 ++++++++++++++++++++++++++ ghc.changes | 6 ++++++ ghc.spec | 5 ++++- 3 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 ghc-glibc-2.20_BSD_SOURCE.patch diff --git a/ghc-glibc-2.20_BSD_SOURCE.patch b/ghc-glibc-2.20_BSD_SOURCE.patch new file mode 100644 index 0000000..f6cc9d5 --- /dev/null +++ b/ghc-glibc-2.20_BSD_SOURCE.patch @@ -0,0 +1,26 @@ +From 7d738547049e686be4d90a19dcb9520418d5f72d Mon Sep 17 00:00:00 2001 +From: Jens Petersen +Date: Mon, 9 Jun 2014 15:48:41 +0900 +Subject: [PATCH] define _DEFAULT_SOURCE in Stg.h to avoid warnings from glibc + 2.20 (#9185) + +--- + includes/Stg.h | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/includes/Stg.h b/includes/Stg.h +index 1707c9b..fbcf643 100644 +--- a/includes/Stg.h ++++ b/includes/Stg.h +@@ -47,6 +47,8 @@ + // We need _BSD_SOURCE so that math.h defines things like gamma + // on Linux + # define _BSD_SOURCE ++// glibc 2.20 deprecates _BSD_SOURCE in favour of _DEFAULT_SOURCE ++# define _DEFAULT_SOURCE + #endif + + #if IN_STG_CODE == 0 || defined(llvm_CC_FLAVOR) +-- +1.9.3 + diff --git a/ghc.changes b/ghc.changes index 8a9107a..45218e0 100644 --- a/ghc.changes +++ b/ghc.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sun Mar 15 13:25:32 UTC 2015 - peter.trommler@ohm-hochschule.de + +- add ghc-glibc-2.20_BSD_SOURCE.patch +* fixes build on unregisterised architectures (openSUSE: ppc64le) + ------------------------------------------------------------------- Mon Feb 23 16:48:10 UTC 2015 - peter.trommler@ohm-hochschule.de diff --git a/ghc.spec b/ghc.spec index 6435d3d..71e5721 100644 --- a/ghc.spec +++ b/ghc.spec @@ -1,7 +1,7 @@ # # spec file for package ghc # -# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -71,6 +71,8 @@ Patch17: ghc.git-e18525f.patch Patch18: D560.patch # PATCH-FEATURE-UPSTREAM 0001-implement-native-code-generator-for-ppc64.patch peter.trommler@ohm-hochschule.de -- Implement native code generator for ppc64. Haskell Trac #9863. Patch19: 0001-implement-native-code-generator-for-ppc64.patch +# PATCH-FIX-UPSTREAM ghc-glibc-2.20_BSD_SOURCE.patch peter.trommler@ohm-hochschule.de -- Define _DEFAULT_SOURCE in Stg.h to avoid warnings from glibc. Fedora patch +Patch20: ghc-glibc-2.20_BSD_SOURCE.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -170,6 +172,7 @@ except the ghc library, which is installed by the toplevel ghc metapackage. %patch17 -p1 %patch18 -p1 %patch19 -p1 +%patch20 -p1 %build # Patch 19 modifies build system