3 # CC is a compilation driver, so we should check which stage of compilation
4 # is actually running and select which flags to provide. This makes no
5 # difference for GCC, but e.g. clang warns when a flag is provided that is
9 # echo "[CC $PWD]:" "$@"
16 # Guess what is actually running...
19 -E) running_pp
=true
;;
20 -c|
-S) running_cc
=true
;;
25 # ...and pass the correct flags
27 run_it
$HELENOS_CROSS_PATH/$HSCT_REAL_CC $HSCT_CPPFLAGS "$@"
28 elif $running_cc; then
29 run_it
$HELENOS_CROSS_PATH/$HSCT_REAL_CC $HSCT_CPPFLAGS $HSCT_CFLAGS "$@"
31 run_it
$HELENOS_CROSS_PATH/$HSCT_REAL_CC $HSCT_CPPFLAGS $HSCT_CFLAGS $HSCT_LDFLAGS "$@" $HSCT_LDLIBS