From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/743 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: New gcc wrapper to try Date: Sat, 21 Apr 2012 16:37:51 -0400 Message-ID: <20120421203751.GG14673@brightrain.aerifal.cx> References: <20120421064933.GF14673@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="z6Eq5LdranGa6ru8" X-Trace: dough.gmane.org 1335040515 17736 80.91.229.3 (21 Apr 2012 20:35:15 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 21 Apr 2012 20:35:15 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-744-gllmg-musl=m.gmane.org@lists.openwall.com Sat Apr 21 22:35:14 2012 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1SLh1W-0001Wa-9v for gllmg-musl@plane.gmane.org; Sat, 21 Apr 2012 22:35:14 +0200 Original-Received: (qmail 20016 invoked by uid 550); 21 Apr 2012 20:35:13 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 20008 invoked from network); 21 Apr 2012 20:35:12 -0000 Content-Disposition: inline In-Reply-To: <20120421064933.GF14673@brightrain.aerifal.cx> User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:743 Archived-At: --z6Eq5LdranGa6ru8 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Here's an updated version which fixes some issues with the previous (wrong crtbegin/end files when -shared is used, etc.) Rich --z6Eq5LdranGa6ru8 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="musl-gcc.new" #!/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 "$@" --z6Eq5LdranGa6ru8--