diff --git a/ghc-configure-c99.patch b/ghc-configure-c99.patch new file mode 100644 index 0000000..03fa3e7 --- /dev/null +++ b/ghc-configure-c99.patch @@ -0,0 +1,68 @@ +Submitted upstream: + + + +From 6b218717ac85d6dc9104f470cac0b4fb594104f4 Mon Sep 17 00:00:00 2001 +From: Florian Weimer +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 diff --git a/ghc.spec b/ghc.spec index f441227..624df70 100644 --- a/ghc.spec +++ b/ghc.spec @@ -57,7 +57,7 @@ Version: 8.10.7 # - release can only be reset if *all* library versions get bumped simultaneously # (sometimes after a major release) # - minor release numbers for a branch should be incremented monotonically -Release: 122%{?dist} +Release: 123%{?dist} Summary: Glasgow Haskell Compiler License: BSD and HaskellReport @@ -99,6 +99,8 @@ Patch18: Disable-unboxed-arrays.patch Patch24: buildpath-abi-stability.patch Patch26: no-missing-haddock-file-warning.patch +Patch27: ghc-configure-c99.patch + # fedora ghc has been bootstrapped on # %%{ix86} x86_64 ppc ppc64 armv7hl s390 s390x ppc64le aarch64 # and retired arches: alpha sparcv9 armv5tel @@ -363,6 +365,8 @@ rm -r libffi-tarballs %patch24 -p1 -b .orig %patch26 -p1 -b .orig +%patch27 -p1 + %if %{with haddock} %global gen_contents_index gen_contents_index.orig if [ ! -f "libraries/%{gen_contents_index}" ]; then @@ -686,6 +690,9 @@ env -C %{ghc_html_libraries_dir} ./gen_contents_index %changelog +* Thu Jan 12 2023 Florian Weimer - 8.10.7-123 +- Port configure script to C99 + * Fri Jan 6 2023 Jens Petersen - 8.10.7-122 - obsoletes ghc8.10 - use llvm 12 (for ARM)