Skip to content

Commit 88fd3f8

Browse files
committed
guix: use -fcommon when building glibc 2.24
GCC 10 started using -fno-common by default, which causes issues with the powerpc builds using gibc 2.24. A patch was commited to glibc to fix the issue, 18363b4f010da9ba459b13310b113ac0647c2fcc but is non-trvial to backport, and was broken in at least one way, see the followup in commit 7650321ce037302bfc2f026aa19e0213b8d02fe6. For now, retain the legacy GCC behaviour by passing -fcommon when building glibc 2.24. https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html. https://sourceware.org/git/?p=glibc.git;a=commit;h=18363b4f010da9ba459b13310b113ac0647c2fcc https://sourceware.org/git/?p=glibc.git;a=commit;h=7650321ce037302bfc2f026aa19e0213b8d02fe6
1 parent 0e51913 commit 88fd3f8

File tree

2 files changed

+34
-1
lines changed

2 files changed

+34
-1
lines changed

contrib/guix/manifest.scm

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,8 @@ inspecting signatures in Mach-O binaries.")
537537
(patches (search-our-patches "glibc-ldd-x86_64.patch"
538538
"glibc-versioned-locpath.patch"
539539
"glibc-2.24-elfm-loadaddr-dynamic-rewrite.patch"
540-
"glibc-2.24-no-build-time-cxx-header-run.patch"))))))
540+
"glibc-2.24-no-build-time-cxx-header-run.patch"
541+
"glibc-2.24-fcommon.patch"))))))
541542

542543
(define-public glibc-2.27/bitcoin-patched
543544
(package
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
commit 264a4a0dbe1f4369db315080034b500bed66016c
2+
Author: fanquake <[email protected]>
3+
Date: Fri May 6 11:03:04 2022 +0100
4+
5+
build: use -fcommon to retain legacy behaviour with GCC 10
6+
7+
GCC 10 started using -fno-common by default, which causes issues with
8+
the powerpc builds using gibc 2.24. A patch was commited to glibc to fix
9+
the issue, 18363b4f010da9ba459b13310b113ac0647c2fcc but is non-trvial
10+
to backport, and was broken in at least one way, see the followup in
11+
commit 7650321ce037302bfc2f026aa19e0213b8d02fe6.
12+
13+
For now, retain the legacy GCC behaviour by passing -fcommon when
14+
building glibc.
15+
16+
https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html.
17+
https://sourceware.org/git/?p=glibc.git;a=commit;h=18363b4f010da9ba459b13310b113ac0647c2fcc
18+
https://sourceware.org/git/?p=glibc.git;a=commit;h=7650321ce037302bfc2f026aa19e0213b8d02fe6
19+
20+
diff --git a/Makeconfig b/Makeconfig
21+
index ee379f5852..63c4a2f234 100644
22+
--- a/Makeconfig
23+
+++ b/Makeconfig
24+
@@ -824,7 +824,7 @@ ifeq "$(strip $(+cflags))" ""
25+
+cflags := $(default_cflags)
26+
endif # $(+cflags) == ""
27+
28+
-+cflags += $(cflags-cpu) $(+gccwarn) $(+merge-constants) $(+math-flags)
29+
++cflags += $(cflags-cpu) $(+gccwarn) $(+merge-constants) $(+math-flags) -fcommon
30+
+gcc-nowarn := -w
31+
32+
# Don't duplicate options if we inherited variables from the parent.

0 commit comments

Comments
 (0)