]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
don't load make libraries for "clean".
authorAlan T. DeKok <aland@freeradius.org>
Mon, 29 Mar 2021 20:58:55 +0000 (16:58 -0400)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Wed, 31 Mar 2021 15:12:36 +0000 (16:12 +0100)
and strip the -fsanitize=... options from the libfreeradius-make
libraries, as GNU Make isn't built with the address/leak sanitizer

Makefile
scripts/build/dlopen.mk
scripts/build/version.mk

index 85624a6f280c1c090fb695c3cb05447dfc409fca..0ddc3affc8306de8c59735e70401498d3467229c 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -106,8 +106,10 @@ build/autoconf.mk: src/include/autoconf.h
 #
 #  Ensure that these libraries are built ONLY when doing a full build,
 #  AND that they are built and loaded before using the rest of the
-#  boilermake framework.
+#  boilermake framework, UNLESS we're doing "make clean", in which case
+#  don't include the magic libraries.
 #
+ifeq "$(findstring clean,$(MAKECMDGOALS))" ""
 ifeq "$(findstring libfreeradius-make,$(MAKECMDGOALS))" ""
 _:=$(shell make libfreeradius-make-dlopen.a libfreeradius-make-version.a)
 
@@ -123,6 +125,7 @@ else
 BUILD_DIR:=${top_srcdir}/build
 top_builddir:=${top_srcdir}/scripts/build
 endif
+endif
 
 #
 #  Load the huge boilermake framework.
index 77624286536ab27534653a5fa0efc3e7607c76d1..3438705e9509c955fd3447125a077a37370d0b1c 100644 (file)
@@ -1,6 +1,12 @@
 TARGET         := libfreeradius-make-dlopen.a
 SOURCES                := dlopen.c log.c
 
+#
+#  This target is NOT built with static analyzer flags.
+#
+$(TARGET): CFLAGS  :=$(filter-out -fsanitize%,$(CFLAGS))
+$(TARGET): LDFLAGS :=$(filter-out -fsanitize%,$(LDFLAGS))
+
 #
 #  If we're building this target, then don't try to use it until we know
 #  that building the target succeeds.
index be9cfe068830dac9682243695774b73963fff8f0..bb71e819a2a01589bf0a4a840af624b83fe7dd46 100644 (file)
@@ -1,6 +1,12 @@
 TARGET                 := libfreeradius-make-version.a
 SOURCES                := version.c log.c
 
+#
+#  This target is NOT built with static analyzer flags.
+#
+$(TARGET): CFLAGS  :=$(filter-out -fsanitize%,$(CFLAGS))
+$(TARGET): LDFLAGS :=$(filter-out -fsanitize%,$(LDFLAGS))
+
 #
 #  If we're building this target, then don't try to use it until we know
 #  that building the target succeeds.