this should avoid warnings about unused libs when not linking, and
might fix some other obscure issues too. i might replace this approach
with a completely different one soon though.
gcc_inc=$libc_inc
libgcc="`gcc \"$@\" -print-file-name=libgcc.a`"
+libgcc=${libgcc%libgcc.a}
gcc -wrapper sh,-c,'
x= ; y= ; z= ; s= ; for i ; do
exec "$0" "$@"
' -std=gnu99 -nostdinc -nostdlib \
-isystem "$libc_inc" -isystem "$gcc_inc" \
- -Wl,-xxxxxx "$@" -L"$libc_lib" -lc "$libgcc" -Lxxxxxx -Wl,-nostdlib
+ -Wl,-xxxxxx "$@" -L"$libc_lib" -lc -L"$libgcc" -lgcc -Lxxxxxx -Wl,-nostdlib
EOF