[llvm-commits] [test-suite] r66186 - in /test-suite/trunk: Makefile.programs Makefile.rules TEST.nightly.Makefile TEST.nightly2.Makefile

Evan Cheng evan.cheng at apple.com
Thu Mar 5 12:14:58 PST 2009


Author: evancheng
Date: Thu Mar  5 14:14:57 2009
New Revision: 66186

URL: http://llvm.org/viewvc/llvm-project?rev=66186&view=rev
Log:
1. If ARCH is x86, explicitly specify -m32. Like wise, specify -m64 when ARCH is x86_64. This avoids mismatch between system compiler and llvm-gcc.
2. Split TARGET_LLCFLAGS into TARGET_LLCFLAGS and EXTRA_LLCFLAGS. The later is used for user to specify extra llc options.
3. Rename and split EXTRA_LLI_OPTS to TARGET_LLIFLAGS and EXTRA_LLIFLAGS.
4. If PIC_CODEGEN is specified, pass -relocation-model=pic -disable-fp-elim. This matches llvm-gcc / gcc default. Otherwise, pass -mdynamic-no-pic -fomit-frame-pointer to llvm-gcc and gcc to match llc / lli default.

Modified:
    test-suite/trunk/Makefile.programs
    test-suite/trunk/Makefile.rules
    test-suite/trunk/TEST.nightly.Makefile
    test-suite/trunk/TEST.nightly2.Makefile

Modified: test-suite/trunk/Makefile.programs
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/Makefile.programs?rev=66186&r1=66185&r2=66186&view=diff

==============================================================================
--- test-suite/trunk/Makefile.programs (original)
+++ test-suite/trunk/Makefile.programs Thu Mar  5 14:14:57 2009
@@ -360,6 +360,9 @@
 ifdef TARGET_LLCFLAGS
 LLCFLAGS += $(TARGET_LLCFLAGS)
 endif
+ifdef EXTRA_LLCFLAGS
+LLCFLAGS += $(EXTRA_LLCFLAGS)
+endif
 
 # It is important to link C++ programs with G++ so look for -lstdc++ in LDFLAGS
 # and set the LLVMGCCLD variable to the correct compiler interface to use.
@@ -425,13 +428,18 @@
 # Rules to execute the program
 #
 
-# EXTRA_LLI_OPTS is used by the nightly tester to add arguments to invocations
-# of the JIT and LLI in order to get timing info and statistics.
-EXTRA_LLI_OPTS = 
-
-LLI_OPTS = -force-interpreter=true --disable-core-files $(EXTRA_LLI_OPTS)
-JIT_OPTS = -force-interpreter=false --disable-core-files $(EXTRA_LLI_OPTS)
+LLI_OPTS = -force-interpreter=true --disable-core-files
+JIT_OPTS = -force-interpreter=false --disable-core-files
 
+# Pass target specific lli flags
+ifdef TARGET_LLIFLAGS
+LLI_OPTS += $(TARGET_LLIFLAGS)
+JIT_OPTS += $(TARGET_LLIFLAGS)
+endif
+ifdef EXTRA_LLIFLAGS
+LLI_OPTS += $(EXTRA_LLIFLAGS)
+JIT_OPTS += $(EXTRA_LLIFLAGS)
+endif
 
 # If the program requires exception handling support, enable (potentially
 # expensive) support for it.

Modified: test-suite/trunk/Makefile.rules
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/Makefile.rules?rev=66186&r1=66185&r2=66186&view=diff

==============================================================================
--- test-suite/trunk/Makefile.rules (original)
+++ test-suite/trunk/Makefile.rules Thu Mar  5 14:14:57 2009
@@ -331,11 +331,14 @@
 LOPTFLAGS := $(OPTFLAGS) -mllvm -disable-llvm-optzns
 endif
 
-
-ifeq ($(OS),Darwin)
-ifndef TARGET_FLAGS
-TARGET_FLAGS := -mdynamic-no-pic -fomit-frame-pointer
+# Explicitly specify -m32 / -m64 so there is no mismatch between llvm-gcc
+# default and system compiler default.
+ifeq ($(ARCH),x86)
+TARGET_FLAGS += -m32
 endif
+
+ifeq ($(ARCH),x86_64)
+TARGET_FLAGS += -m64
 endif
 
 ifeq ($(ARCH),Alpha)
@@ -343,6 +346,15 @@
 CFLAGS += -mieee
 endif
 
+# gcc / llvm-gcc default is -fPIC -fno-omit-frame-pointer
+# llc / lli default is equal to -mdynamic-no-pic -fomit-frame-pointer
+ifdef PIC_CODEGEN
+TARGET_LLCFLAGS += -relocation-model=pic -disable-fp-elim
+TARGET_LLIFLAGS += -relocation-model=pic -disable-fp-elim
+else
+TARGET_FLAGS += -mdynamic-no-pic -fomit-frame-pointer
+endif
+
 ifdef EXTRA_OPTIONS
 TARGET_FLAGS += $(EXTRA_OPTIONS)
 endif

Modified: test-suite/trunk/TEST.nightly.Makefile
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/TEST.nightly.Makefile?rev=66186&r1=66185&r2=66186&view=diff

==============================================================================
--- test-suite/trunk/TEST.nightly.Makefile (original)
+++ test-suite/trunk/TEST.nightly.Makefile Thu Mar  5 14:14:57 2009
@@ -29,7 +29,7 @@
 
 
 TIMEOPT = -time-passes -stats -info-output-file=$(CURDIR)/$@.info
-EXTRA_LLI_OPTS = $(TIMEOPT)
+EXTRA_LLIFLAGS = $(TIMEOPT)
 
 # Compilation tests
 $(PROGRAMS_TO_TEST:%=Output/%.nightly.compile.report.txt): \

Modified: test-suite/trunk/TEST.nightly2.Makefile
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/TEST.nightly2.Makefile?rev=66186&r1=66185&r2=66186&view=diff

==============================================================================
--- test-suite/trunk/TEST.nightly2.Makefile (original)
+++ test-suite/trunk/TEST.nightly2.Makefile Thu Mar  5 14:14:57 2009
@@ -29,7 +29,7 @@
 
 
 TIMEOPT = -time-passes -stats -info-output-file=$(CURDIR)/$@.info
-EXTRA_LLI_OPTS = $(TIMEOPT)
+EXTRA_LLIFLAGS = $(TIMEOPT)
 
 # Compilation tests
 $(PROGRAMS_TO_TEST:%=Output/%.nightly.compile.report.txt): \





More information about the llvm-commits mailing list