[openwrt/openwrt] rules.mk: remove redundant target flags

LEDE Commits lede-commits at lists.infradead.org
Fri Nov 27 08:46:35 EST 2020


ynezz pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/e52d0487e88c3c8c57e1310d1a02b18eae0d142e

commit e52d0487e88c3c8c57e1310d1a02b18eae0d142e
Author: Petr Štetiar <ynezz at true.cz>
AuthorDate: Fri Nov 27 09:56:16 2020 +0100

    rules.mk: remove redundant target flags
    
    We're patching the GCC specs [1], [2] to implicitly add
    $STAGING_DIR/usr/lib to the linker and $STAGING_DIR/usr/include to the
    CPP flags. There is no need to globally pass these as -I and -L flags
    respectively.
    
    1. https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=toolchain/gcc/final/Makefile#l86
    2. https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=scripts/patch-specs.sh#l37
    
    Ref: https://patchwork.ozlabs.org/project/openwrt/patch/20200820060637.533293-1-a.heider@gmail.com/#2511505
    Suggested-by: Jo-Philipp Wich <jo at mein.io>
    Signed-off-by: Petr Štetiar <ynezz at true.cz>
---
 rules.mk | 2 --
 1 file changed, 2 deletions(-)

diff --git a/rules.mk b/rules.mk
index 671c8bdad8..adb103d81f 100644
--- a/rules.mk
+++ b/rules.mk
@@ -174,8 +174,6 @@ TARGET_CFLAGS:=$(TARGET_OPTIMIZATION)$(if $(CONFIG_DEBUG), -g3) $(call qstrip,$(
 TARGET_CXXFLAGS = $(TARGET_CFLAGS)
 TARGET_ASFLAGS_DEFAULT = $(TARGET_CFLAGS)
 TARGET_ASFLAGS = $(TARGET_ASFLAGS_DEFAULT)
-TARGET_CPPFLAGS:=-I$(STAGING_DIR)/usr/include
-TARGET_LDFLAGS:=-L$(STAGING_DIR)/usr/lib -L$(STAGING_DIR)/lib
 ifneq ($(CONFIG_EXTERNAL_TOOLCHAIN),)
 LIBGCC_S_PATH=$(realpath $(wildcard $(call qstrip,$(CONFIG_LIBGCC_ROOT_DIR))/$(call qstrip,$(CONFIG_LIBGCC_FILE_SPEC))))
 LIBGCC_S=$(if $(LIBGCC_S_PATH),-L$(dir $(LIBGCC_S_PATH)) -lgcc_s)



More information about the lede-commits mailing list