mirror of
git://git.openwrt.org/openwrt/openwrt.git
synced 2026-06-11 04:37:26 -04:00
libcap: add CPPFLAGS
Forward the OpenWrt CPPFLAGS to the compile process. This fixes fortify
sources support.
Allow to extend the CPPFLAGS and not only overwrite.
Link: https://github.com/openwrt/openwrt/pull/22056
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit 53e6935960)
This commit is contained in:
@@ -66,6 +66,7 @@ MAKE_FLAGS += \
|
|||||||
BUILD_CC="$(CC)" \
|
BUILD_CC="$(CC)" \
|
||||||
BUILD_CFLAGS="$(FPIC) -I$(PKG_BUILD_DIR)/libcap/include" \
|
BUILD_CFLAGS="$(FPIC) -I$(PKG_BUILD_DIR)/libcap/include" \
|
||||||
CFLAGS="$(TARGET_CFLAGS)" \
|
CFLAGS="$(TARGET_CFLAGS)" \
|
||||||
|
TARGET_CPPFLAGS="$(TARGET_CPPFLAGS)" \
|
||||||
LD="$(TARGET_CC) -Wl,-x -shared" \
|
LD="$(TARGET_CC) -Wl,-x -shared" \
|
||||||
LDFLAGS="$(TARGET_LDFLAGS)" \
|
LDFLAGS="$(TARGET_LDFLAGS)" \
|
||||||
INDENT="| true" \
|
INDENT="| true" \
|
||||||
|
|||||||
15
package/libs/libcap/patches/002-fix-CPPFLAGS.patch
Normal file
15
package/libs/libcap/patches/002-fix-CPPFLAGS.patch
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
Add variable to extend the CPPFLAGS. When specifying CPPFLAGS, it will
|
||||||
|
replace CPPFLAGS. When giving TARGET_CPPFLAGS it is added to the
|
||||||
|
CPPFLAGS.
|
||||||
|
|
||||||
|
--- a/Make.Rules
|
||||||
|
+++ b/Make.Rules
|
||||||
|
@@ -83,7 +83,7 @@ WARNINGS=-Wall -Wwrite-strings -Wpointer
|
||||||
|
COPTS ?= -O2
|
||||||
|
CFLAGS ?= $(COPTS) $(DEBUG)
|
||||||
|
CFLAGS += $(WARNINGS)
|
||||||
|
-CPPFLAGS += -Dlinux $(DEFINES) $(LIBCAP_INCLUDES)
|
||||||
|
+CPPFLAGS += $(TARGET_CPPFLAGS) -Dlinux $(DEFINES) $(LIBCAP_INCLUDES)
|
||||||
|
LDFLAGS ?= # -g
|
||||||
|
|
||||||
|
BUILD_CC ?= $(CC)
|
||||||
Reference in New Issue
Block a user