[dm-devel] [PATCH 67/72] multipath-tools: Makefile.inc: use -Wp, ... for compiling only
Benjamin Marzinski
bmarzins at redhat.com
Wed Oct 30 14:55:30 UTC 2019
On Sat, Oct 12, 2019 at 09:29:01PM +0000, Martin Wilck wrote:
> From: Martin Wilck <mwilck at suse.com>
>
> clang-3.9 errors out if -Wp,... preprocessor flags are used in the
> linking stage.
>
> Signed-off-by: Martin Wilck <mwilck at suse.com>
> ---
> Makefile.inc | 7 +++----
> 1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/Makefile.inc b/Makefile.inc
> index d4d08fe9..f309a274 100644
> --- a/Makefile.inc
> +++ b/Makefile.inc
> @@ -96,9 +96,8 @@ OPTFLAGS = -O2 -g -pipe -Wall -Wextra -Wformat=2 -Werror=implicit-int \
> -Werror=implicit-function-declaration -Werror=format-security \
> -Wno-clobbered \
> -Werror=cast-qual $(ERROR_DISCARDED_QUALIFIERS) \
> - -Wp,-D_FORTIFY_SOURCE=2 $(STACKPROT) \
> - --param=ssp-buffer-size=4
> -
> + $(STACKPROT) --param=ssp-buffer-size=4
> +CPPFLAGS := -Wp,-D_FORTIFY_SOURCE=2
Just a nit. The above line adds trailing whitespace.
-Ben
> CFLAGS := $(OPTFLAGS) -DBIN_DIR=\"$(bindir)\" -DLIB_STRING=\"${LIB}\" -DRUN_DIR=\"${RUN}\" \
> -MMD -MP $(CFLAGS)
> BIN_CFLAGS = -fPIE -DPIE
> @@ -135,4 +134,4 @@ check_file = $(shell \
>
> %.o: %.c
> @echo building $@ because of $?
> - $(CC) $(CFLAGS) -c -o $@ $<
> + $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
> --
> 2.23.0
More information about the dm-devel
mailing list