[Mesa-stable] [PATCH] configure.ac: strip _GNU_SOURCE from llvm-config output
Emil Velikov
emil.l.velikov at gmail.com
Fri Sep 5 13:00:55 PDT 2014
On 05/09/14 16:44, Jonathan Gray wrote:
> 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.
>
While I'm not a llvm aware person this patch makes perfect sense. We already
define it, and regardless if the autotools, cmake or both llvm builds define
this we are perfectly safe with dropping it.
Wild suggestion - might be nice to give a shout to the llvm people about this
inconsistency. Who knows they may have erroneously added it in the first place :)
Just one small nit - please the DEFINES in the clover state-tracker to
AM_CPPFLAGS. This way the other two static archives will not be short of the
define.
Thanks
Emil
> 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' \
>
More information about the mesa-stable
mailing list