summary refs log tree commit diff
path: root/gnu/packages
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2016-11-10 21:51:32 +0100
committerLudovic Courtès <ludo@gnu.org>2016-11-11 00:23:16 +0100
commit2c5ab05bffe5f89092ef60c3743b3941dcf92af0 (patch)
tree8044ab42e8654a6e59c721fdb657b7b0c9c07e6d /gnu/packages
parentaba5182c6954cecec92807bfc60207c417fcc5dc (diff)
downloadguix-2c5ab05bffe5f89092ef60c3743b3941dcf92af0.tar.gz
gnu: wordnet: Build with gcc@6 to prevent chunked literal strings.
* gnu/packages/wordnet.scm (wordnet)[arguments]: Remove
-fno-builtin-strcpy.
[native-inputs]: New field.
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/wordnet.scm24
1 files changed, 8 insertions, 16 deletions
diff --git a/gnu/packages/wordnet.scm b/gnu/packages/wordnet.scm
index 357c19351b..42076645c4 100644
--- a/gnu/packages/wordnet.scm
+++ b/gnu/packages/wordnet.scm
@@ -23,6 +23,7 @@
   #:use-module (guix licenses)
   #:use-module (guix download)
   #:use-module (gnu packages)
+  #:use-module (gnu packages gcc)
   #:use-module (gnu packages tcl))
 
 (define-public wordnet
@@ -51,22 +52,7 @@
 
                                ;; Provide the `result' field in `Tcl_Interp'.
                                ;; See <https://bugs.gentoo.org/show_bug.cgi?id=452034>.
-                               ;;
-                               ;; The 'DEFAULTPATH' string literal, which
-                               ;; contains the output path, only appears as
-                               ;; the operand of one 'strcpy' call.  As a
-                               ;; consequence, GCC does not store the string
-                               ;; literal as is but instead introduces "gaps"
-                               ;; for alignment reasons presumably---like
-                               ;; "/gnu/sto?????re/8jp8b??????ky105…".  This
-                               ;; makes this string invisible to the GC, which
-                               ;; in turns causes problems when running a
-                               ;; grafted WordNet because that grafted WordNet
-                               ;; keeps referring to the ungrafted variant,
-                               ;; which is not protected from GC.  Thus,
-                               ;; disable use of '__builtin_strcpy' to avoid
-                               ;; that.
-                               "CFLAGS=-DUSE_INTERP_RESULT -O2 -fno-builtin-strcpy")
+                               "CFLAGS=-DUSE_INTERP_RESULT -O2")
        #:phases
        (modify-phases %standard-phases
          (add-after 'install 'post-install
@@ -93,6 +79,12 @@
                #t))))))
     (outputs '("out"
                "tk"))                             ; for the Tcl/Tk GUI
+
+    ;; Build with a patched GCC to work around <http://bugs.gnu.org/24703>.
+    ;; (Specifically the 'DEFAULTPATH' string literal is what we want to
+    ;; prevent from being chunked so that grafting can "see" it and patch it.)
+    (native-inputs `(("gcc@6" ,gcc-6)))
+
     (inputs `(("tk" ,tk)
               ("tcl" ,tcl)))
     (home-page "http://wordnet.princeton.edu/")