guix-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 4/4] gnu: gcc: Also substitute the dynamic linker name for GN


From: Ludovic Courtès
Subject: Re: [PATCH 4/4] gnu: gcc: Also substitute the dynamic linker name for GNU, (ie. Hurd) systems.
Date: Sun, 08 Feb 2015 00:22:12 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

Marek Benc <address@hidden> skribis:

> From 7ae53fd611dd78a8c185734dad268428a8b931a8 Mon Sep 17 00:00:00 2001
> From: Marek Benc <address@hidden>
> Date: Thu, 5 Feb 2015 17:12:54 +0100
> Subject: [PATCH] gnu: gcc: Also substitute the dynamic linker name for GNU
>  (ie. Hurd) systems.
>
> * gnu/packages/gcc.scm (gcc-4.7): Also substitute the dynamic linker name for 
> GNU (ie. Hurd) systems.
>
> ---
>  gnu/packages/gcc.scm | 7 +++++++
>  1 file changed, 7 insertions(+)
>
> diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
> index 0260158..271d277 100644
> --- a/gnu/packages/gcc.scm
> +++ b/gnu/packages/gcc.scm
> @@ -186,6 +186,13 @@ where the OS part is overloaded to denote a specific 
> ABI---into GCC
>                             suffix
>                             (string-append libc ,(glibc-dynamic-linker)))))
>  
> +                (substitute* (find-files "gcc/config"
> +                                         "^gnu(64|-elf)?\\.h$")
> +                  (("#define GNU_USER_DYNAMIC_LINKER([^ ]*).*$" _ suffix)
> +                   (format #f "#define GNU_USER_DYNAMIC_LINKER~a \"~a\"~%"
> +                           suffix
> +                           (string-append libc ,(glibc-dynamic-linker)))))
> +
>                  ;; Tell where to find libstdc++, libc, and `?crt*.o', except
>                  ;; `crt{begin,end}.o', which come with GCC.
>                  (substitute* (find-files "gcc/config"

Would this slightly more concise approach work:

diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
index 6143f5b..5cb7f8b 100644
--- a/gnu/packages/gcc.scm
+++ b/gnu/packages/gcc.scm
@@ -202,10 +202,11 @@ where the OS part is overloaded to denote a specific 
ABI---into GCC
 
                 ;; Fix the dynamic linker's file name.
                 (substitute* (find-files "gcc/config"
-                                         "^linux(64|-elf|-eabi)?\\.h$")
-                  (("#define GLIBC_DYNAMIC_LINKER([^ ]*).*$" _ suffix)
-                   (format #f "#define GLIBC_DYNAMIC_LINKER~a \"~a\"~%"
-                           suffix
+                                         "^(gnu|linux)(64|-elf|-eabi)?\\.h$")
+                  (("#define (GLIBC|GNU_USER)_DYNAMIC_LINKER([^ ]*).*$" _
+                    kind suffix)
+                   (format #f "#define ~a_DYNAMIC_LINKER~a \"~a\"~%"
+                           kind suffix
                            (string-append libc ,(glibc-dynamic-linker)))))
 
                 ;; Tell where to find libstdc++, libc, and `?crt*.o', except
Thanks,
Ludo’.

reply via email to

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