diff --git a/tools/gcc.jam b/tools/gcc.jam index e8da3117d..e4c0a3f21 100644 --- a/tools/gcc.jam +++ b/tools/gcc.jam @@ -75,12 +75,12 @@ flags gcc.compile INCLUDES ; actions compile.c++ { - $(NAME:E=g++) -Wall -ftemplate-depth-100 $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)" + $(NAME:E=g++) -x c++ -Wall -ftemplate-depth-100 $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)" } actions compile.c { - $(NAME:E=gcc) -Wall $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)" + $(NAME:E=gcc) -x c -Wall $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)" } diff --git a/v2/tools/gcc.jam b/v2/tools/gcc.jam index e8da3117d..e4c0a3f21 100644 --- a/v2/tools/gcc.jam +++ b/v2/tools/gcc.jam @@ -75,12 +75,12 @@ flags gcc.compile INCLUDES ; actions compile.c++ { - $(NAME:E=g++) -Wall -ftemplate-depth-100 $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)" + $(NAME:E=g++) -x c++ -Wall -ftemplate-depth-100 $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)" } actions compile.c { - $(NAME:E=gcc) -Wall $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)" + $(NAME:E=gcc) -x c -Wall $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)" }