Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit acda921

Browse files
committedJun 23, 2022
Makefile: honor CPPFLAGS variable
Fix the following lintian warning: I: isochron: hardening-no-fortify-functions usr/bin/isochron N: N: This package provides an ELF binary that lacks the use of fortified libc N: functions. Either there are no potentially unfortified functions called N: by any routines, all unfortified calls have already been fully validated N: at compile-time, or the package was not built with the default Debian N: compiler flags defined by dpkg-buildflags. If built using N: dpkg-buildflags directly, be sure to import CPPFLAGS. N: N: NB: Due to false-positives, Lintian ignores some unprotected functions N: (e.g. memcpy). N: N: Refer to https://wiki.debian.org/Hardening and N: https://bugs.debian.org/673112 for details. N: N: Severity: info N: N: Check: binaries Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
1 parent fe232cc commit acda921

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed
 

‎Makefile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
VERSION := $(shell ./setlocalversion)
2-
MY_CFLAGS := -DVERSION=\"${VERSION}\" $(CFLAGS)
3-
MY_CFLAGS += -Wall -Wextra -Werror -Wno-error=sign-compare \
2+
MY_CPPFLAGS := -DVERSION=\"${VERSION}\" $(CPPFLAGS)
3+
MY_CPPFLAGS += $(shell ./toolchain_deps.sh "$(CC)" "$(MY_CPPFLAGS)")
4+
MY_CFLAGS := -Wall -Wextra -Werror -Wno-error=sign-compare \
45
-Wno-error=missing-field-initializers \
5-
-Wno-unused-parameter
6-
MY_CFLAGS += $(shell ./toolchain_deps.sh "$(CC)" "$(MY_CFLAGS)")
6+
-Wno-unused-parameter $(CFLAGS)
77
MY_LDFLAGS := $(LDFLAGS)
88
CHECK := sparse
99
CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \
@@ -91,9 +91,9 @@ $(TARGET): $(objs)
9191
$(CC) $^ -o $@ $(MY_LDFLAGS) -lm -pthread
9292

9393
%.o: %.c
94-
$(CC) $(MY_CFLAGS) -MMD -c $< -o $@
94+
$(CC) $(MY_CPPFLAGS) $(MY_CFLAGS) -MMD -c $< -o $@
9595
ifeq ($(C),1)
96-
$(CHECK) $(CHECKFLAGS) $(MY_CFLAGS) $<
96+
$(CHECK) $(CHECKFLAGS) $(MY_CPPFLAGS) $(MY_CFLAGS) $<
9797
endif
9898

9999
clean:

0 commit comments

Comments
 (0)
Please sign in to comment.