From: Szabolcs Nagy <nsz@port70.net>
To: musl@lists.openwall.com
Subject: musl-gcc wrapper patch
Date: Wed, 11 Mar 2015 22:32:08 +0100 [thread overview]
Message-ID: <20150311213208.GS16260@port70.net> (raw)
[-- Attachment #1: Type: text/plain, Size: 283 bytes --]
i assume the most common expectation is that the installed
musl-gcc tool uses the same compiler as the musl build was
using
at least this is what i would want for cross compilation
i guess this breaks if relative path or multiple words were
used (cc with args) in $(CC)
comments?
[-- Attachment #2: 0001-fix-the-musl-gcc-wrapper-to-call-the-gcc-used-for-th.patch --]
[-- Type: text/x-diff, Size: 1130 bytes --]
From 081ea4fb4042ba5584a77f3ea492845fffa9a203 Mon Sep 17 00:00:00 2001
From: Szabolcs Nagy <nsz@port70.net>
Date: Wed, 11 Mar 2015 21:10:50 +0000
Subject: [PATCH] fix the musl-gcc wrapper to call the gcc used for the musl
build
In case of a cross build of musl, musl-gcc should call the cross
compiler by default so it is easy to use the wrapper for cross
compilation against the newly built libc.
The REALGCC option is still there if one needs to use a different gcc.
CC consisting of multiple words is not supported (eg CC='gcc -m32').
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 8cc3de8..c87ed1c 100644
--- a/Makefile
+++ b/Makefile
@@ -144,7 +144,7 @@ lib/musl-gcc.specs: tools/musl-gcc.specs.sh config.mak
sh $< "$(includedir)" "$(libdir)" "$(LDSO_PATHNAME)" > $@
tools/musl-gcc: config.mak
- printf '#!/bin/sh\nexec "$${REALGCC:-gcc}" "$$@" -specs "%s/musl-gcc.specs"\n' "$(libdir)" > $@
+ printf '#!/bin/sh\nexec "$${REALGCC:-%s}" "$$@" -specs "%s/musl-gcc.specs"\n' "$(CC)" "$(libdir)" > $@
chmod +x $@
$(DESTDIR)$(bindir)/%: tools/%
--
2.3.2
next reply other threads:[~2015-03-11 21:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-11 21:32 Szabolcs Nagy [this message]
2015-03-11 22:19 ` Rich Felker
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150311213208.GS16260@port70.net \
--to=nsz@port70.net \
--cc=musl@lists.openwall.com \
/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.vuxu.org/mirror/musl/
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 NNTP newsgroup(s).