Subject: [bug#50517] [PATCH core-updates-frozen] gnu: psm: Fix building with GCC 10.

From: Felix Gruber <[email-masked]>
Date: Sat, 11 Sep 2021 08:46:34 +0000

* gnu/packages/linux.scm (psm)[arguments]: Pass '-fcommon' to CFLAGS.
I had to copy all the CFLAGS that were originally defined by the
Makefile as they were otherwise all replaced by '-fcommon'.
---
 gnu/packages/linux.scm | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 1305a80f56..122c2773fb 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -56,6 +56,7 @@
 ;;; Copyright © 2021 Maxime Devos <[email-masked]>
 ;;; Copyright © 2021 Guillaume Le Vaillant <[email-masked]>
 ;;; Copyright © 2021 Sarah Morgensen <[email-masked]>
+;;; Copyright © 2021 Felix Gruber <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -7256,6 +7257,11 @@ libraries, which are often integrated directly into libfabric.")
     (arguments
      '(#:make-flags `("PSM_USE_SYS_UUID=1" "CC=gcc" "WERROR="
                       ,(string-append "INSTALL_PREFIX=" %output)
+                      ,(string-append "CFLAGS=-Wall -fpic -fPIC -D_GNU_SOURCE"
+                                      " -funwind-tables -O3 -g3"
+                                      " -DPSM_USE_SYS_UUID"
+                                      " -Wno-strict-aliasing -DNVALGRIND"
+                                      " -fcommon")
                       ,(string-append "LDFLAGS=-Wl,-rpath=" %output "/lib"))
        #:tests? #f
        #:phases (modify-phases %standard-phases
-- 
2.30.2