llvm.org GIT mirror llvm / 817046e
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). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67334 91177308-0d34-0410-b5e6-96231b3b80d8 Evan Cheng 10 years ago
5 changed file(s) with 39 addition(s) and 31 deletion(s). Raw diff Collapse all Expand all
436436
437437 SharedLinkOptions=-Wl,-flat_namespace -Wl,-undefined -Wl,suppress -bundle \
438438 -mmacosx-version-min=$(DARWIN_VERSION)
439 CompileCommonOpts += -mmacosx-version-min=$(DARWIN_VERSION)
439 TargetCommonOpts += -mmacosx-version-min=$(DARWIN_VERSION)
440440 else
441441 ifeq ($(OS),Cygwin)
442442 SharedLinkOptions=-shared -nostdlib -Wl,--export-all-symbols \
535535 else
536536 ifeq ($(OS),Darwin)
537537 ifeq ($(ARCH),x86_64)
538 CompileCommonOpts += -m64
538 TargetCommonOpts = -m64
539539 else
540540 ifeq ($(ARCH),x86)
541 CompileCommonOpts += -m32
541 TargetCommonOpts = -m32
542542 endif
543543 endif
544544 endif
559559
560560 ifeq ($(BUILD_COMPONENT), 1)
561561 Compile.C = $(BUILD_CC) $(CPP.Flags) $(C.Flags) $(C.Flags.NoRelink) \
562 $(CompileCommonOpts) -c
562 $(TargetCommonOpts) $(CompileCommonOpts) -c
563563 Compile.CXX = $(BUILD_CXX) $(CPP.Flags) $(CXX.Flags) $(CXX.Flags.NoRelink) \
564 $(CompileCommonOpts) -c
565 Preprocess.CXX= $(BUILD_CXX) $(CPP.Flags) $(CompileCommonOpts) $(CXX.Flags) \
566 $(CXX.Flags.NoRelink) -E
564 $(TargetCommonOpts) $(CompileCommonOpts) -c
565 Preprocess.CXX= $(BUILD_CXX) $(CPP.Flags) $(TargetCommonOpts) \
566 $(CompileCommonOpts) $(CXX.Flags) $(CXX.Flags.NoRelink) -E
567567 Link = $(BUILD_CXX) $(CPP.Flags) $(CXX.Flags) $(CXX.Flags.NoRelink) \
568 $(CompileCommonOpts) $(LD.Flags) $(Strip)
569 Relink = $(BUILD_CXX) $(CPP.Flags) $(CXX.Flags) $(CompileCommonOpts) \
570 $(Relink.Flags)
568 $(TargetCommonOpts) $(CompileCommonOpts) $(LD.Flags) $(Strip)
569 Relink = $(BUILD_CXX) $(CPP.Flags) $(CXX.Flags) $(TargetCommonOpts) \
570 $(CompileCommonOpts) $(Relink.Flags)
571571 else
572572 Compile.C = $(CC) $(CPP.Flags) $(C.Flags) $(C.Flags.NoRelink) \
573 $(CompileCommonOpts) -c
573 $(TargetCommonOpts) $(CompileCommonOpts) -c
574574 Compile.CXX = $(CXX) $(CPP.Flags) $(CXX.Flags) $(CXX.Flags.NoRelink) \
575 $(CompileCommonOpts) -c
576 Preprocess.CXX= $(CXX) $(CPP.Flags) $(CompileCommonOpts) $(CXX.Flags) \
577 $(CXX.Flags.NoRelink) -E
575 $(TargetCommonOpts) $(CompileCommonOpts) -c
576 Preprocess.CXX= $(CXX) $(CPP.Flags) $(TargetCommonOpts) \
577 $(CompileCommonOpts) $(CXX.Flags) $(CXX.Flags.NoRelink) -E
578578 Link = $(CXX) $(CPP.Flags) $(CXX.Flags) $(CXX.Flags.NoRelink) \
579 $(CompileCommonOpts) $(LD.Flags) $(Strip)
580 Relink = $(CXX) $(CPP.Flags) $(CXX.Flags) $(CompileCommonOpts) \
581 $(Relink.Flags)
582 endif
583
584 BCCompile.C = $(LLVMGCCWITHPATH) $(CPP.Flags) $(C.Flags) $(CompileCommonOpts)
585 Preprocess.C = $(CC) $(CPP.Flags) $(C.Flags) $(CompileCommonOpts) -E
579 $(TargetCommonOpts) $(CompileCommonOpts) $(LD.Flags) $(Strip)
580 Relink = $(CXX) $(CPP.Flags) $(CXX.Flags) $(TargetCommonOpts) \
581 $(CompileCommonOpts) $(Relink.Flags)
582 endif
583
584 BCCompile.C = $(LLVMGCCWITHPATH) $(CPP.Flags) $(C.Flags) \
585 $(TargetCommonOpts) $(CompileCommonOpts)
586 Preprocess.C = $(CC) $(CPP.Flags) $(C.Flags) \
587 $(TargetCommonOpts) $(CompileCommonOpts) -E
586588
587589 BCCompile.CXX = $(LLVMGXXWITHPATH) $(CPP.Flags) $(CXX.Flags) \
588 $(CompileCommonOpts)
590 $(TargetCommonOpts) $(CompileCommonOpts)
589591
590592 ProgInstall = $(INSTALL) $(Install.StripFlag) -m 0755
591593 ScriptInstall = $(INSTALL) -m 0755
None ; RUN: bugpoint %s -dce -bugpoint-deletecalls -simplifycfg -silence-passes
0 ; RUN: bugpoint %s -dce -bugpoint-deletecalls -simplifycfg -silence-passes %bugpoint_tops
11
22 @.LC0 = internal global [13 x i8] c"Hello World\0A\00" ; <[13 x i8]*> [#uses=1]
33
None ; RUN: bugpoint %s -bugpoint-crashcalls -silence-passes
0 ; RUN: bugpoint %s -bugpoint-crashcalls -silence-passes
11
22 ; Test to make sure that arguments are removed from the function if they are
33 ; unnecessary.
8686 else
8787 DSYMUTIL=true
8888 endif
89 ifeq ($(OS),Darwin)
90 BUGPOINT_TOPTS="-gcc-tool-args $(TargetCommonOpts)"
91 endif
8992
9093 FORCE:
9194
107110 @echo 'set objdir "$(LLVM_OBJ_ROOT)/test"' >>site.tmp
108111 @echo 'set gccpath "$(CC)"' >>site.tmp
109112 @echo 'set gxxpath "$(CXX)"' >>site.tmp
110 @echo 'set compile_c "' $(CC) $(CPP.Flags) $(CompileCommonOpts) -c '"' >>site.tmp
111 @echo 'set compile_cxx "' $(CXX) $(CPP.Flags) $(CXX.Flags) $(CompileCommonOpts) -c '"' >> site.tmp
112 @echo 'set link "' $(CXX) $(CPP.Flags) $(CXX.Flags) $(CompileCommonOpts) $(LD.Flags) '"' >>site.tmp
113 @echo 'set llvmgcc "$(LLVMGCC) $(EXTRA_OPTIONS)"' >> site.tmp
114 @echo 'set llvmgxx "$(LLVMGCC) $(EXTRA_OPTIONS)"' >> site.tmp
113 @echo 'set compile_c "' $(CC) $(CPP.Flags) $(TargetCommonOpts) $(CompileCommonOpts) -c '"' >>site.tmp
114 @echo 'set compile_cxx "' $(CXX) $(CPP.Flags) $(CXX.Flags) $(TargetCommonOpts) $(CompileCommonOpts) -c '"' >> site.tmp
115 @echo 'set link "' $(CXX) $(CPP.Flags) $(CXX.Flags) $(TargetCommonOpts) $(CompileCommonOpts) $(LD.Flags) '"' >>site.tmp
116 @echo 'set llvmgcc "$(LLVMGCC) $(TargetCommonOpts) $(EXTRA_OPTIONS)"' >> site.tmp
117 @echo 'set llvmgxx "$(LLVMGCC) $(TargetCommonOpts) $(EXTRA_OPTIONS)"' >> site.tmp
115118 @echo 'set llvmgccmajvers "$(LLVMGCC_MAJVERS)"' >> site.tmp
119 @echo 'set bugpoint_topts $(BUGPOINT_TOPTS)' >> site.tmp
116120 @echo 'set shlibext "$(SHLIBEXT)"' >> site.tmp
117121 @echo 'set ocamlc "$(OCAMLC) -cc $(CXX) -I $(LibDir)/ocaml"' >> site.tmp
118122 @echo 'set valgrind "$(VALGRIND)"' >> site.tmp
4747 proc substitute { line test tmpFile } {
4848 global srcroot objroot srcdir objdir subdir target_triplet prcontext
4949 global llvmgcc llvmgxx llvmgcc_version llvmgccmajvers ocamlc
50 global gccpath gxxpath compile_c compile_cxx link shlibext llvmlibsdir llvmdsymutil
51 global valgrind grep gas
50 global gccpath gxxpath compile_c compile_cxx link shlibext llvmlibsdir
51 global llvmdsymutil valgrind grep gas bugpoint_topts
5252 set path [file join $srcdir $subdir]
5353
5454 # Substitute all Tcl variables.
7676 regsub -all {%llvmdsymutil} $new_line "$llvmdsymutil" new_line
7777 #replace %llvmlibsdir with configure library directory
7878 regsub -all {%llvmlibsdir} $new_line "$llvmlibsdir" new_line
79 #replace %bugpoint_tops with actual bugpoint target options
80 regsub -all {%bugpoint_tops} $new_line "$bugpoint_topts" new_line
7981 #replace %p with path to source,
8082 regsub -all {%p} $new_line [file join $srcdir $subdir] new_line
8183 #replace %s with filename