emacs-bug-tracker
[Top][All Lists]
Advanced

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

bug#37924: closed ([PATCH] gnu: Fix make-gcc-libc)


From: GNU bug Tracking System
Subject: bug#37924: closed ([PATCH] gnu: Fix make-gcc-libc)
Date: Sat, 16 Nov 2019 16:37:02 +0000

Your message dated Sat, 16 Nov 2019 17:36:04 +0100
with message-id <address@hidden>
and subject line Re: [bug#37924] [PATCH] gnu: Fix make-gcc-libc
has caused the debbugs.gnu.org bug report #37924,
regarding [PATCH] gnu: Fix make-gcc-libc
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden.)


-- 
37924: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=37924
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: [PATCH] gnu: Fix make-gcc-libc Date: Fri, 25 Oct 2019 15:40:19 +0000
Reviewers, would like some insight into whether it's okay to remove the
FLAGS_FOR_TARGET. From what I can tell it comes from CROSS-GCC-ARGUMENTS in (gnu
packages cross-base) which might not be needed here since we're not
cross-building. I've tested this toolchain built without FLAGS_FOR_TARGET and it
_seems_ to work fine.

-----

Until now the following wouldn't build:
--8<---------------cut here---------------start------------->8---
(use-modules (gnu packages commencement)
             (gnu packages gcc)
             (gnu packages base))

(make-gcc-libc gcc-9 glibc-2.27)
--8<---------------cut here---------------end--------------->8---

* gnu/packages/base.scm (make-gcc-libc)[phases]: Add environment
variables to place the target libc on the system header search path.
[make-flags]: Remove unncessary FLAGS_FOR_TARGET.
[native-inputs]: Construct in a way that doesn't require emptying
inputs.
---
 gnu/packages/base.scm | 27 ++++++++++++++++-----------
 1 file changed, 16 insertions(+), 11 deletions(-)

diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index 4e80a2fadb..3a3360dc7a 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -981,18 +981,23 @@ with the Linux kernel.")
             (substitute-keyword-arguments
              (ensure-keyword-arguments (package-arguments base-gcc)
                                        '(#:implicit-inputs? #f))
-             ((#:make-flags flags)
-              `(let ((libc (assoc-ref %build-inputs "libc")))
-                 ;; FLAGS_FOR_TARGET are needed for the target libraries to 
receive
-                 ;; the -Bxxx for the startfiles.
-                 (cons (string-append "FLAGS_FOR_TARGET=-B" libc "/lib")
-                       ,flags)))))
+             ((#:phases phases)
+              `(modify-phases ,phases
+                 (add-before 'configure 'treat-glibc-as-system-header
+                   (lambda _
+                     (let ((libc (assoc-ref %build-inputs "libc")))
+                       ;; GCCs build processes requires that the libc
+                       ;; we're building against is on the system header
+                       ;; search path.
+                       (for-each (lambda (var)
+                                   (setenv var (string-append libc 
"/include")))
+                                 '("C_INCLUDE_PATH" "CPLUS_INCLUDE_PATH"))
+                       #t)))))))
            (native-inputs
-            `(("libc" ,libc)
-              ("libc:static" ,libc "static")
-              ,@(append (package-inputs base-gcc)
-                        (fold alist-delete (%final-inputs) '("libc" 
"libc:static")))))
-           (inputs '())))
+            `(,@(package-native-inputs base-gcc)
+              ,@(append (fold alist-delete (%final-inputs) '("libc" 
"libc:static")))
+              ("libc" ,libc)
+              ("libc:static" ,libc "static")))))

 (define-public (make-glibc-locales glibc)
   (package
--
2.23.0



--- End Message ---
--- Begin Message --- Subject: Re: [bug#37924] [PATCH] gnu: Fix make-gcc-libc Date: Sat, 16 Nov 2019 17:36:04 +0100 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)
Carl Dong <address@hidden> skribis:

> Until now the following wouldn't build:
>
> (use-modules (gnu packages commencement)
>              (gnu packages gcc)
>              (gnu packages base))
>
> (make-gcc-libc gcc-9 glibc-2.27)
>
> * gnu/packages/base.scm (make-gcc-libc)[phases]: Add environment
> variables to place the target libc on the system header search path.
> [make-flags]: Remove unncessary FLAGS_FOR_TARGET.
> [native-inputs]: Construct in a way that doesn't require emptying
> inputs.
> ---
>  gnu/packages/base.scm | 27 ++++++++++++++++-----------
>  1 file changed, 16 insertions(+), 11 deletions(-)

This was pushed as 2b1d708294f0aced5c991baed146e0ae4e7d63dd, closing!

Ludo’.


--- End Message ---

reply via email to

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