Author: reid Date: Sun Aug 5 01:10:33 2007 New Revision: 40836 URL: http://llvm.org/viewvc/llvm-project?rev=40836&view=rev Log: Stabilize test-suite:
1. Return to using -enable-correct-eh-support instead of -enable-eh until the enable-eh option proves itself. Several new test failures were tracked to this option. 2. Ensure that C++ programs are linked with g++ and not gcc as it does make a difference even though the input is assembly. The trick to doing this is to look for test directories that put -lstdc++ in LDFLAGS. These are undoubtedly C++ programs, even if just partially. 3. Correct the specification of -lstdc++ to be in LDFLAGS instead of LIBS in various Makefiles. 4. Make a couple new test directories ignore the Output directory to beautify the output of svn status. Modified: test-suite/trunk/Makefile.programs test-suite/trunk/MultiSource/Applications/Burg/Makefile test-suite/trunk/MultiSource/Applications/SIBsim4/ (props changed) test-suite/trunk/MultiSource/Applications/minisat/ (props changed) test-suite/trunk/MultiSource/Applications/minisat/Makefile test-suite/trunk/SingleSource/Benchmarks/Shootout-C++/Makefile test-suite/trunk/SingleSource/Regression/C++/EH/Makefile test-suite/trunk/SingleSource/Regression/C++/Makefile test-suite/trunk/SingleSource/UnitTests/SetjmpLongjmp/C++/Makefile test-suite/trunk/SingleSource/UnitTests/SignlessTypes/Makefile test-suite/trunk/SingleSource/UnitTests/Threads/ (props changed) Modified: test-suite/trunk/Makefile.programs URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/Makefile.programs?rev=40836&r1=40835&r2=40836&view=diff ============================================================================== --- test-suite/trunk/Makefile.programs (original) +++ test-suite/trunk/Makefile.programs Sun Aug 5 01:10:33 2007 @@ -43,8 +43,7 @@ include $(LEVEL)/Makefile.tests .PRECIOUS: Output/%.llvm Output/%.native Output/%.llc Output/%.llc.s -.PRECIOUS: Output/%.cbe Output/%.cbe.c Output/%.llvm.bc -.PRECIOUS: Output/%.linked.bc +.PRECIOUS: Output/%.cbe Output/%.cbe.c Output/%.llvm.bc Output/%.linked.bc # If we're using the llvm-gcc3 compiler then we need to also link with the # llvm c runtime library, othwerwise we don't @@ -304,7 +303,7 @@ # If the program requires exception handling support, enable (potentially # expensive) support for it. ifdef REQUIRES_EH_SUPPORT -LLCFLAGS += -enable-eh +LLCFLAGS += -enable-correct-eh-support LLVMLD_FLAGS += -disable-inlining endif @@ -313,6 +312,14 @@ LLCFLAGS += $(TARGET_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. +ifneq ($(filter -lstdc++,$(LDFLAGS)),) +LLVMGCCLD := $(CXX) +else +LLVMGCCLD := $(CC) +endif + # # Rules to compile the program for the C Back End # @@ -320,14 +327,9 @@ Output/%.cbe.c: Output/%.llvm.bc $(LLC) -$(LLC) $(LLCFLAGS) -march=c $< -o $@ -f -ifdef REQUIRES_EH_SUPPORT -MORE_LDFLAGS=-L$(LLVMGCCDIR)/lib/gcc/$(LLVMGCCARCH) -L$(LLVMGCCDIR)/lib -lstdc++ -endif - $(PROGRAMS_TO_TEST:%=Output/%.cbe): \ Output/%.cbe: Output/%.cbe.c - -$(CC) $< -o $@ $(LDFLAGS) $(MORE_LDFLAGS) $(CFLAGS) \ - -fno-strict-aliasing -O2 -fno-inline $(TARGET_FLAGS) + -$(CC) $< -o $@ $(LDFLAGS) $(CFLAGS) -fno-strict-aliasing -O2 -fno-inline $(TARGET_FLAGS) $(LIBS) # # Compile a linked program to machine code with LLC. @@ -353,13 +355,11 @@ # $(PROGRAMS_TO_TEST:%=Output/%.llc): \ Output/%.llc: Output/%.llc.s - -$(CC) $(CFLAGS) $< -o $@ $(LLCLIBS) $(LLCASSEMBLERFLAGS) \ - $(TARGET_FLAGS) $(LDFLAGS) $(MORE_LDFLAGS) + -$(LLVMGCCLD) $(CFLAGS) $< -o $@ $(LLCLIBS) $(LLCASSEMBLERFLAGS) $(TARGET_FLAGS) $(LDFLAGS) $(PROGRAMS_TO_TEST:%=Output/%.llc-beta): \ Output/%.llc-beta: Output/%.llc-beta.s - -$(CC) $(CFLAGS) $< -o $@ $(LLCLIBS) $(LLCASSEMBLERFLAGS) \ - $(TARGET_FLAGS) $(LDFLAGS) $(MORE_LDFLAGS) + -$(LLVMGCCLD) $(CFLAGS) $< -o $@ $(LLCLIBS) $(LLCASSEMBLERFLAGS) $(TARGET_FLAGS) $(LDFLAGS) # @@ -377,7 +377,7 @@ # If the program requires exception handling support, enable (potentially # expensive) support for it. ifdef REQUIRES_EH_SUPPORT -JIT_OPTS += -enable-eh +JIT_OPTS += -enable-correct-eh-support endif native: $(PROGRAMS_TO_TEST:%=Output/%.native) Modified: test-suite/trunk/MultiSource/Applications/Burg/Makefile URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/MultiSource/Applications/Burg/Makefile?rev=40836&r1=40835&r2=40836&view=diff ============================================================================== --- test-suite/trunk/MultiSource/Applications/Burg/Makefile (original) +++ test-suite/trunk/MultiSource/Applications/Burg/Makefile Sun Aug 5 01:10:33 2007 @@ -4,7 +4,7 @@ PROG = burg CPPFLAGS = -DDEBUG -LDFLAGS = +LDFLAGS = -lstdc++ ExtraSource := y.tab.c Propchange: test-suite/trunk/MultiSource/Applications/SIBsim4/ ------------------------------------------------------------------------------ --- svn:ignore (added) +++ svn:ignore Sun Aug 5 01:10:33 2007 @@ -0,0 +1 @@ +Output Propchange: test-suite/trunk/MultiSource/Applications/minisat/ ------------------------------------------------------------------------------ --- svn:ignore (added) +++ svn:ignore Sun Aug 5 01:10:33 2007 @@ -0,0 +1 @@ +Output Modified: test-suite/trunk/MultiSource/Applications/minisat/Makefile URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/MultiSource/Applications/minisat/Makefile?rev=40836&r1=40835&r2=40836&view=diff ============================================================================== --- test-suite/trunk/MultiSource/Applications/minisat/Makefile (original) +++ test-suite/trunk/MultiSource/Applications/minisat/Makefile Sun Aug 5 01:10:33 2007 @@ -3,7 +3,7 @@ LEVEL = ../../.. PROG = minisat CPPFLAGS = -D NDEBUG -LDFLAGS = -lz -lm +LDFLAGS = -lz -lstdc++ -lm ifdef SMALL_PROBLEM_SIZE RUN_OPTIONS = -verbosity=0 $(PROJ_SRC_DIR)/small.cnf.gz else Modified: test-suite/trunk/SingleSource/Benchmarks/Shootout-C++/Makefile URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Benchmarks/Shootout-C%2B%2B/Makefile?rev=40836&r1=40835&r2=40836&view=diff ============================================================================== --- test-suite/trunk/SingleSource/Benchmarks/Shootout-C++/Makefile (original) +++ test-suite/trunk/SingleSource/Benchmarks/Shootout-C++/Makefile Sun Aug 5 01:10:33 2007 @@ -1,7 +1,8 @@ LEVEL = ../../.. CXXFLAGS += -Wno-deprecated CPPFLAGS += -Wno-deprecated -REQUIRES_EH_SUPPORT=1 -FP_TOLERANCE = 0.00000001 +REQUIRES_EH_SUPPORT:=1 +FP_TOLERANCE := 0.00000001 +LDFLAGS += -lstdc++ include $(LEVEL)/SingleSource/Makefile.singlesrc Modified: test-suite/trunk/SingleSource/Regression/C++/EH/Makefile URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C%2B%2B/EH/Makefile?rev=40836&r1=40835&r2=40836&view=diff ============================================================================== --- test-suite/trunk/SingleSource/Regression/C++/EH/Makefile (original) +++ test-suite/trunk/SingleSource/Regression/C++/EH/Makefile Sun Aug 5 01:10:33 2007 @@ -3,5 +3,4 @@ include $(LEVEL)/SingleSource/Makefile.singlesrc CFLAGS += -std=c99 -LIBS = -lstdc++ - +LDFLAGS += -lstdc++ Modified: test-suite/trunk/SingleSource/Regression/C++/Makefile URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/Regression/C%2B%2B/Makefile?rev=40836&r1=40835&r2=40836&view=diff ============================================================================== --- test-suite/trunk/SingleSource/Regression/C++/Makefile (original) +++ test-suite/trunk/SingleSource/Regression/C++/Makefile Sun Aug 5 01:10:33 2007 @@ -6,7 +6,6 @@ # LEVEL = ../../.. DIRS=EH -LDFLAGS += -lstdc++ include $(LEVEL)/SingleSource/Makefile.singlesrc CFLAGS += -std=c99 - +LDFLAGS += -lstdc++ Modified: test-suite/trunk/SingleSource/UnitTests/SetjmpLongjmp/C++/Makefile URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/UnitTests/SetjmpLongjmp/C%2B%2B/Makefile?rev=40836&r1=40835&r2=40836&view=diff ============================================================================== --- test-suite/trunk/SingleSource/UnitTests/SetjmpLongjmp/C++/Makefile (original) +++ test-suite/trunk/SingleSource/UnitTests/SetjmpLongjmp/C++/Makefile Sun Aug 5 01:10:33 2007 @@ -1,7 +1,5 @@ # SingleSource/UnitTests/SetjmpLongjmp/Makefile LEVEL = ../../../.. REQUIRES_EH_SUPPORT = 1 -LIBS = -lstdc++ include $(LEVEL)/SingleSource/Makefile.singlesrc - - +LDFLAGS += -lstdc++ Modified: test-suite/trunk/SingleSource/UnitTests/SignlessTypes/Makefile URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/SingleSource/UnitTests/SignlessTypes/Makefile?rev=40836&r1=40835&r2=40836&view=diff ============================================================================== --- test-suite/trunk/SingleSource/UnitTests/SignlessTypes/Makefile (original) +++ test-suite/trunk/SingleSource/UnitTests/SignlessTypes/Makefile Sun Aug 5 01:10:33 2007 @@ -10,5 +10,5 @@ # the same results regardless of whether you make clean or not. RUN_OPTIONS := 31415926 -include $(LEVEL)/Makefile.config +LDFLAGS += -lstdc++ include $(LEVEL)/SingleSource/Makefile.singlesrc Propchange: test-suite/trunk/SingleSource/UnitTests/Threads/ ------------------------------------------------------------------------------ --- svn:ignore (added) +++ svn:ignore Sun Aug 5 01:10:33 2007 @@ -0,0 +1 @@ +Output _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits