replace ghc-configure-c99.patch with upstream patch
https://fedoraproject.org/wiki/Changes/PortingToModernC
This commit is contained in:
parent
2a8e5b4268
commit
a028d88f6f
43
9394.patch
Normal file
43
9394.patch
Normal file
@ -0,0 +1,43 @@
|
||||
From 480b5d6440bbbd0b89dabdb2dc957333056aa2a7 Mon Sep 17 00:00:00 2001
|
||||
From: Florian Weimer <fweimer@redhat.com>
|
||||
Date: Tue, 22 Nov 2022 15:23:50 +0100
|
||||
Subject: [PATCH] m4/fp_leading_underscore.m4: Avoid implicit exit function
|
||||
declaration
|
||||
|
||||
And switch to a new-style function definition.
|
||||
|
||||
Fixes build issues with compilers that do not accept implicit function
|
||||
declarations.
|
||||
---
|
||||
m4/fp_leading_underscore.m4 | 10 ++++------
|
||||
1 file changed, 4 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/m4/fp_leading_underscore.m4 b/m4/fp_leading_underscore.m4
|
||||
index fde57c7625d..939cee3b69f 100644
|
||||
--- a/m4/fp_leading_underscore.m4
|
||||
+++ b/m4/fp_leading_underscore.m4
|
||||
@@ -32,17 +32,15 @@ struct nlist xYzzY1[] = {{"xYzzY1", 0},{0}};
|
||||
struct nlist xYzzY2[] = {{"_xYzzY2", 0},{0}};
|
||||
#endif
|
||||
|
||||
-int main(argc, argv)
|
||||
-int argc;
|
||||
-char **argv;
|
||||
+int main(int argc, char **argv)
|
||||
{
|
||||
#if defined(HAVE_NLIST_H)
|
||||
if(nlist(argv[0], xYzzY1) == 0 && xYzzY1[0].n_value != 0)
|
||||
- exit(1);
|
||||
+ return 1;
|
||||
if(nlist(argv[0], xYzzY2) == 0 && xYzzY2[0].n_value != 0)
|
||||
- exit(0);
|
||||
+ return 0;
|
||||
#endif
|
||||
- exit(1);
|
||||
+ return 1;
|
||||
}]])],[fptools_cv_leading_underscore=yes],[fptools_cv_leading_underscore=no],[fptools_cv_leading_underscore=no])
|
||||
;;
|
||||
esac]);
|
||||
--
|
||||
GitLab
|
||||
|
@ -1,68 +0,0 @@
|
||||
Submitted upstream:
|
||||
|
||||
<https://gitlab.haskell.org/ghc/ghc/-/merge_requests/9394>
|
||||
|
||||
From 6b218717ac85d6dc9104f470cac0b4fb594104f4 Mon Sep 17 00:00:00 2001
|
||||
From: Florian Weimer <fweimer@redhat.com>
|
||||
Date: Tue, 22 Nov 2022 15:23:50 +0100
|
||||
Subject: [PATCH] m4/fp_leading_underscore.m4: Avoid implicit exit function
|
||||
declaration
|
||||
Content-type: text/plain
|
||||
|
||||
And switch to a new-style function definition.
|
||||
|
||||
Fixes build issues with compilers that do not accept implicit function
|
||||
declarations.
|
||||
|
||||
diff -ur ghc-8.10.7.orig/aclocal.m4 ghc-8.10.7/aclocal.m4
|
||||
--- ghc-8.10.7.orig/aclocal.m4 2021-06-29 09:24:51.000000000 +0200
|
||||
+++ ghc-8.10.7/aclocal.m4 2023-01-12 12:48:11.461019327 +0100
|
||||
@@ -966,17 +966,15 @@
|
||||
struct nlist xYzzY2[] = {{"_xYzzY2", 0},{0}};
|
||||
#endif
|
||||
|
||||
-int main(argc, argv)
|
||||
-int argc;
|
||||
-char **argv;
|
||||
+int main(int argc, char **argv)
|
||||
{
|
||||
#if defined(HAVE_NLIST_H)
|
||||
if(nlist(argv[0], xYzzY1) == 0 && xYzzY1[0].n_value != 0)
|
||||
- exit(1);
|
||||
+ return 1;
|
||||
if(nlist(argv[0], xYzzY2) == 0 && xYzzY2[0].n_value != 0)
|
||||
- exit(0);
|
||||
+ return 0;
|
||||
#endif
|
||||
- exit(1);
|
||||
+ return 1;
|
||||
}]])],[fptools_cv_leading_underscore=yes],[fptools_cv_leading_underscore=no],[fptools_cv_leading_underscore=no])
|
||||
;;
|
||||
esac]);
|
||||
Only in ghc-8.10.7: aclocal.m4.orig
|
||||
diff -ur ghc-8.10.7.orig/configure ghc-8.10.7/configure
|
||||
--- ghc-8.10.7.orig/configure 2021-08-26 19:15:31.000000000 +0200
|
||||
+++ ghc-8.10.7/configure 2023-01-12 12:48:23.461897380 +0100
|
||||
@@ -15709,17 +15709,15 @@
|
||||
struct nlist xYzzY2[] = {{"_xYzzY2", 0},{0}};
|
||||
#endif
|
||||
|
||||
-int main(argc, argv)
|
||||
-int argc;
|
||||
-char **argv;
|
||||
+int main(int argc, char **argv)
|
||||
{
|
||||
#if defined(HAVE_NLIST_H)
|
||||
if(nlist(argv[0], xYzzY1) == 0 && xYzzY1[0].n_value != 0)
|
||||
- exit(1);
|
||||
+ return 1;
|
||||
if(nlist(argv[0], xYzzY2) == 0 && xYzzY2[0].n_value != 0)
|
||||
- exit(0);
|
||||
+ return 0;
|
||||
#endif
|
||||
- exit(1);
|
||||
+ return 1;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_run "$LINENO"
|
||||
Only in ghc-8.10.7: configure.orig
|
5
ghc.spec
5
ghc.spec
@ -114,8 +114,9 @@ Patch3: ghc-gen_contents_index-nodocs.patch
|
||||
# DerivedConstants.h not produced atomically
|
||||
Patch10: https://gitlab.haskell.org/ghc/ghc/-/commit/9aace0eaf6279f17368a1753b65afbdc466e8291.patch
|
||||
|
||||
Patch11: ghc-configure-c99.patch
|
||||
|
||||
# https://fedoraproject.org/wiki/Toolchain/PortingToModernC
|
||||
# https://gitlab.haskell.org/ghc/ghc/-/merge_requests/9394
|
||||
Patch11: https://gitlab.haskell.org/ghc/ghc/-/merge_requests/9394.patch
|
||||
|
||||
# armv7hl patches
|
||||
Patch12: ghc-armv7-VFPv3D16--NEON.patch
|
||||
|
Loading…
Reference in New Issue
Block a user