[llvm-commits] [test-suite] r166730 - in /test-suite/trunk: External/SPEC/CINT2000/176.gcc/Makefile External/SPEC/CINT2000/254.gap/Makefile External/SPEC/CINT2000/255.vortex/Makefile External/SPEC/CINT95/147.vortex/Makefile External/SPEC/Makefile.spec2000 External/SPEC/Makefile.spec2006 Makefile.config.in tools/Makefile tools/TargetConfig.mk.in

Daniel Dunbar daniel at zuster.org
Thu Oct 25 15:19:56 PDT 2012


Author: ddunbar
Date: Thu Oct 25 17:19:56 2012
New Revision: 166730

URL: http://llvm.org/viewvc/llvm-project?rev=166730&view=rev
Log:
build: Change build-tools to generate a target configuration Makefile fragment,
and use that to cleanup a bunch of SPEC makefiles.

 - This lets us use the compiler's built in defines to determine the target
   configuration.

Added:
    test-suite/trunk/tools/TargetConfig.mk.in
Modified:
    test-suite/trunk/External/SPEC/CINT2000/176.gcc/Makefile
    test-suite/trunk/External/SPEC/CINT2000/254.gap/Makefile
    test-suite/trunk/External/SPEC/CINT2000/255.vortex/Makefile
    test-suite/trunk/External/SPEC/CINT95/147.vortex/Makefile
    test-suite/trunk/External/SPEC/Makefile.spec2000
    test-suite/trunk/External/SPEC/Makefile.spec2006
    test-suite/trunk/Makefile.config.in
    test-suite/trunk/tools/Makefile

Modified: test-suite/trunk/External/SPEC/CINT2000/176.gcc/Makefile
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/External/SPEC/CINT2000/176.gcc/Makefile?rev=166730&r1=166729&r2=166730&view=diff
==============================================================================
--- test-suite/trunk/External/SPEC/CINT2000/176.gcc/Makefile (original)
+++ test-suite/trunk/External/SPEC/CINT2000/176.gcc/Makefile Thu Oct 25 17:19:56 2012
@@ -24,8 +24,3 @@
 ifeq ($(TARGET_OS),Darwin)
   LDFLAGS += -Xlinker -stack_size -Xlinker 0x800000
 endif
-
-ifeq ($(ARCH),Sparc)
-  ## SPEC portability note for GCC says to use these flags and cross fingers:
-  CPPFLAGS += -DSPEC_CPU2000_LP64
-endif

Modified: test-suite/trunk/External/SPEC/CINT2000/254.gap/Makefile
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/External/SPEC/CINT2000/254.gap/Makefile?rev=166730&r1=166729&r2=166730&view=diff
==============================================================================
--- test-suite/trunk/External/SPEC/CINT2000/254.gap/Makefile (original)
+++ test-suite/trunk/External/SPEC/CINT2000/254.gap/Makefile Thu Oct 25 17:19:56 2012
@@ -7,9 +7,6 @@
 # and we need the sysconf() macros.
 CPPFLAGS = -include unistd.h -DSYS_HAS_CALLOC_PROTO -DSYS_HAS_IOCTL_PROTO -DSYS_HAS_TIME_PROTO -DSYS_HAS_READ_PROTO
 include ../../Makefile.spec2000
-ifeq ($(ARCH),Sparc)
-CPPFLAGS+= -DSPEC_CPU2000_LP64
-endif
 
 ifeq ($(TARGET_OS),Darwin)
 CPPFLAGS += -DSYS_IS_BSD

Modified: test-suite/trunk/External/SPEC/CINT2000/255.vortex/Makefile
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/External/SPEC/CINT2000/255.vortex/Makefile?rev=166730&r1=166729&r2=166730&view=diff
==============================================================================
--- test-suite/trunk/External/SPEC/CINT2000/255.vortex/Makefile (original)
+++ test-suite/trunk/External/SPEC/CINT2000/255.vortex/Makefile Thu Oct 25 17:19:56 2012
@@ -9,8 +9,3 @@
 else
   RUN_OPTIONS     = lendian.raw
 endif
-
-ifeq ($(ARCH),Sparc)
-  ## SPEC portability note for vortex says to use this flag on 64-bit machines
-  CPPFLAGS += -DSPEC_CPU2000_LP64
-endif

Modified: test-suite/trunk/External/SPEC/CINT95/147.vortex/Makefile
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/External/SPEC/CINT95/147.vortex/Makefile?rev=166730&r1=166729&r2=166730&view=diff
==============================================================================
--- test-suite/trunk/External/SPEC/CINT95/147.vortex/Makefile (original)
+++ test-suite/trunk/External/SPEC/CINT95/147.vortex/Makefile Thu Oct 25 17:19:56 2012
@@ -11,20 +11,7 @@
 # $(STDOUT_FILENAME). We need both.
 LOCAL_OUTPUTS := vortex.out $(STDOUT_FILENAME)
 
-ifeq ($(ARCH),Sparc)
-  ## SPEC portability note for vortex says to use this flag on 64-bit machines
-  CPPFLAGS += -D__RISC_64__
-endif
-ifeq ($(ARCH),Alpha)
-  ## SPEC portability note for vortex says to use this flag on 64-bit machines
-  CPPFLAGS += -D__RISC_64__
-endif
-ifeq ($(ARCH),IA64)
-  ## SPEC portability note for vortex says to use this flag on 64-bit machines
-  CPPFLAGS += -D__RISC_64__
-endif
-ifeq ($(ARCH),x86_64)
-  ## SPEC portability note for vortex says to use this flag on 64-bit machines
+ifdef ARCH_LP64
   CPPFLAGS += -D__RISC_64__
 endif
 

Modified: test-suite/trunk/External/SPEC/Makefile.spec2000
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/External/SPEC/Makefile.spec2000?rev=166730&r1=166729&r2=166730&view=diff
==============================================================================
--- test-suite/trunk/External/SPEC/Makefile.spec2000 (original)
+++ test-suite/trunk/External/SPEC/Makefile.spec2000 Thu Oct 25 17:19:56 2012
@@ -9,13 +9,7 @@
 SPEC_ROOT := $(SPEC2000_ROOT)
 CPPFLAGS += -DSPEC_CPU2000
 
-ifeq ($(ARCH),x86_64)
-  CPPFLAGS += -DSPEC_CPU2000_LP64
-endif
-ifeq ($(ARCH),Alpha)
-  CPPFLAGS += -DSPEC_CPU2000_LP64
-endif
-ifeq ($(ARCH),IA64)
+ifdef ARCH_LP64
   CPPFLAGS += -DSPEC_CPU2000_LP64
 endif
 

Modified: test-suite/trunk/External/SPEC/Makefile.spec2006
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/External/SPEC/Makefile.spec2006?rev=166730&r1=166729&r2=166730&view=diff
==============================================================================
--- test-suite/trunk/External/SPEC/Makefile.spec2006 (original)
+++ test-suite/trunk/External/SPEC/Makefile.spec2006 Thu Oct 25 17:19:56 2012
@@ -9,13 +9,7 @@
 SPEC_ROOT := $(SPEC2006_ROOT)
 CPPFLAGS += -DSPEC_CPU2006
 
-ifeq ($(ARCH),x86_64)
-  CPPFLAGS += -DSPEC_CPU_LP64
-endif
-ifeq ($(ARCH),Alpha)
-  CPPFLAGS += -DSPEC_CPU_LP64
-endif
-ifeq ($(ARCH),IA64)
+ifdef ARCH_LP64
   CPPFLAGS += -DSPEC_CPU_LP64
 endif
 

Modified: test-suite/trunk/Makefile.config.in
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/Makefile.config.in?rev=166730&r1=166729&r2=166730&view=diff
==============================================================================
--- test-suite/trunk/Makefile.config.in (original)
+++ test-suite/trunk/Makefile.config.in Thu Oct 25 17:19:56 2012
@@ -61,6 +61,9 @@
 ARCH := @ARCH@
 ENDIAN := @ENDIAN@
 
+# Include the target config specific flags.
+-include $(PROJ_OBJ_ROOT)/tools/TargetConfig.mk
+
 endif
 
 # Define TCLSH here if LLVM's configuration Makefile is unavailable

Modified: test-suite/trunk/tools/Makefile
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/tools/Makefile?rev=166730&r1=166729&r2=166730&view=diff
==============================================================================
--- test-suite/trunk/tools/Makefile (original)
+++ test-suite/trunk/tools/Makefile Thu Oct 25 17:19:56 2012
@@ -1,7 +1,7 @@
 LEVEL=..
 include $(LEVEL)/Makefile.programs
 
-all:: timeit timeit-target fpcmp
+all:: timeit timeit-target fpcmp TargetConfig.mk
 
 timeit: timeit.c
 	$(ORIGINAL_CC) $(CFLAGS) -O3 -o $@ $<
@@ -12,5 +12,8 @@
 fpcmp: fpcmp.c
 	$(ORIGINAL_CC) $(CFLAGS) -O3 -o $@ $<
 
+TargetConfig.mk: TargetConfig.mk.in
+	$(LCC) -E -o $@ -x c $<
+
 clean::
-	rm -f timeit timeit-target fpcmp
+	rm -f timeit timeit-target fpcmp TargetConfig.mk

Added: test-suite/trunk/tools/TargetConfig.mk.in
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/tools/TargetConfig.mk.in?rev=166730&view=auto
==============================================================================
--- test-suite/trunk/tools/TargetConfig.mk.in (added)
+++ test-suite/trunk/tools/TargetConfig.mk.in Thu Oct 25 17:19:56 2012
@@ -0,0 +1,14 @@
+/* This file is preprocessed to generate the TargetConfig makefile fragment. We
+ * use this in order to support using the compiler's built-in defines to
+ * generate the appropriate configuration parameters.
+ */
+
+#ifdef __LP64__
+ARCH_LP64 := YES
+#endif
+
+#ifdef __LITTLE_ENDIAN
+ENDIAN := little
+#else
+ENDIAN := big
+#endif





More information about the llvm-commits mailing list