Patchwork PATCH: Remove 'CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)'

login
register
mail settings
Submitter H.J. Lu
Date Dec. 12, 2012, 5:53 p.m.
Message ID <CAMe9rOqM=v_QWWDP9G1mjtHZ=a03QsCc7oN7dYKDAKj++qTWdQ@mail.gmail.com>
Download mbox | patch
Permalink /patch/205590/
State New
Headers show

Comments

H.J. Lu - Dec. 12, 2012, 5:53 p.m.
On Wed, Dec 12, 2012 at 9:30 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
> After further investigation, I found
>
> RAW_CXX_TARGET_EXPORTS = \
>         $(BASE_TARGET_EXPORTS) \
>         CXX_FOR_TARGET="$(RAW_CXX_FOR_TARGET)"; export CXX_FOR_TARGET; \
>         CXX="$(RAW_CXX_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS";
> export CXX;
> ...
>
> all-stage1-target-libsanitizer: configure-stage1-target-libsanitizer
>         @[ $(current_stage) = stage1 ] || $(MAKE) stage1-start
>         @r=`${PWD_COMMAND}`; export r; \
>         s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
>         TFLAGS="$(STAGE1_TFLAGS)"; \
>         $(RAW_CXX_TARGET_EXPORTS)  \
>         cd $(TARGET_SUBDIR)/libsanitizer && \
>         $(MAKE) $(BASE_FLAGS_TO_PASS) \
>                 CFLAGS="$(CFLAGS_FOR_TARGET)" \
>                 CXXFLAGS="$(CXXFLAGS_FOR_TARGET)" \
>                 LIBCFLAGS="$(LIBCFLAGS_FOR_TARGET)" \
>                 CFLAGS_FOR_TARGET="$(CFLAGS_FOR_TARGET)" \
>                 CXXFLAGS_FOR_TARGET="$(CXXFLAGS_FOR_TARGET)" \
>                 LIBCFLAGS_FOR_TARGET="$(LIBCFLAGS_FOR_TARGET)" \
>                 $(EXTRA_TARGET_FLAGS) 'CXX=$$(RAW_CXX_FOR_TARGET)'
> 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)'  \
>                   \
>                 TFLAGS="$(STAGE1_TFLAGS)" \
>                 $(TARGET-stage1-target-libsanitizer)
>
> The problem is
>
> CXX=$$(RAW_CXX_FOR_TARGET)' 'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)'
>
> Those are bogus since
>
> 1. We never set RAW_CXX_FOR_TARGET.
> 2. We have set
>
>         CXX_FOR_TARGET="$(RAW_CXX_FOR_TARGET)"; export CXX_FOR_TARGET; \
>         CXX="$(RAW_CXX_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS";
> export CXX;
>
> in RAW_CXX_TARGET_EXPORTS.  There is no need to do anything.
>

Here is a patch to remove 'CXX=$$(RAW_CXX_FOR_TARGET)'
'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)'.  Tested on
Linux/x86-64.  OK to install?

Thanks.

Patch

diff --git a/Makefile.tpl b/Makefile.tpl
index 5cdc119..dbcd5c3 100644
--- a/Makefile.tpl
+++ b/Makefile.tpl
@@ -1281,7 +1281,7 @@  maybe-[+make_target+]-[+module+]:
[+make_target+]-[+module+]

 [+ all prefix="target-" subdir="$(TARGET_SUBDIR)"
        exports="$(RAW_CXX_TARGET_EXPORTS)"
-       args="$(EXTRA_TARGET_FLAGS) 'CXX=$$(RAW_CXX_FOR_TARGET)'
'CXX_FOR_TARGET=$$(RAW_CXX_FOR_TARGET)'" +]
+       args="$(EXTRA_TARGET_FLAGS)" +]
 [+ ELSE +]