From: Alan T. DeKok Date: Mon, 29 Mar 2021 20:58:55 +0000 (-0400) Subject: don't load make libraries for "clean". X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1a71009ee71d314aecabc5f7da1c06823c51e22d;p=thirdparty%2Ffreeradius-server.git don't load make libraries for "clean". and strip the -fsanitize=... options from the libfreeradius-make libraries, as GNU Make isn't built with the address/leak sanitizer --- diff --git a/Makefile b/Makefile index 85624a6f280..0ddc3affc83 100644 --- 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. diff --git a/scripts/build/dlopen.mk b/scripts/build/dlopen.mk index 77624286536..3438705e950 100644 --- a/scripts/build/dlopen.mk +++ b/scripts/build/dlopen.mk @@ -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. diff --git a/scripts/build/version.mk b/scripts/build/version.mk index be9cfe06883..bb71e819a2a 100644 --- a/scripts/build/version.mk +++ b/scripts/build/version.mk @@ -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.