summary refs log tree commit diff
path: root/gnu/packages/gcc.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/gcc.scm')
-rw-r--r--gnu/packages/gcc.scm14
1 files changed, 11 insertions, 3 deletions
diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
index a784118dd6..96b82d5af7 100644
--- a/gnu/packages/gcc.scm
+++ b/gnu/packages/gcc.scm
@@ -65,8 +65,8 @@
         #:make-flags
         (let ((libc (assoc-ref %build-inputs "libc")))
           `(,@(if libc
-                  (list (string-append "LDFLAGS_FOR_BUILD="
-                                       "-L" libc "/lib "
+                  (list (string-append "LDFLAGS_FOR_TARGET="
+                                       "-B" libc "/lib "
                                        "-Wl,-dynamic-linker "
                                        "-Wl," libc
                                        ,(glibc-dynamic-linker)))
@@ -102,7 +102,7 @@
                   ;; RUNPATH to GCC even when `libgcc_s' is not NEEDED.
                   ;; There's not much that can be done to avoid it, though.
                   (format #f "#define LIB_SPEC \"-L~a/lib %{!static:-rpath=~a/lib \
-%{!static-libgcc:-rpath=~a/lib64 -rpath=~a/lib}} \" ~a~%"
+%{!static-libgcc:-rpath=~a/lib64 -rpath=~a/lib}} \" ~a"
                           libc libc out out suffix))
                  (("#define STARTFILE_SPEC.*$" line)
                   (format #f "#define STANDARD_STARTFILE_PREFIX_1 \"~a/lib\"
@@ -132,6 +132,14 @@
                                           "install"))))
                          %standard-phases)))))
 
+     (native-search-paths
+      (list (search-path-specification
+             (variable "CPATH")
+             (directories '("include")))
+            (search-path-specification
+             (variable "LIBRARY_PATH")
+             (directories '("lib" "lib64")))))
+
      (properties `((gcc-libc . ,(assoc-ref inputs "libc"))))
      (synopsis "GNU Compiler Collection")
      (description