From: Carl Dong <contact@carldong.me>
To: 53706@debbugs.gnu.org
Cc: Carl Dong <contact@carldong.me>
Subject: [bug#53706] [PATCH] gnu: Disable compressed debug sections for mingw-w64
Date: Tue, 1 Feb 2022 13:22:03 -0500 [thread overview]
Message-ID: <20220201182202.2300335-1-contact@carldong.me> (raw)
The newly introduced --enable-compressed-debug-section=all configure
flag in the base binutils package makes the mingw-w64 build system
unusable. For example:
$ guix build --target=x86_64-w64-mingw32 hello
and
$ guix build mingw-w64-x86_64-winpthreads
Will fail to build with an error:
"x86_64-w64-mingw32-ld: final link failed: bad value"
Turning off this flag seems to fix the problem, but perhaps it'd also be
worthwhile to investigate the root cause.
* gnu/packages/cross-base.scm (cross-binutils): When building for mingw
targets, append "--enable-compressed-debug-section=no" to configure
flags.
---
gnu/packages/cross-base.scm | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
index 78cbf871ac..529144d127 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -101,7 +101,16 @@ (define* (cross-binutils target #:optional (binutils binutils))
"ath9k-htc-firmware-binutils.patch")))
((target-mingw? target)
(package-with-extra-patches
- binutils
+ (package-with-extra-configure-variable
+ ;; mingw binutils does not work correctly when configured
+ ;; with `--enable-compressed-debug-sections`. An error
+ ;; like the following will occur whenever you try to link:
+ ;;
+ ;; x86_64-w64-mingw32-ld: final link failed: bad value
+ ;;
+ ;; TODO: This seems like a deeper problem that warrants
+ ;; deeper investigation.
+ binutils "--enable-compressed-debug-sections" "no")
(search-patches "binutils-mingw-w64-timestamp.patch"
"binutils-mingw-w64-deterministic.patch")))
(else binutils))
--
2.34.1
next reply other threads:[~2022-02-01 22:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-01 18:22 Carl Dong [this message]
2022-02-03 18:51 ` [bug#53706] [PATCH] gnu: Disable compressed debug sections for mingw-w64 Carl Dong
2022-02-06 4:59 ` Maxim Cournoyer
2022-02-07 21:40 ` bug#53706: Closing Carl Dong
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=20220201182202.2300335-1-contact@carldong.me \
--to=contact@carldong.me \
--cc=53706@debbugs.gnu.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.