From 2e73fcd4b02cd6210c628c0c6e7a8e54cbddca41 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Thu, 25 Jun 2015 12:54:05 +0200 Subject: [PATCH] c-ares: fix build with CONFIG_PKG_FORTIFY_SOURCE* When fortify source is enabled, the c-ares configure script will abort with: configure: CFLAGS error: CFLAGS may only be used to specify C compiler flags, not macro definitions. Use CPPFLAGS for: -D_FORTIFY_SOURCE=1 Change the OpenWrt Makefile to move any -D flags from TARGET_CFLAGS to TARGET_CPPFLAGS in order to satisfy `configure`. Signed-off-by: Jo-Philipp Wich --- libs/c-ares/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libs/c-ares/Makefile b/libs/c-ares/Makefile index 815a379a39..c5b2269975 100644 --- a/libs/c-ares/Makefile +++ b/libs/c-ares/Makefile @@ -22,6 +22,9 @@ PKG_INSTALL:=1 include $(INCLUDE_DIR)/package.mk +TARGET_CPPFLAGS += $(filter -D%,$(TARGET_CFLAGS)) +TARGET_CFLAGS := $(filter-out -D%,$(TARGET_CFLAGS)) + define Package/libcares SECTION:=libs CATEGORY:=Libraries -- 2.30.2