path: root/tools/
diff options
authorRich Felker <>2012-04-22 14:32:49 -0400
committerRich Felker <>2012-04-22 14:32:49 -0400
commit58f430c1e0255c0b28aed1e9bf3d892c18c06631 (patch)
treee36e0e24a68603c42903e142260b37765491bf76 /tools/
parent02eb568dedadb3d66c2751aba6bea559370ff32c (diff)
new gcc wrapper, entirely specfile based
the _concept_ of this wrapper has been tested extensively, but the integration with the build/install system, and using a persistent specfile rather than one generated at build-time, have not been heavily tested and may need minor tweaks. this approach should be a lot more robust (and easier to improve) than writing a shell script that's responsible for trying to mimic gcc's logic about whether it's compiling or linking, building shared libs or executable files, etc. it's also lighter weight and should result in mildly faster builds when using the wrapper.
Diffstat (limited to 'tools/')
1 files changed, 39 insertions, 0 deletions
diff --git a/tools/ b/tools/
new file mode 100644
index 00000000..30b2676d
--- /dev/null
+++ b/tools/
@@ -0,0 +1,39 @@
+cat <<EOF
+%rename cpp_options old_cpp_options
+-nostdinc -isystem $incdir %(old_cpp_options)
+%(cc1_cpu) -nostdinc -isystem $incdir
+libgcc.a%s %:if-exists(libgcc_eh.a%s)
+%{!shared: $libdir/crt1.o} $libdir/crti.o %{shared|pie:crtbeginS.o%s;:crtbegin.o%s}
+%{shared|pie:crtendS.o%s;:crtend.o%s} $libdir/crtn.o
+%rename link old_link
+%(old_link) -dynamic-linker $ldso -nostdlib