[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[creduce-bugs] [PATCH] creduce build system can cause bogus cflags settings, causing the build to fail
Hi,
if LLVM is built with an option like -Werror=format-security, creduce's
autoconf scripts and Makefiles break the build.
The problem is in m4/ax_llvm.m4:
LLVM_CPPFLAGS=`$LLVM_CONFIG --cxxflags | sed -e 's/-Werror//' | sed -e
's/-pedantic//'`
and in clang_delta/Makefile.am:
LLVMCXXFLAGS := $(shell "$(LLVM_CONFIG)" --cxxflags | sed -e
's/-Werror//')
-Werror gets removed, leaving =format-security, which isn't a valid
compiler option -- causing the build to fail.
The attached patch should fix it.
ttyl
bero
--- creduce-2.3.0/clang_delta/Makefile.am.omv~ 2015-06-07 14:33:02.530909700 +0200
+++ creduce-2.3.0/clang_delta/Makefile.am 2015-06-07 14:33:02.533909685 +0200
@@ -19,7 +19,7 @@ GIT_FLAG = -DGIT_VERSION=\"$(GIT_HASH)\"
# Avoid the warning by making `--ldflags' and `--libs' not look like
# linker options.
#
-LLVMCXXFLAGS := $(shell "$(LLVM_CONFIG)" --cxxflags | sed -e 's/-Werror//') \
+LLVMCXXFLAGS := $(shell "$(LLVM_CONFIG)" --cxxflags | sed -e 's/-Werror[ $]//') \
-fno-rtti -fno-exceptions
LLVMLDFLAGS := $(shell "$(LLVM_CONFIG)" \--ldflags)
LLVMINCLUDEDIR := $(shell "$(LLVM_CONFIG)" --includedir)
--- creduce-2.3.0/m4/ax_llvm.m4.omv~ 2015-06-07 14:31:01.381395621 +0200
+++ creduce-2.3.0/m4/ax_llvm.m4 2015-06-07 14:33:02.562909531 +0200
@@ -74,7 +74,7 @@ AC_DEFUN([AX_LLVM],
fi
LLVM_BINDIR=`$LLVM_CONFIG --bindir`
- LLVM_CPPFLAGS=`$LLVM_CONFIG --cxxflags | sed -e 's/-Werror//' | sed -e 's/-pedantic//'`
+ LLVM_CPPFLAGS=`$LLVM_CONFIG --cxxflags | sed -e 's/-Werror[ $]//' | sed -e 's/-pedantic//'`
LLVM_LDFLAGS="`$LLVM_CONFIG --ldflags` $LLVM_SYSLIBS"
LLVM_LIBS=`$LLVM_CONFIG --libs $2`