Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Don't append libs in pre-processor mode.

  • Loading branch information...
commit 21326772d1917a6ab140ac619030470aa1cc6370 1 parent 8878019
@jperkin jperkin authored
Showing with 7 additions and 0 deletions.
  1. +2 −0  mk/wrapper/scan
  2. +5 −0 mk/wrapper/wrapper.sh
View
2  mk/wrapper/scan
@@ -41,6 +41,8 @@ for arg do
# Append extra libs to output objects, but not when using 'ld -r'.
-o) append_extra_libs=yes ;;
-r) rflag=yes ;;
+ -E) preproc=yes ;;
+ -M*) preproc=yes ;;
*) ;;
esac
done
View
5 mk/wrapper/wrapper.sh
@@ -103,10 +103,15 @@ init_queue cmdbuf
append_extra_args=yes
append_extra_libs=no
rflag=no
+preproc=no
. $scan
case $append_extra_libs in
yes)
+ # do not append libraries in preprocessor mode
+ if [ "$wrapper_type" = "CC" -o "$wrapper_type" = "CXX" ] && [ "$preproc" = "yes" ]; then
+ append_extra_libs=no
+ fi
# ld -r -o should not append extra libraries
if [ "$wrapper_type" = "LD" -a "$rflag" = "yes" ]; then
append_extra_libs=no
Please sign in to comment.
Something went wrong with that request. Please try again.