From: Homo via Guix-patches via <guix-patches@gnu.org>
To: 74784@debbugs.gnu.org
Cc: Homo <gay@disroot.org>
Subject: [bug#74784] [PATCH] gnu: hugs: Fix build with GCC.
Date: Wed, 11 Dec 2024 12:26:36 +0200 [thread overview]
Message-ID: <20241211102636.20121-1-gay@disroot.org> (raw)
Change-Id: I6bbfb65e62d9a2b1a3c8b29eb386a24d6974eb45
---
gnu/packages/hugs.scm | 7 +++----
gnu/packages/patches/hugs-fix-build.patch | 21 +++++++++++++++++++++
2 files changed, 24 insertions(+), 4 deletions(-)
create mode 100644 gnu/packages/patches/hugs-fix-build.patch
diff --git a/gnu/packages/hugs.scm b/gnu/packages/hugs.scm
index c9915e4cd6..b6a97ea78c 100644
--- a/gnu/packages/hugs.scm
+++ b/gnu/packages/hugs.scm
@@ -23,7 +23,7 @@ (define-module (gnu packages hugs)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix build-system gnu)
- #:use-module (gnu packages gcc))
+ #:use-module (gnu packages))
(define-public hugs
(package
@@ -36,7 +36,8 @@ (define-public hugs
name "98-plus-" version ".tar.gz"))
(sha256
(base32
- "1mdy4aq4campgmnpc2qwq7bsbfhaxfsqdghbyyz2wms4lnfcmyma"))))
+ "1mdy4aq4campgmnpc2qwq7bsbfhaxfsqdghbyyz2wms4lnfcmyma"))
+ (patches (search-patches "hugs-fix-build.patch"))))
(build-system gnu-build-system)
(arguments
`(#:phases
@@ -71,8 +72,6 @@ (define-public hugs
(("/bin/cp") (which "cp")))
#t)))
#:tests? #f)) ; no test target
- ;; FIXME: Fails to build with GCC 5.
- (native-inputs (list gcc-4.9))
(home-page "https://www.haskell.org/hugs/")
(synopsis "Functional programming system based on Haskell 98")
(description
diff --git a/gnu/packages/patches/hugs-fix-build.patch b/gnu/packages/patches/hugs-fix-build.patch
new file mode 100644
index 0000000000..d41bec4d8b
--- /dev/null
+++ b/gnu/packages/patches/hugs-fix-build.patch
@@ -0,0 +1,21 @@
+diff --git a/packages/base/include/HsBase.h b/packages/base/include/HsBase.h
+index aa1a7fb..78d5b46 100644
+--- a/packages/base/include/HsBase.h
++++ b/packages/base/include/HsBase.h
+@@ -217,15 +217,7 @@ StgWord64 stg_integerToWord64 (StgInt sa, StgByteArray /* Really: mp_limb_t* */
+ when compiling to native code.
+ -------------------------------------------------------------------------- */
+
+-#ifndef INLINE
+-# if defined(_MSC_VER)
+-# define INLINE extern __inline
+-# elif defined(__GNUC__)
+-# define INLINE extern inline
+-# else
+-# define INLINE inline
+-# endif
+-#endif
++#define INLINE inline
+
+ INLINE int __hscore_get_errno(void) { return errno; }
+ INLINE void __hscore_set_errno(int e) { errno = e; }
--
2.46.0
reply other threads:[~2024-12-11 10:28 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241211102636.20121-1-gay@disroot.org \
--to=guix-patches@gnu.org \
--cc=74784@debbugs.gnu.org \
--cc=gay@disroot.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.