gnu: gcc: Properly set the dynamic linker file name on GNU/Hurd.

* gnu/packages/gcc.scm (gcc-4.7)[arguments]: In 'pre-configure' phase,
match 'GNU_USER_DYNAMIC_LINKER' in addition to 'GLIBC_DYNAMIC_LINKER'.
This fixes GNU/Hurd cross-compilation as reported at
<https://lists.gnu.org/archive/html/guix-devel/2017-01/msg01731.html>.
master
Ludovic Courtès 2017-01-22 13:11:45 +01:00
parent c8b44fc107
commit 33ae7d4385
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 6 additions and 5 deletions

View File

@ -205,17 +205,18 @@ where the OS part is overloaded to denote a specific ABI---into GCC
(for-each (for-each
(lambda (x) (lambda (x)
(substitute* (find-files "gcc/config" (substitute* (find-files "gcc/config"
"^linux(64|-elf|-eabi)?\\.h$") "^(linux|gnu|sysv4)(64|-elf|-eabi)?\\.h$")
(("(#define GLIBC_DYNAMIC_LINKER.*)\\\\\n$" _ line) (("(#define (GLIBC|GNU_USER)_DYNAMIC_LINKER.*)\\\\\n$" _ line)
line))) line)))
'(1 2 3)) '(1 2 3))
;; Fix the dynamic linker's file name. ;; Fix the dynamic linker's file name.
(substitute* (find-files "gcc/config" (substitute* (find-files "gcc/config"
"^(linux|gnu|sysv4)(64|-elf|-eabi)?\\.h$") "^(linux|gnu|sysv4)(64|-elf|-eabi)?\\.h$")
(("#define GLIBC_DYNAMIC_LINKER([^ ]*).*$" _ suffix) (("#define (GLIBC|GNU_USER)_DYNAMIC_LINKER([^ ]*).*$"
(format #f "#define GLIBC_DYNAMIC_LINKER~a \"~a\"~%" _ gnu-user suffix)
suffix (format #f "#define ~a_DYNAMIC_LINKER~a \"~a\"~%"
gnu-user suffix
(string-append libc ,(glibc-dynamic-linker))))) (string-append libc ,(glibc-dynamic-linker)))))
;; Tell where to find libstdc++, libc, and `?crt*.o', except ;; Tell where to find libstdc++, libc, and `?crt*.o', except