From: Mathieu Othacehe <m.othacehe@gmail.com>
To: Carl Dong <contact@carldong.me>
Cc: 37999@debbugs.gnu.org
Subject: bug#37999: clang fails to pickup/supply startfiles to ld
Date: Thu, 31 Oct 2019 15:11:48 +0100 [thread overview]
Message-ID: <87eeyt57iz.fsf@gmail.com> (raw)
In-Reply-To: <Sd73K7LzzAVpx0fKP0RyHiRZDZkEn2OG_--HUojZlbEvw72daMUNJxRRrmt0Cs1rnmUVhbYev_csXRhjGUX7dLCHUpRcAnePfJPQBi3g2Xw=@carldong.me>
[-- Attachment #1: Type: text/plain, Size: 74 bytes --]
This patch is a bit more viable that the previous one I think.
Mathieu
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-clang-from-llvm-Fix-set-glibc-file-names-phase.patch --]
[-- Type: text/x-diff, Size: 2229 bytes --]
From f126146880e3904f39728313dfc10288b51fc23a Mon Sep 17 00:00:00 2001
From: Mathieu Othacehe <m.othacehe@gmail.com>
Date: Thu, 31 Oct 2019 15:05:54 +0100
Subject: [PATCH] gnu: clang-from-llvm: Fix set-glibc-file-names phase.
* gnu/packages/llvm.scm (clang-from-llvm)[arguments]: Turn case on major
version into a cond, so that newer versions of clang have the same behaviour as
version 6 and 7.
---
gnu/packages/llvm.scm | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm
index 9a42d4fe07..850f05b9bf 100644
--- a/gnu/packages/llvm.scm
+++ b/gnu/packages/llvm.scm
@@ -201,10 +201,12 @@ compiler. In LLVM this library is called \"compiler-rt\".")
'unpack 'set-glibc-file-names
(lambda* (#:key inputs #:allow-other-keys)
(let ((libc (assoc-ref inputs "libc"))
- (compiler-rt (assoc-ref inputs "clang-runtime")))
- (case (string->number ,(version-major
- (package-version clang-runtime)))
- ((or 6 7)
+ (compiler-rt (assoc-ref inputs "clang-runtime"))
+ (version
+ (string->number
+ ,(version-major (package-version clang-runtime)))))
+ (cond
+ ((> version 3)
;; Link to libclang_rt files from clang-runtime.
(substitute* "lib/Driver/ToolChain.cpp"
(("getDriver\\(\\)\\.ResourceDir")
@@ -220,7 +222,7 @@ compiler. In LLVM this library is called \"compiler-rt\".")
;; allow crt1.o & co. to be found.
(("@GLIBC_LIBDIR@")
(string-append libc "/lib"))))
- ((3)
+ (else
(substitute* "lib/Driver/Tools.cpp"
;; Patch the 'getLinuxDynamicLinker' function so that
;; it uses the right dynamic linker file name.
--
2.23.0
next prev parent reply other threads:[~2019-10-31 14:12 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-30 20:48 bug#37999: clang fails to pickup/supply startfiles to ld Carl Dong
2019-10-31 7:55 ` Mathieu Othacehe
2019-10-31 13:16 ` Bengt Richter
2019-10-31 14:11 ` Mathieu Othacehe [this message]
2019-10-31 22:57 ` Marius Bakke
2019-11-04 20:31 ` Carl Dong
2019-11-05 7:55 ` Mathieu Othacehe
2019-11-07 16:23 ` Danny Milosavljevic
2019-11-16 14:31 ` Mathieu Othacehe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87eeyt57iz.fsf@gmail.com \
--to=m.othacehe@gmail.com \
--cc=37999@debbugs.gnu.org \
--cc=contact@carldong.me \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).