* [PATCH 4/4] gnu: gcc: Also substitute the dynamic linker name for GNU, (ie. Hurd) systems.
@ 2015-02-05 16:32 Marek Benc
2015-02-07 23:22 ` Ludovic Courtès
0 siblings, 1 reply; 6+ messages in thread
From: Marek Benc @ 2015-02-05 16:32 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: guix-devel
[-- Attachment #1: Type: text/plain, Size: 194 bytes --]
In the gcc package, the system-dependent paths to the dynamic linker get
substituted before building, but only for Linux systems. This patch adds
the substitution for GNU systems.
--
Marek.
[-- Attachment #2: git-patch-4.patch --]
[-- Type: text/x-patch, Size: 1346 bytes --]
From 7ae53fd611dd78a8c185734dad268428a8b931a8 Mon Sep 17 00:00:00 2001
From: Marek Benc <dusxmt@gmx.com>
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"
--
2.2.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 4/4] gnu: gcc: Also substitute the dynamic linker name for GNU, (ie. Hurd) systems.
2015-02-05 16:32 [PATCH 4/4] gnu: gcc: Also substitute the dynamic linker name for GNU, (ie. Hurd) systems Marek Benc
@ 2015-02-07 23:22 ` Ludovic Courtès
2015-02-09 17:24 ` Marek Benc
0 siblings, 1 reply; 6+ messages in thread
From: Ludovic Courtès @ 2015-02-07 23:22 UTC (permalink / raw)
To: Marek Benc; +Cc: guix-devel
[-- Attachment #1: Type: text/plain, Size: 1480 bytes --]
Marek Benc <dusxmt@gmx.com> skribis:
> From 7ae53fd611dd78a8c185734dad268428a8b931a8 Mon Sep 17 00:00:00 2001
> From: Marek Benc <dusxmt@gmx.com>
> 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:
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 1051 bytes --]
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
[-- Attachment #3: Type: text/plain, Size: 21 bytes --]
Thanks,
Ludo’.
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 4/4] gnu: gcc: Also substitute the dynamic linker name for GNU, (ie. Hurd) systems.
2015-02-07 23:22 ` Ludovic Courtès
@ 2015-02-09 17:24 ` Marek Benc
2015-02-10 16:27 ` Ludovic Courtès
0 siblings, 1 reply; 6+ messages in thread
From: Marek Benc @ 2015-02-09 17:24 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: guix-devel
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.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 4/4] gnu: gcc: Also substitute the dynamic linker name for GNU, (ie. Hurd) systems.
2015-02-09 17:24 ` Marek Benc
@ 2015-02-10 16:27 ` Ludovic Courtès
2015-03-10 8:40 ` Manolis Ragkousis
0 siblings, 1 reply; 6+ messages in thread
From: Ludovic Courtès @ 2015-02-10 16:27 UTC (permalink / raw)
To: Marek Benc; +Cc: guix-devel
Marek Benc <dusxmt@gmx.com> skribis:
> 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)...
Hmm OK, maybe that’s a good reason to keep it the way you did, then.
OK to push your initial patch to wip-hurd, with commit log lines wrapped
to 80 chars.
Thank you!
Ludo’.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-03-10 12:43 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-05 16:32 [PATCH 4/4] gnu: gcc: Also substitute the dynamic linker name for GNU, (ie. Hurd) systems Marek Benc
2015-02-07 23:22 ` Ludovic Courtès
2015-02-09 17:24 ` Marek Benc
2015-02-10 16:27 ` Ludovic Courtès
2015-03-10 8:40 ` Manolis Ragkousis
2015-03-10 12:43 ` Ludovic Courtès
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.