From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/742 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: New gcc wrapper to try Date: Sat, 21 Apr 2012 02:49:33 -0400 Message-ID: <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="9amGYk9869ThD9tj" X-Trace: dough.gmane.org 1334990819 27864 80.91.229.3 (21 Apr 2012 06:46:59 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 21 Apr 2012 06:46:59 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-743-gllmg-musl=m.gmane.org@lists.openwall.com Sat Apr 21 08:46:58 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 1SLU5y-0007T7-6B for gllmg-musl@plane.gmane.org; Sat, 21 Apr 2012 08:46:58 +0200 Original-Received: (qmail 15935 invoked by uid 550); 21 Apr 2012 06:46:57 -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 15926 invoked from network); 21 Apr 2012 06:46:56 -0000 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:742 Archived-At: --9amGYk9869ThD9tj Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, Here's the latest draft of a new concept for the musl-gcc gcc wrapper. It's almost entirely gcc specfile-based. If it works well, I intend to move even more of what it does into the specfile, and instead of generating the specfile at runtime each time it's run, just have it generated at build time and installed with musl. Please let me know how it works. (You'll need to edit the first couple lines to set the paths/arch if you don't use the defaults.) Rich --9amGYk9869ThD9tj 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 ' *link_libgcc: -L%s *libgcc: libgcc.a%%s %%:if-exists(libgcc_eh.a%%s) *cc1: %%(cc1_cpu) *startfile: %%{!shared: %s} %s crtbegin.o%%s *endfile: crtend.o%%s %s *esp_link: *esp_options: *esp_cpp_options: ' \ "$libc_lib" "$libc_crt" "$libc_start" "$libc_end" > "$tmp_specs" || exit 1 exec 3<"$tmp_specs" rm -f "$tmp_specs" exec "$gcc" -specs=/proc/self/fd/3 -nostdinc -isystem "$libc_inc" \ "$@" -Wl,-dynamic-linker,"$ldso_pathname" -Wl,-nostdlib --9amGYk9869ThD9tj--