From: Rich Felker <dalias@aerifal.cx>
To: musl@lists.openwall.com
Subject: Re: New gcc wrapper to try
Date: Sat, 21 Apr 2012 16:37:51 -0400 [thread overview]
Message-ID: <20120421203751.GG14673@brightrain.aerifal.cx> (raw)
In-Reply-To: <20120421064933.GF14673@brightrain.aerifal.cx>
[-- Attachment #1: Type: text/plain, Size: 128 bytes --]
Here's an updated version which fixes some issues with the previous
(wrong crtbegin/end files when -shared is used, etc.)
Rich
[-- Attachment #2: musl-gcc.new --]
[-- Type: text/plain, Size: 935 bytes --]
#!/bin/sh
libc_prefix="/usr/local/musl"
ldso_pathname="/lib/ld-musl-i386.so.1"
gcc=gcc
libc_lib=$libc_prefix/lib
libc_inc=$libc_prefix/include
libc_crt="$libc_lib/crt1.o"
libc_start="$libc_lib/crti.o"
libc_end="$libc_lib/crtn.o"
tmp_specs=$HOME/.specs.tmp.$$
printf '
%%rename cpp_options old_cpp_options
*cpp_options:
-nostdinc -isystem %s %%(old_cpp_options)
*cc1:
%%(cc1_cpu) -nostdinc -isystem %s
*link_libgcc:
-L%s
*libgcc:
libgcc.a%%s %%:if-exists(libgcc_eh.a%%s)
*startfile:
%%{!shared: %s} %s %%{shared|pie:crtbeginS.o%%s;:crtbegin.o%%s}
*endfile:
%%{shared|pie:crtendS.o%%s;:crtend.o%%s} %s
%%rename link old_link
*link:
%%(old_link) -dynamic-linker %s -nostdlib
*esp_link:
*esp_options:
*esp_cpp_options:
' \
"$libc_inc" "$libc_inc" "$libc_lib" "$libc_crt" "$libc_start" "$libc_end" "$ldso_pathname" > "$tmp_specs" || exit 1
exec 3<"$tmp_specs"
rm -f "$tmp_specs"
exec "$gcc" -specs=/proc/self/fd/3 "$@"
next prev parent reply other threads:[~2012-04-21 20:37 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-21 6:49 Rich Felker
2012-04-21 20:37 ` Rich Felker [this message]
2012-04-23 5:57 ` Isaac Dunham
2012-04-23 9:19 ` Rich Felker
2012-04-24 19:28 ` Isaac Dunham
2012-04-24 19:45 ` Isaac Dunham
2012-04-24 21:28 ` Solar Designer
2012-04-24 21:41 ` Rich Felker
2012-04-24 22:10 ` Rich Felker
2012-04-24 22:14 ` Solar Designer
2012-04-24 23:53 ` Szabolcs Nagy
2012-04-25 1:21 ` Solar Designer
2012-04-21 22:45 ` Isaac Dunham
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=20120421203751.GG14673@brightrain.aerifal.cx \
--to=dalias@aerifal.cx \
--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).