summaryrefslogtreecommitdiffstats
path: root/gcc.pkg.in/postinst
diff options
context:
space:
mode:
Diffstat (limited to 'gcc.pkg.in/postinst')
-rwxr-xr-xgcc.pkg.in/postinst7
1 files changed, 5 insertions, 2 deletions
diff --git a/gcc.pkg.in/postinst b/gcc.pkg.in/postinst
index 9fd34c0..c0be054 100755
--- a/gcc.pkg.in/postinst
+++ b/gcc.pkg.in/postinst
@@ -1,5 +1,8 @@
#! /bin/sh
-if [ "${1}" = configure ]; then
- update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 20
+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
+ update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 20
+ fi
fi