[Top][All Lists]

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

Re: Dealing with non-ASCII file names in BOOTSTRAP-ORIGIN

From: Marius Bakke
Subject: Re: Dealing with non-ASCII file names in BOOTSTRAP-ORIGIN
Date: Tue, 19 Jul 2022 22:56:17 +0200

Greg Hogan <> skriver:

> On the off chance that the following is helpful, in order to switch
> the build to GCC 11 or 12 I had to apply the patch (with the missing
> endif) from
> You may have avoided or worked around this issue, but even though a
> different fix from the ticket was patched into our GCC 11.3 and 12.1,
> these would not bootstrap for me without that patch.

Neat.  Do you have a patch submitted to the tracker already?  Did you
also find a solution to the file name problem?

I took a slightly different route to work around the libstdc++ bootstrap
issue (see bottom hunk):

--8<---------------cut here---------------start------------->8---
               (add-after 'unpack 'apply-patches-and-snippet
                 (lambda* (#:key inputs #:allow-other-keys)
                   (let ((patch1 (assoc-ref inputs "patch1"))
                         (patch2 (assoc-ref inputs "patch2"))
                         (libstdc++ (assoc-ref inputs "libstdc++")))

                     ;; Apply the patch inputs added below.
                     (for-each (lambda (patch)
                                 (invoke "patch" "-p1" "--input" patch
                               (list patch1 patch2))

                     ;; Apply the gcc-canadian-cross-objdump snippet.
                     (substitute* "libcc1/configure"
                       (("\\$gcc_cv_objdump -T")
                        "$OBJDUMP_FOR_TARGET -T"))

                     ;; Fix a regression in GCC 11 where the libstc++ input
                     ;; shadows glibc headers when building libstdc++.  An
                     ;; upstream fix was added in GCC 11.3.0, but it only
                     ;; hides system include directories, not those on
                     ;; CPLUS_INCLUDE_PATH.  See discussion at
                     ;; <>.
                     (substitute* "libstdc++-v3/src/c++17/"
                       (("^AM_CXXFLAGS = ")
                        (string-append "CPLUS_INCLUDE_PATH = "
                                        (remove (cut string-prefix? libstdc++ 
                                                 (getenv "CPLUS_INCLUDE_PATH")
                                       "\nAM_CXXFLAGS = "))))))))
--8<---------------cut here---------------end--------------->8---

It's not pretty, but does the job!  I won't push it right away though,
waiting for feedback and checking that things generally work first.


Attachment: signature.asc
Description: PGP signature

reply via email to

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