#9 Fix generated C for Modern C Initiative
Merged 2 months ago by petersen. Opened 2 months ago by rjones.
rpms/ rjones/ghc ghc-modern-c-fix  into  rawhide

file added
+11
@@ -0,0 +1,11 @@ 

+ --- a/compiler/GHC/HsToCore/Foreign/Decl.hs

+ +++ b/compiler/GHC/HsToCore/Foreign/Decl.hs

+ @@ -560,7 +560,7 @@ mkFExportCBits dflags c_nm maybe_target arg_htys res_hty is_IO_res_ty cc

+       ,   ppUnless res_hty_is_unit $

+           if libffi

+                    then char '*' <> parens (ffi_cResType <> char '*') <>

+ -                       text "resp = cret;"

+ +                       text "resp = " <> parens ffi_cResType <> text "cret;"

+                    else text "return cret;"

+       , rbrace

+       ]

file modified
+11 -1
@@ -87,7 +87,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: 139%{?dist}

+ Release: 140%{?dist}

  Summary: Glasgow Haskell Compiler

  

  License: BSD-3-Clause AND HaskellReport
@@ -153,6 +153,10 @@ 

  # Upstream in >= 9.9.

  Patch41: https://gitlab.haskell.org/ghc/ghc/-/commit/dd38aca95ac25adc9888083669b32ff551151259.patch

  

+ # https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/SKVM4NSFZRWUT5MJKBS6IRUXCG3SCD34/

+ # https://gitlab.haskell.org/ghc/ghc/-/merge_requests/12079

+ Patch42: ghc-modern-c-fix.txt

+ 

  # https://gitlab.haskell.org/ghc/ghc/-/wikis/platforms

  

  # fedora ghc has been bootstrapped on
@@ -486,6 +490,9 @@ 

  %patch -P41 -p1 -b .orig

  %endif

  

+ #Modern C fix

+ %patch -P42 -p1 -b .orig

+ 

  %if %{with haddock} && %{without hadrian}

  %global gen_contents_index gen_contents_index.orig

  if [ ! -f "libraries/%{gen_contents_index}" ]; then
@@ -1029,6 +1036,9 @@ 

  

  

  %changelog

+ * Thu Feb 15 2024 Richard W.M. Jones <rjones@redhat.com> - 9.4.5-140

+ - Fix generated C for Modern C Initiative

+ 

  * Wed Jan 24 2024 Fedora Release Engineering <releng@fedoraproject.org> - 9.4.5-139

  - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild

  

no initial comment

Patch submitted upstream here:
https://gitlab.haskell.org/ghc/ghc/-/merge_requests/12079

Note this bug only affects aarch64, ppc64le and s390x (not x86).

This was my earlier scratch build containing this patch, which I also used to test it on aarch64:
https://koji.fedoraproject.org/koji/taskinfo?taskID=113542584

Pull-Request has been merged by petersen

2 months ago
Metadata