summaryrefslogtreecommitdiffstats
path: root/gcc.pkg.in/postinst
diff options
context:
space:
mode:
Diffstat (limited to 'gcc.pkg.in/postinst')
-rwxr-xr-xgcc.pkg.in/postinst6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc.pkg.in/postinst b/gcc.pkg.in/postinst
index c0be054..ae943bc 100755
--- a/gcc.pkg.in/postinst
+++ b/gcc.pkg.in/postinst
@@ -3,6 +3,12 @@
if [ "x${1}" = 'xconfigure' ]; then
if [ "x$(cat /etc/proteanos_arch)" = 'x@PKG_TARGET_ARCH@' ]; then
ln -sf @PKG_TARGET_ARCH@-gcc /usr/bin/gcc
+ printf '#!/bin/sh\nexec gcc -std=c89 "${@}"\n' >/usr/bin/c89.gcc
+ printf '#!/bin/sh\nexec gcc -std=c99 "${@}"\n' >/usr/bin/c99.gcc
update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 20
+ update-alternatives --install /usr/bin/c89 c89 \
+ /usr/bin/c89.gcc 20
+ update-alternatives --install /usr/bin/c99 c99 \
+ /usr/bin/c99.gcc 20
fi
fi