summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd C. Miller <Todd.Miller@sudo.ws>2021-02-09 12:40:25 -0700
committerTodd C. Miller <Todd.Miller@sudo.ws>2021-02-09 12:40:25 -0700
commitc09a3ccac91dbeb88c645b2e0cd4bafa56d3f2e3 (patch)
tree89b632290cc1c1ee3bc129cb3874b42453ccd6ea
parent91fc8bb1bba192a4dff9d2acbc0ac06a4becee0b (diff)
downloadsudo-SUDO_1_8_32.tar.gz
Don't use /usr/bin/cc on Solaris, look in /opt/developerstudio*.SUDO_1_8_32
-rwxr-xr-xmkpkg15
1 files changed, 10 insertions, 5 deletions
diff --git a/mkpkg b/mkpkg
index 954435aa2..ae7d80109 100755
--- a/mkpkg
+++ b/mkpkg
@@ -139,11 +139,16 @@ if [ "$crossbuild" = "false" ]; then
;;
sol[0-9]*)
# Use the Sun Studio C compiler on Solaris if possible
- if [ -z "$CC" -a -x /usr/bin/cc ]; then
- CC=/usr/bin/cc; export CC
- if [ -z "$CFLAGS" ]; then
- CFLAGS=-O; export CFLAGS
- fi
+ if [ -z "$CC" ]; then
+ for f in /opt/developerstudio12.[9876]/bin/cc /opt/solarisstudio12.[43]/bin/cc; do
+ if [ -x $f ]; then
+ CC=$f; export CC
+ if [ -z "$CFLAGS" ]; then
+ CFLAGS=-O; export CFLAGS
+ fi
+ break
+ fi
+ done
fi
;;
esac