[source] build: Pass -iremap gcc option as a single argument

LEDE Commits lede-commits at lists.infradead.org
Thu Dec 14 09:43:10 PST 2017


jow pushed a commit to source.git, branch lede-17.01:
https://git.lede-project.org/94f079e338d69f885645d2c99f235626b0ad2137

commit 94f079e338d69f885645d2c99f235626b0ad2137
Author: Michal Sojka <sojkam1 at fel.cvut.cz>
AuthorDate: Thu Feb 2 12:13:03 2017 +0100

    build: Pass -iremap gcc option as a single argument
    
    Passing -iremap argument separately causes problems with projects that
    use scons and its ParseFlags function. Consider this SConscript
    example:
    
        env = Environment()
        d = env.ParseFlags("-iremap one:two")
    
    ParseFlags will interpret one:two as a file name and the returned dict
    d will contain only "-iremap". When the -iremap is passed to the
    compiler without an argument, compilation obviously fails.
    
    Signed-off-by: Michal Sojka <sojkam1 at fel.cvut.cz>
    (cherry picked from commit 202ae4cc6a910dec2441c45dfdf5814ac4d82518)
---
 rules.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rules.mk b/rules.mk
index 1ed80f1..743619e 100644
--- a/rules.mk
+++ b/rules.mk
@@ -130,7 +130,7 @@ else
 endif
 
 ifeq ($(or $(CONFIG_EXTERNAL_TOOLCHAIN),$(CONFIG_GCC_VERSION_4_8),$(CONFIG_TARGET_uml)),)
-  iremap = -iremap $(1):$(2)
+  iremap = -iremap$(1):$(2)
 endif
 
 PACKAGE_DIR:=$(BIN_DIR)/packages



More information about the lede-commits mailing list