Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix bug where I wasn't detecting lspci correctly. Add a WKCC variable…

… to hold a default compiler option. I like clang, so use that, GCC otherwise. Update pc to use the default compiler unless one is manually specified
  • Loading branch information...
commit 8f97ff99e5840e67e23ca7bb5cbd8cb2d3819778 1 parent 6666ea6
@Whiteknight authored
Showing with 11 additions and 1 deletion.
  1. +3 −0  addons/parrot.sh
  2. +8 −1 utils.sh
View
3  addons/parrot.sh
@@ -66,6 +66,9 @@ function pc {
shift
WKCOMMANDLINE="--cc=suncc --link=suncc --ld=suncc --cgoto=0"
;;
+ *)
+ pc $WKCC
+ return;
esac
# If we have flex and bison, set that up. No sense in not using them
View
9 utils.sh
@@ -45,10 +45,17 @@ function __set_default_prompt {
# sudo, which I don't want to use for startup scripts like this. So, need to
# find an alternate way to do this.
WKLSPCI="lspci"
-if ! __find_program lscpi; then
+if ! __find_program lspci; then
WKLSPCI="scanpci"
fi
+# Set a default compiler, for cases when we need to just pick a compiler. I
+# Am liking clang, so set that for default if it exists, set gcc otherwise.
+WKCC="clang"
+if ! __find_program clang; then
+ WKCC="gcc"
+fi
+
# Figure out if we are being run virtually inside VirtualBox and, if so,
# whether we have the guest additions installed. Note that in OpenSolaris
# I can't really detect this now, so I pretend we aren't virtualized no matter
Please sign in to comment.
Something went wrong with that request. Please try again.