[Mesa-stable] [PATCH] configure.ac: strip _GNU_SOURCE from llvm-config output

Jonathan Gray jsg at jsg.id.au
Fri Sep 5 08:44:41 PDT 2014


Mesa already defines _GNU_SOURCE for glibc based systems and defining
_GNU_SOURCE will break the Mesa build on other systems such as OpenBSD.

_GNU_SOURCE only seems to be included in llvm-config output when
LLVM is built via autoconf and not when it is built by cmake.

Cc: "10.2 10.3" <mesa-stable at lists.freedesktop.org>
Signed-off-by: Jonathan Gray <jsg at jsg.id.au>
---
 configure.ac | 1 +
 1 file changed, 1 insertion(+)

diff --git a/configure.ac b/configure.ac
index af950e7..0722114 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1650,6 +1650,7 @@ strip_unwanted_llvm_flags() {
     # Use \> (marks the end of the word)
     echo `$1` | sed \
 	-e 's/-DNDEBUG\>//g' \
+	-e 's/-D_GNU_SOURCE\>//g' \
 	-e 's/-pedantic\>//g' \
 	-e 's/-Wcovered-switch-default\>//g' \
 	-e 's/-O.\>//g' \
-- 
1.9.3



More information about the mesa-stable mailing list