summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-08-27 18:26:44 +0000
committerChris Lattner <sabre@nondot.org>2003-08-27 18:26:44 +0000
commit7c95d2ffb9ca1d79b5a0726617d109a3f814623d (patch)
tree7b1a6bd8ce3e5f4b38a5151d71133039756c0bc1
parenta26dd3ba054d535e6091abf79b281db3480341b5 (diff)
downloadbcm5719-llvm-7c95d2ffb9ca1d79b5a0726617d109a3f814623d.tar.gz
bcm5719-llvm-7c95d2ffb9ca1d79b5a0726617d109a3f814623d.zip
Refactor code slightly. Make code compiled with llvmgcc use the warning options
as well. Compile with -fshort-enums whether in debug or release mode, because it breaks the ABI llvm-svn: 8164
-rw-r--r--llvm/Makefile.common9
-rw-r--r--llvm/Makefile.rules9
2 files changed, 10 insertions, 8 deletions
diff --git a/llvm/Makefile.common b/llvm/Makefile.common
index 9f0c523735a..7b6c9867d8f 100644
--- a/llvm/Makefile.common
+++ b/llvm/Makefile.common
@@ -354,8 +354,9 @@ endif
# Allow gnu extensions...
CPPFLAGS += -D_GNU_SOURCE
-CompileCommonOpts := -Wall -W -Wwrite-strings -Wno-unused -I$(LEVEL)/include
-CompileOptimizeOpts := -O3 -DNDEBUG -finline-functions -fshort-enums
+CompileWarnings := -Wall -W -Wwrite-strings -Wno-unused
+CompileCommonOpts := $(CompileWarnings) -I$(LEVEL)/include -fshort-enums
+CompileOptimizeOpts := -O3 -DNDEBUG -finline-functions
#
# Compile commands with libtool.
@@ -739,11 +740,11 @@ $(BUILD_OBJ_DIR)/Debug/%.lo: $(SourceDir)%.c $(BUILD_OBJ_DIR)/Debug/.dir
$(BUILD_OBJ_DIR)/Bytecode/%.bc: $(SourceDir)%.cpp $(BUILD_OBJ_DIR)/Bytecode/.dir $(LCC1XX)
@echo "Compiling $< to bytecode"
- $(VERB) $(LLVMGXX) $(CPPFLAGS) -c $< -o $@
+ $(VERB) $(LLVMGXX) $(CompileWarnings) $(CPPFLAGS) -c $< -o $@
$(BUILD_OBJ_DIR)/Bytecode/%.bc: $(SourceDir)%.c $(BUILD_OBJ_DIR)/Bytecode/.dir $(LCC1)
@echo "Compiling $< to bytecode"
- $(VERB) $(LLVMGCC) $(CPPFLAGS) -c $< -o $@
+ $(VERB) $(LLVMGCC) $(CompileWarnings) $(CPPFLAGS) -c $< -o $@
$(BUILD_OBJ_DIR)/Bytecode/%.bc: $(SourceDir)%.ll $(BUILD_OBJ_DIR)/Bytecode/.dir $(LLVMAS)
@echo "Compiling $< to bytecode"
diff --git a/llvm/Makefile.rules b/llvm/Makefile.rules
index 9f0c523735a..7b6c9867d8f 100644
--- a/llvm/Makefile.rules
+++ b/llvm/Makefile.rules
@@ -354,8 +354,9 @@ endif
# Allow gnu extensions...
CPPFLAGS += -D_GNU_SOURCE
-CompileCommonOpts := -Wall -W -Wwrite-strings -Wno-unused -I$(LEVEL)/include
-CompileOptimizeOpts := -O3 -DNDEBUG -finline-functions -fshort-enums
+CompileWarnings := -Wall -W -Wwrite-strings -Wno-unused
+CompileCommonOpts := $(CompileWarnings) -I$(LEVEL)/include -fshort-enums
+CompileOptimizeOpts := -O3 -DNDEBUG -finline-functions
#
# Compile commands with libtool.
@@ -739,11 +740,11 @@ $(BUILD_OBJ_DIR)/Debug/%.lo: $(SourceDir)%.c $(BUILD_OBJ_DIR)/Debug/.dir
$(BUILD_OBJ_DIR)/Bytecode/%.bc: $(SourceDir)%.cpp $(BUILD_OBJ_DIR)/Bytecode/.dir $(LCC1XX)
@echo "Compiling $< to bytecode"
- $(VERB) $(LLVMGXX) $(CPPFLAGS) -c $< -o $@
+ $(VERB) $(LLVMGXX) $(CompileWarnings) $(CPPFLAGS) -c $< -o $@
$(BUILD_OBJ_DIR)/Bytecode/%.bc: $(SourceDir)%.c $(BUILD_OBJ_DIR)/Bytecode/.dir $(LCC1)
@echo "Compiling $< to bytecode"
- $(VERB) $(LLVMGCC) $(CPPFLAGS) -c $< -o $@
+ $(VERB) $(LLVMGCC) $(CompileWarnings) $(CPPFLAGS) -c $< -o $@
$(BUILD_OBJ_DIR)/Bytecode/%.bc: $(SourceDir)%.ll $(BUILD_OBJ_DIR)/Bytecode/.dir $(LLVMAS)
@echo "Compiling $< to bytecode"
OpenPOWER on IntegriCloud