diff --git a/ghc-modern-c-fix.patch b/ghc-modern-c-fix.patch new file mode 100644 index 0000000..70f31ca --- /dev/null +++ b/ghc-modern-c-fix.patch @@ -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 + ] diff --git a/ghc-modern-c-fix.txt b/ghc-modern-c-fix.txt deleted file mode 100644 index 70f31ca..0000000 --- a/ghc-modern-c-fix.txt +++ /dev/null @@ -1,11 +0,0 @@ ---- 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 - ] diff --git a/ghc.spec b/ghc.spec index 4eb9afc..9777315 100644 --- a/ghc.spec +++ b/ghc.spec @@ -155,7 +155,7 @@ Patch41: https://gitlab.haskell.org/ghc/ghc/-/commit/dd38aca95ac25adc9888083669b # 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 +Patch42: ghc-modern-c-fix.patch # https://gitlab.haskell.org/ghc/ghc/-/wikis/platforms