Skip to content

Instantly share code, notes, and snippets.

@ildus
Created August 23, 2015 00:39
Show Gist options
  • Save ildus/7dcd56f237558fc6d55a to your computer and use it in GitHub Desktop.
Save ildus/7dcd56f237558fc6d55a to your computer and use it in GitHub Desktop.
for file in \
$(find gcc/config -name linux64.h -o -name linux.h -o -name sysv4.h)
do
cp -uv $file{,.orig}
sed -e 's@/lib\(64\)\?\(32\)\?/ld@/tools&@g' \
-e 's@/usr@/tools@g' $file.orig > $file
echo '
#undef STANDARD_STARTFILE_PREFIX_1
#undef STANDARD_STARTFILE_PREFIX_2
#define STANDARD_STARTFILE_PREFIX_1 "/tools/lib/"
#define STANDARD_STARTFILE_PREFIX_2 ""' >> $file
touch $file.orig
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment