Silence -pedantic warning
[oota-llvm.git] / Makefile.rules
index c4148be9db81244fec26eea0cead9431ae0b838b..4117169f3a38541ffb5fc109de1b337a65b04a5d 100644 (file)
@@ -198,11 +198,15 @@ install-bytecode:: install-bytecode-local
 # Variables derived from configuration we are building
 #--------------------------------------------------------------------
 
+# OPTIMIZE_OPTION - The optimization level option we want to build LLVM with
+# this can be overridden on the make command line.
+OPTIMIZE_OPTION := -O3
+
 ifdef ENABLE_PROFILING
   BuildMode := Profile
-  CXX.Flags := -O3 -pg
-  C.Flags   := -O3 -pg
-  LD.Flags  := -O3 -pg 
+  CXX.Flags := $(OPTIMIZE_OPTION) -pg
+  C.Flags   := $(OPTIMIZE_OPTION) -pg
+  LD.Flags  := $(OPTIMIZE_OPTION) -pg 
 else
   ifdef ENABLE_OPTIMIZED
     BuildMode := Release
@@ -213,9 +217,9 @@ else
       OmitFramePointer := -fomit-frame-pointer
     endif
     endif
-    CXX.Flags := -O3 $(OmitFramePointer)
-    C.Flags   := -O3 $(OmitFramePointer)
-    LD.Flags  := -O3
+    CXX.Flags := $(OPTIMIZE_OPTION) $(OmitFramePointer)
+    C.Flags   := $(OPTIMIZE_OPTION) $(OmitFramePointer)
+    LD.Flags  := $(OPTIMIZE_OPTION)
   else
     BuildMode := Debug
     CXX.Flags := -g
@@ -353,14 +357,16 @@ endif
 # Options To Invoke Tools
 #----------------------------------------------------------
 
-CompileCommonOpts := -Wall -W -Wwrite-strings -Wno-unused
+CompileCommonOpts := -Wall -W -Wwrite-strings -Wno-unused -Wno-long-long \
+                     -pedantic 
 
 ifeq ($(OS),HP-UX)
   CompileCommonOpts := -D_REENTRANT -D_HPUX_SOURCE
 endif
 
-# If we are building a universal binary on Mac OS/X, pass extra options.  This is
-# useful to people that want to link the LLVM libraries into their universal apps.
+# If we are building a universal binary on Mac OS/X, pass extra options.  This
+# is useful to people that want to link the LLVM libraries into their universal
+# apps.
 ifdef UNIVERSAL
   CompileCommonOpts += \
       -arch i386 -arch ppc -isysroot /Developer/SDKs/MACOSX10.4u.sdk/
@@ -370,12 +376,10 @@ ifdef UNIVERSAL
   DISABLE_AUTO_DEPENDENCIES=1
 endif
 
-# Temporary workaround for a Mac OSX / x86 compatibility issue.
+# Temporary workaround for a Mac OSX compatibility issue.
 ifeq ($(OS),Darwin)
-ifeq ($(ARCH),x86)
   CXX.Flags += -fno-use-cxa-atexit
 endif
-endif
 
 LD.Flags      += -L$(LibDir) -L$(LLVMLibDir) 
 CPP.BaseFlags += -D_GNU_SOURCE -D__STDC_LIMIT_MACROS
@@ -625,7 +629,7 @@ ifdef ENABLE_ALPHA_JIT
 endif
 
 LLVMLIBS := $(JIT_LIBS) LLVMScalarOpts.a LLVMTransformUtils.a LLVMAnalysis.a \
-            LLVMBCReader LLVMTarget.a LLVMCore LLVMSupport.a LLVMbzip2 \
+            LLVMBCReader.a LLVMTarget.a LLVMCore.a LLVMSupport.a LLVMbzip2.a \
             LLVMSystem.a $(PLATFORMLIBDL)
 endif
 
@@ -782,7 +786,8 @@ else
 all-local:: $(LibName.BCA)
 
 ifdef EXPORTED_SYMBOL_FILE
-BCLinkLib = $(GCCLD) -L$(CFERuntimeLibDir) -internalize-public-api-file=$(EXPORTED_SYMBOL_FILE)
+BCLinkLib = $(GCCLD) -L$(CFERuntimeLibDir) \
+                     -internalize-public-api-file=$(EXPORTED_SYMBOL_FILE)
 
 $(LibName.BCA): $(ObjectsBC) $(LibDir)/.dir $(GCCLD) \
                 $(LLVMToolDir)/llvm-ar