changeset 6010:3394e08aa6ba

Backout 8c8b5e62e624 and instead move .S rule from zeroshark.make to rules.make
author andrew
date Tue, 11 Nov 2014 18:16:34 +0000
parents 628c88e6d165
children e13857ecc787
files make/linux/makefiles/rules.make make/linux/makefiles/zeroshark.make
diffstat 2 files changed, 6 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/make/linux/makefiles/rules.make	Mon Nov 10 17:21:51 2014 +0000
+++ b/make/linux/makefiles/rules.make	Tue Nov 11 18:16:34 2014 +0000
@@ -30,17 +30,11 @@
 DEMANGLER       = c++filt
 DEMANGLE        = $(DEMANGLER) < $@ > .$@ && mv -f .$@ $@
 
-# $(CC) is the c compiler (cc/gcc), $(CXX) is the c++ compiler
-# (CC/g++).  FIXME: $(CXXFLAGS) currently only includes preprocessor
-# flags while $(CFLAGS) includes C and C++ flags.  Ideally, there
-# should be three variables: $(CFLAGS), $(CXXFLAGS) and $(CPPFLAGS).
-# !!! FIXME AARCH64
-# on aarch64 the definition for CC_COMPILE must include CFLAGS here
-# otherwise the -D options added in aarch64.make don't get passed to
-# the compiler when we are assembling .S files. this ought ot be ok
-# for all architectures but we need to check that is the case
-#CC_COMPILE       = $(CC) $(CXXFLAGS)
-CC_COMPILE       = $(CC) $(CXXFLAGS) $(CFLAGS)
+# $(CC) is the c compiler (cc/gcc), $(CXX) is the c++ compiler (CC/g++).
+# FIXME: $(CXXFLAGS) currently only includes preprocessor flags while
+# $(CFLAGS) includes C and C++ flags.  Ideally, there should be three
+# variables: $(CFLAGS), $(CXXFLAGS) and $(CPPFLAGS).
+CC_COMPILE       = $(CC) $(CXXFLAGS)
 CXX_COMPILE      = $(CXX) $(CXXFLAGS) $(CFLAGS)
 
 AS.S            = $(AS) $(ASFLAGS)
@@ -165,7 +159,7 @@
 %.o: %.S
 	@echo Assembling $<
 	$(QUIETLY) $(REMOVE_TARGET)
-	$(COMPILE.CC) -o $@ $< $(COMPILE_DONE)
+	$(COMPILE.CC) $(CFLAGS) -o $@ $< $(COMPILE_DONE)
 
 %.s: %.cpp
 	@echo Generating assembly for $<
--- a/make/linux/makefiles/zeroshark.make	Mon Nov 10 17:21:51 2014 +0000
+++ b/make/linux/makefiles/zeroshark.make	Tue Nov 11 18:16:34 2014 +0000
@@ -57,11 +57,6 @@
 endif
 endif
 
-%.o: %.S
-	@echo Assembling $<
-	$(QUIETLY) $(REMOVE_TARGET)
-	$(COMPILE.CC) $(CFLAGS) -o $@ $< $(COMPILE_DONE)
-
 # The copied fdlibm routines in sharedRuntimeTrig.o must not be optimized
 OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/NOOPT)
 # The copied fdlibm routines in sharedRuntimeTrans.o must not be optimized