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: Marek Benc
Subject: Re: [PATCH 4/4] gnu: gcc: Also substitute the dynamic linker name for GNU, (ie. Hurd) systems.
Date: Mon, 09 Feb 2015 18:24:27 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.4.0



On 02/08/2015 12:22 AM, Ludovic Courtès wrote:


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




Most probably yes, but the previous part of the code (which joins the lines defining a dynamic linker) will also need to be modified to take GNU_USER_DYNAMIC_LINKER into account, as the code also substitutes some entries in the linux.h files, which are usually multiline (most of the time, a CHOOSE_DYNAMIC_LINKER macro)...

Sorry, I'm way too weak of a schemer to do that, even though it's probably incredibly simple...



Thanks,
Ludo’.


--
Marek.



reply via email to

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