guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch core-updates-frozen updated: gnu: openjdk: Fix compiling with gcc


From: guix-commits
Subject: branch core-updates-frozen updated: gnu: openjdk: Fix compiling with gcc 10.
Date: Sat, 18 Sep 2021 05:57:57 -0400

This is an automated email from the git hooks/post-receive script.

glv pushed a commit to branch core-updates-frozen
in repository guix.

The following commit(s) were added to refs/heads/core-updates-frozen by this 
push:
     new c3892d4  gnu: openjdk: Fix compiling with gcc 10.
c3892d4 is described below

commit c3892d4ffb0fc52d5a6a503f358f06768a7636e8
Author: Guillaume Le Vaillant <glv@posteo.net>
AuthorDate: Sat Sep 18 11:06:10 2021 +0200

    gnu: openjdk: Fix compiling with gcc 10.
    
    * gnu/packages/java.scm (openjdk9, openjdk10, openjdk11)[arguments]: Add
      '-fcommon', '-fno-delete-null-pointer-checks' and '-fno-lifetime-dse'
      to CFLAGS.
---
 gnu/packages/java.scm | 29 +++++++++++++++++++----------
 1 file changed, 19 insertions(+), 10 deletions(-)

diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index 9b0beaa..7358aff 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -60,7 +60,6 @@
   #:use-module (gnu packages elf)
   #:use-module (gnu packages fontutils)
   #:use-module (gnu packages gawk)
-  #:use-module (gnu packages gcc)
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages gl)
   #:use-module (gnu packages ghostscript) ;lcms
@@ -1962,8 +1961,12 @@ new Date();"))
            (lambda* (#:key inputs outputs #:allow-other-keys)
              ;; TODO: unbundle libpng and lcms
              (invoke "bash" "./configure"
-                     "--with-extra-cflags=-fcommon"
-                     (string-append "--with-freetype=" (assoc-ref inputs 
"freetype"))
+                     ;; Add flags for compilation with gcc >= 10
+                     ,(string-append "--with-extra-cflags=-fcommon"
+                                     " -fno-delete-null-pointer-checks"
+                                     " -fno-lifetime-dse")
+                     (string-append "--with-freetype="
+                                    (assoc-ref inputs "freetype"))
                      "--disable-freetype-bundling"
                      "--disable-warnings-as-errors"
                      "--disable-hotspot-gtest"
@@ -2091,8 +2094,7 @@ new Date();"))
        ("libxt" ,libxt)
        ("libxtst" ,libxtst)))
     (native-inputs
-     `(("gcc" ,gcc-9) ; FIXME: segmentation faults when using gcc-10.
-       ("icedtea-8" ,icedtea-8)
+     `(("icedtea-8" ,icedtea-8)
        ("icedtea-8:jdk" ,icedtea-8 "jdk")
        ;; XXX: The build system fails with newer versions of GNU Make.
        ("make@4.2" ,gnu-make-4.2)
@@ -2138,8 +2140,12 @@ new Date();"))
            (replace 'configure
              (lambda* (#:key inputs outputs #:allow-other-keys)
                (invoke "bash" "./configure"
-                       "--with-extra-cflags=-fcommon"
-                       (string-append "--with-freetype=" (assoc-ref inputs 
"freetype"))
+                       ;; Add flags for compilation with gcc >= 10
+                       ,(string-append "--with-extra-cflags=-fcommon"
+                                       " -fno-delete-null-pointer-checks"
+                                       " -fno-lifetime-dse")
+                       (string-append "--with-freetype="
+                                      (assoc-ref inputs "freetype"))
                        "--disable-freetype-bundling"
                        "--disable-warnings-as-errors"
                        "--disable-hotspot-gtest"
@@ -2157,8 +2163,7 @@ new Date();"))
         `(,(gexp-input openjdk9)
           ,(gexp-input openjdk9 "jdk")))))
     (native-inputs
-     `(("gcc" ,gcc-9) ; FIXME: segmentation faults when using gcc-10.
-       ("openjdk9" ,openjdk9)
+     `(("openjdk9" ,openjdk9)
        ("openjdk9:jdk" ,openjdk9 "jdk")
        ("make@4.2" ,gnu-make-4.2)
        ("unzip" ,unzip)
@@ -2193,7 +2198,11 @@ new Date();"))
        #:tests? #f; requires jtreg
        ;; TODO package jtreg
        #:configure-flags
-       `("--disable-option-checking" ; --enable-fast-install default flag 
errors otherwise
+       `(;; Add flags for compilation with gcc >= 10
+         ,(string-append "--with-extra-cflags=-fcommon"
+                         " -fno-delete-null-pointer-checks"
+                         " -fno-lifetime-dse")
+         "--disable-option-checking" ; --enable-fast-install default flag 
errors otherwise
          "--disable-warnings-as-errors"
          ;; make validate-runpath pass, see: 
http://issues.guix.info/issue/32894
          "--with-native-debug-symbols=zipped"



reply via email to

[Prev in Thread] Current Thread [Next in Thread]