Do not override CFLAGS defined in Makefile; use OPTIONS_CFLAGS to pass our

CFLAGS env variable;

Add -fwrap to CFLAGS to fix eventual haproxy spins when compiled with newer
versions of clang (FreeBSD-11 is affected). -- obtained from haproxy source tree.
This commit is contained in:
Dmitry Sivachenko 2017-04-19 12:57:56 +00:00
parent 8283956ce4
commit 2db870881c
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=438838
4 changed files with 24 additions and 2 deletions

View file

@ -24,7 +24,7 @@ DEVICEATLAS_DISTFILE= deviceatlas-enterprise-c-${DEVICEATLAS_VERSION}
DEVICEATLAS_REGISTRATION_URL= https://deviceatlas.com/deviceatlas-haproxy-module
MAKE_ARGS= TARGET=freebsd DEFINE=-DFREEBSD_PORTS USE_GETADDRINFO=1 \
USE_ZLIB=1 USE_CPU_AFFINITY=1 CC="${CC}" CFLAGS="${CFLAGS}"
USE_ZLIB=1 USE_CPU_AFFINITY=1 CC="${CC}" DEBUG_CFLAGS="" OPTIONS_CFLAGS="${CFLAGS}"
OPTIONS_DEFINE= DOCS EXAMPLES LUA OPENSSL DEVICEATLAS
OPTIONS_RADIO= PCRE

View file

@ -0,0 +1,11 @@
--- Makefile.orig 2017-04-19 13:18:14.404480000 +0300
+++ Makefile 2017-04-19 13:18:26.684393000 +0300
@@ -128,7 +128,7 @@ DEBUG_CFLAGS = -g
#### Compiler-specific flags that may be used to disable some negative over-
# optimization or to silence some warnings. -fno-strict-aliasing is needed with
# gcc >= 4.4.
-SPEC_CFLAGS = -fno-strict-aliasing -Wdeclaration-after-statement
+SPEC_CFLAGS = -fno-strict-aliasing -Wdeclaration-after-statement -fwrapv
#### Memory usage tuning
# If small memory footprint is required, you can reduce the buffer size. There

View file

@ -23,7 +23,7 @@ DEVICEATLAS_DISTFILE= deviceatlas-enterprise-c-${DEVICEATLAS_VERSION}
DEVICEATLAS_REGISTRATION_URL= https://deviceatlas.com/deviceatlas-haproxy-module
MAKE_ARGS= TARGET=freebsd DEFINE=-DFREEBSD_PORTS USE_GETADDRINFO=1 \
USE_ZLIB=1 USE_CPU_AFFINITY=1 CC="${CC}" CFLAGS="${CFLAGS}"
USE_ZLIB=1 USE_CPU_AFFINITY=1 CC="${CC}" DEBUG_CFLAGS="" OPTIONS_CFLAGS="${CFLAGS}"
OPTIONS_DEFINE= DOCS EXAMPLES LUA OPENSSL DEVICEATLAS
OPTIONS_RADIO= PCRE

View file

@ -0,0 +1,11 @@
--- Makefile.orig 2017-04-19 13:18:14.404480000 +0300
+++ Makefile 2017-04-19 13:18:26.684393000 +0300
@@ -128,7 +128,7 @@ DEBUG_CFLAGS = -g
#### Compiler-specific flags that may be used to disable some negative over-
# optimization or to silence some warnings. -fno-strict-aliasing is needed with
# gcc >= 4.4.
-SPEC_CFLAGS = -fno-strict-aliasing -Wdeclaration-after-statement
+SPEC_CFLAGS = -fno-strict-aliasing -Wdeclaration-after-statement -fwrapv
#### Memory usage tuning
# If small memory footprint is required, you can reduce the buffer size. There