[llvm-commits] [llvm] r67334 - in /llvm/trunk: Makefile.rules test/BugPoint/misopt-basictest.ll test/BugPoint/remove_arguments_test.ll test/Makefile test/lib/llvm.exp
Evan Cheng
evan.cheng at apple.com
Thu Mar 19 13:27:23 PDT 2009
Author: evancheng
Date: Thu Mar 19 15:27:23 2009
New Revision: 67334
URL: http://llvm.org/viewvc/llvm-project?rev=67334&view=rev
Log:
More makefile changes to allow dejagnu tests to pass when system tools default to a different target from the llvm configuration (e.g. 64-bit gcc and 32-bit llvm).
Modified:
llvm/trunk/Makefile.rules
llvm/trunk/test/BugPoint/misopt-basictest.ll
llvm/trunk/test/BugPoint/remove_arguments_test.ll
llvm/trunk/test/Makefile
llvm/trunk/test/lib/llvm.exp
Modified: llvm/trunk/Makefile.rules
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/Makefile.rules?rev=67334&r1=67333&r2=67334&view=diff
==============================================================================
--- llvm/trunk/Makefile.rules (original)
+++ llvm/trunk/Makefile.rules Thu Mar 19 15:27:23 2009
@@ -437,7 +437,7 @@
SharedLinkOptions=-Wl,-flat_namespace -Wl,-undefined -Wl,suppress -bundle \
-mmacosx-version-min=$(DARWIN_VERSION)
- CompileCommonOpts += -mmacosx-version-min=$(DARWIN_VERSION)
+ TargetCommonOpts += -mmacosx-version-min=$(DARWIN_VERSION)
else
ifeq ($(OS),Cygwin)
SharedLinkOptions=-shared -nostdlib -Wl,--export-all-symbols \
@@ -536,10 +536,10 @@
else
ifeq ($(OS),Darwin)
ifeq ($(ARCH),x86_64)
- CompileCommonOpts += -m64
+ TargetCommonOpts = -m64
else
ifeq ($(ARCH),x86)
- CompileCommonOpts += -m32
+ TargetCommonOpts = -m32
endif
endif
endif
@@ -560,33 +560,35 @@
ifeq ($(BUILD_COMPONENT), 1)
Compile.C = $(BUILD_CC) $(CPP.Flags) $(C.Flags) $(C.Flags.NoRelink) \
- $(CompileCommonOpts) -c
+ $(TargetCommonOpts) $(CompileCommonOpts) -c
Compile.CXX = $(BUILD_CXX) $(CPP.Flags) $(CXX.Flags) $(CXX.Flags.NoRelink) \
- $(CompileCommonOpts) -c
- Preprocess.CXX= $(BUILD_CXX) $(CPP.Flags) $(CompileCommonOpts) $(CXX.Flags) \
- $(CXX.Flags.NoRelink) -E
+ $(TargetCommonOpts) $(CompileCommonOpts) -c
+ Preprocess.CXX= $(BUILD_CXX) $(CPP.Flags) $(TargetCommonOpts) \
+ $(CompileCommonOpts) $(CXX.Flags) $(CXX.Flags.NoRelink) -E
Link = $(BUILD_CXX) $(CPP.Flags) $(CXX.Flags) $(CXX.Flags.NoRelink) \
- $(CompileCommonOpts) $(LD.Flags) $(Strip)
- Relink = $(BUILD_CXX) $(CPP.Flags) $(CXX.Flags) $(CompileCommonOpts) \
- $(Relink.Flags)
+ $(TargetCommonOpts) $(CompileCommonOpts) $(LD.Flags) $(Strip)
+ Relink = $(BUILD_CXX) $(CPP.Flags) $(CXX.Flags) $(TargetCommonOpts) \
+ $(CompileCommonOpts) $(Relink.Flags)
else
Compile.C = $(CC) $(CPP.Flags) $(C.Flags) $(C.Flags.NoRelink) \
- $(CompileCommonOpts) -c
+ $(TargetCommonOpts) $(CompileCommonOpts) -c
Compile.CXX = $(CXX) $(CPP.Flags) $(CXX.Flags) $(CXX.Flags.NoRelink) \
- $(CompileCommonOpts) -c
- Preprocess.CXX= $(CXX) $(CPP.Flags) $(CompileCommonOpts) $(CXX.Flags) \
- $(CXX.Flags.NoRelink) -E
+ $(TargetCommonOpts) $(CompileCommonOpts) -c
+ Preprocess.CXX= $(CXX) $(CPP.Flags) $(TargetCommonOpts) \
+ $(CompileCommonOpts) $(CXX.Flags) $(CXX.Flags.NoRelink) -E
Link = $(CXX) $(CPP.Flags) $(CXX.Flags) $(CXX.Flags.NoRelink) \
- $(CompileCommonOpts) $(LD.Flags) $(Strip)
- Relink = $(CXX) $(CPP.Flags) $(CXX.Flags) $(CompileCommonOpts) \
- $(Relink.Flags)
+ $(TargetCommonOpts) $(CompileCommonOpts) $(LD.Flags) $(Strip)
+ Relink = $(CXX) $(CPP.Flags) $(CXX.Flags) $(TargetCommonOpts) \
+ $(CompileCommonOpts) $(Relink.Flags)
endif
-BCCompile.C = $(LLVMGCCWITHPATH) $(CPP.Flags) $(C.Flags) $(CompileCommonOpts)
-Preprocess.C = $(CC) $(CPP.Flags) $(C.Flags) $(CompileCommonOpts) -E
+BCCompile.C = $(LLVMGCCWITHPATH) $(CPP.Flags) $(C.Flags) \
+ $(TargetCommonOpts) $(CompileCommonOpts)
+Preprocess.C = $(CC) $(CPP.Flags) $(C.Flags) \
+ $(TargetCommonOpts) $(CompileCommonOpts) -E
BCCompile.CXX = $(LLVMGXXWITHPATH) $(CPP.Flags) $(CXX.Flags) \
- $(CompileCommonOpts)
+ $(TargetCommonOpts) $(CompileCommonOpts)
ProgInstall = $(INSTALL) $(Install.StripFlag) -m 0755
ScriptInstall = $(INSTALL) -m 0755
Modified: llvm/trunk/test/BugPoint/misopt-basictest.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/BugPoint/misopt-basictest.ll?rev=67334&r1=67333&r2=67334&view=diff
==============================================================================
--- llvm/trunk/test/BugPoint/misopt-basictest.ll (original)
+++ llvm/trunk/test/BugPoint/misopt-basictest.ll Thu Mar 19 15:27:23 2009
@@ -1,4 +1,4 @@
-; RUN: bugpoint %s -dce -bugpoint-deletecalls -simplifycfg -silence-passes
+; RUN: bugpoint %s -dce -bugpoint-deletecalls -simplifycfg -silence-passes %bugpoint_tops
@.LC0 = internal global [13 x i8] c"Hello World\0A\00" ; <[13 x i8]*> [#uses=1]
Modified: llvm/trunk/test/BugPoint/remove_arguments_test.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/BugPoint/remove_arguments_test.ll?rev=67334&r1=67333&r2=67334&view=diff
==============================================================================
--- llvm/trunk/test/BugPoint/remove_arguments_test.ll (original)
+++ llvm/trunk/test/BugPoint/remove_arguments_test.ll Thu Mar 19 15:27:23 2009
@@ -1,4 +1,4 @@
-; RUN: bugpoint %s -bugpoint-crashcalls -silence-passes
+; RUN: bugpoint %s -bugpoint-crashcalls -silence-passes
; Test to make sure that arguments are removed from the function if they are
; unnecessary.
Modified: llvm/trunk/test/Makefile
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Makefile?rev=67334&r1=67333&r2=67334&view=diff
==============================================================================
--- llvm/trunk/test/Makefile (original)
+++ llvm/trunk/test/Makefile Thu Mar 19 15:27:23 2009
@@ -87,6 +87,9 @@
else
DSYMUTIL=true
endif
+ifeq ($(OS),Darwin)
+BUGPOINT_TOPTS="-gcc-tool-args $(TargetCommonOpts)"
+endif
FORCE:
@@ -108,12 +111,13 @@
@echo 'set objdir "$(LLVM_OBJ_ROOT)/test"' >>site.tmp
@echo 'set gccpath "$(CC)"' >>site.tmp
@echo 'set gxxpath "$(CXX)"' >>site.tmp
- @echo 'set compile_c "' $(CC) $(CPP.Flags) $(CompileCommonOpts) -c '"' >>site.tmp
- @echo 'set compile_cxx "' $(CXX) $(CPP.Flags) $(CXX.Flags) $(CompileCommonOpts) -c '"' >> site.tmp
- @echo 'set link "' $(CXX) $(CPP.Flags) $(CXX.Flags) $(CompileCommonOpts) $(LD.Flags) '"' >>site.tmp
- @echo 'set llvmgcc "$(LLVMGCC) $(EXTRA_OPTIONS)"' >> site.tmp
- @echo 'set llvmgxx "$(LLVMGCC) $(EXTRA_OPTIONS)"' >> site.tmp
+ @echo 'set compile_c "' $(CC) $(CPP.Flags) $(TargetCommonOpts) $(CompileCommonOpts) -c '"' >>site.tmp
+ @echo 'set compile_cxx "' $(CXX) $(CPP.Flags) $(CXX.Flags) $(TargetCommonOpts) $(CompileCommonOpts) -c '"' >> site.tmp
+ @echo 'set link "' $(CXX) $(CPP.Flags) $(CXX.Flags) $(TargetCommonOpts) $(CompileCommonOpts) $(LD.Flags) '"' >>site.tmp
+ @echo 'set llvmgcc "$(LLVMGCC) $(TargetCommonOpts) $(EXTRA_OPTIONS)"' >> site.tmp
+ @echo 'set llvmgxx "$(LLVMGCC) $(TargetCommonOpts) $(EXTRA_OPTIONS)"' >> site.tmp
@echo 'set llvmgccmajvers "$(LLVMGCC_MAJVERS)"' >> site.tmp
+ @echo 'set bugpoint_topts $(BUGPOINT_TOPTS)' >> site.tmp
@echo 'set shlibext "$(SHLIBEXT)"' >> site.tmp
@echo 'set ocamlc "$(OCAMLC) -cc $(CXX) -I $(LibDir)/ocaml"' >> site.tmp
@echo 'set valgrind "$(VALGRIND)"' >> site.tmp
Modified: llvm/trunk/test/lib/llvm.exp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/lib/llvm.exp?rev=67334&r1=67333&r2=67334&view=diff
==============================================================================
--- llvm/trunk/test/lib/llvm.exp (original)
+++ llvm/trunk/test/lib/llvm.exp Thu Mar 19 15:27:23 2009
@@ -48,8 +48,8 @@
proc substitute { line test tmpFile } {
global srcroot objroot srcdir objdir subdir target_triplet prcontext
global llvmgcc llvmgxx llvmgcc_version llvmgccmajvers ocamlc
- global gccpath gxxpath compile_c compile_cxx link shlibext llvmlibsdir llvmdsymutil
- global valgrind grep gas
+ global gccpath gxxpath compile_c compile_cxx link shlibext llvmlibsdir
+ global llvmdsymutil valgrind grep gas bugpoint_topts
set path [file join $srcdir $subdir]
# Substitute all Tcl variables.
@@ -77,6 +77,8 @@
regsub -all {%llvmdsymutil} $new_line "$llvmdsymutil" new_line
#replace %llvmlibsdir with configure library directory
regsub -all {%llvmlibsdir} $new_line "$llvmlibsdir" new_line
+ #replace %bugpoint_tops with actual bugpoint target options
+ regsub -all {%bugpoint_tops} $new_line "$bugpoint_topts" new_line
#replace %p with path to source,
regsub -all {%p} $new_line [file join $srcdir $subdir] new_line
#replace %s with filename
More information about the llvm-commits
mailing list