Mesa (master): mesa: consolidate some compiler -D flags

Brian Paul brianp at kemper.freedesktop.org
Fri Dec 3 21:49:37 UTC 2010


Module: Mesa
Branch: master
Commit: b87369e863c4c9650ef3a04a111e9ca79bca9e08
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=b87369e863c4c9650ef3a04a111e9ca79bca9e08

Author: Brian Paul <brianp at vmware.com>
Date:   Fri Dec  3 10:59:52 2010 -0700

mesa: consolidate some compiler -D flags

-D__STDC_CONSTANT_MACROS and -D__STDC_LIMIT_MACROS are only needed for
LLVM build.

---

 configs/linux-llvm                    |    5 +++--
 src/gallium/auxiliary/Makefile        |    3 ---
 src/gallium/drivers/llvmpipe/Makefile |    2 --
 3 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/configs/linux-llvm b/configs/linux-llvm
index 6aa4340..9b06be9 100644
--- a/configs/linux-llvm
+++ b/configs/linux-llvm
@@ -12,10 +12,11 @@ GALLIUM_DRIVERS_DIRS += llvmpipe
 OPT_FLAGS = -O3 -ansi -pedantic
 ARCH_FLAGS = -mmmx -msse -msse2 -mstackrealign
 
-DEFINES += -DNDEBUG -DGALLIUM_LLVMPIPE -DHAVE_UDIS86
+DEFINES += -DNDEBUG -DGALLIUM_LLVMPIPE -DHAVE_UDIS86 \
+	-D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS
 
 # override -std=c99
-CFLAGS += -std=gnu99 -D__STDC_CONSTANT_MACROS
+CFLAGS += -std=gnu99
 
 LLVM_VERSION := $(shell llvm-config --version)
 
diff --git a/src/gallium/auxiliary/Makefile b/src/gallium/auxiliary/Makefile
index 574385a..ff355c4 100644
--- a/src/gallium/auxiliary/Makefile
+++ b/src/gallium/auxiliary/Makefile
@@ -203,9 +203,6 @@ CPP_SOURCES += \
 endif
 
 
-LIBRARY_DEFINES += -D__STDC_CONSTANT_MACROS
-
-
 include ../Makefile.template
 
 
diff --git a/src/gallium/drivers/llvmpipe/Makefile b/src/gallium/drivers/llvmpipe/Makefile
index 669e42e..4068bed 100644
--- a/src/gallium/drivers/llvmpipe/Makefile
+++ b/src/gallium/drivers/llvmpipe/Makefile
@@ -3,8 +3,6 @@ include $(TOP)/configs/current
 
 LIBNAME = llvmpipe
 
-DEFINES += -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS
-
 C_SOURCES = \
 	lp_bld_alpha.c \
 	lp_bld_blend_aos.c \




More information about the mesa-commit mailing list