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...
1 parent 6666ea6 commit 8f97ff99e5840e67e23ca7bb5cbd8cb2d3819778 @Whiteknight committed May 21, 2010
Showing with 11 additions and 1 deletion.
  1. +3 −0 addons/
  2. +8 −1
@@ -66,6 +66,9 @@ function pc {
WKCOMMANDLINE="--cc=suncc --link=suncc --ld=suncc --cgoto=0"
+ *)
+ pc $WKCC
+ return;
# If we have flex and bison, set that up. No sense in not using them
@@ -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.
-if ! __find_program lscpi; then
+if ! __find_program lspci; then
+# 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.
+if ! __find_program clang; then
+ WKCC="gcc"
# 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

0 comments on commit 8f97ff9

Please sign in to comment.