<div dir="ltr"><div bgcolor="#232729" text="#eeeeec" link="#4a90d9" vlink="#eeeeec" style="word-wrap:break-word;line-break:after-white-space"><div style="width:71ch">On Fri, 2017-12-08 at 16:55 +1030, Joel Stanley wrote:</div><blockquote type="cite"><pre><span class="m_-3921526044644685841-x-evo-quoted"><span class="m_-3921526044644685841-x-evo-quote-character">> </span></span>When I reworked Thomas' fix, I put the symbol prefix in the wrong spot.</pre><pre><span class="m_-3921526044644685841-x-evo-quoted"><span class="m_-3921526044644685841-x-evo-quote-character">> </span></span>This resolves that bug and makes it clearer what is going on in the</pre><pre><span class="m_-3921526044644685841-x-evo-quoted"><span class="m_-3921526044644685841-x-evo-quote-character">> </span></span>template.</pre><pre><span class="m_-3921526044644685841-x-evo-quoted"><span class="m_-3921526044644685841-x-evo-quote-character">> </span></span><br></pre></blockquote><div style="width:71ch"><br></div><div style="width:71ch">Heh, well played Joel, this patch exposes a parallel make problem.</div><div style="width:71ch"><br></div><div style="width:71ch">I can reliably reproduce on my laptop, only from a fresh checkout (`git clean -fdx` doesn't reproduce).</div><div style="width:71ch"><br></div><div style="width:71ch">diff --git a/Makefile.am b/Makefile.am</div><div style="width:71ch">index 38a66c4..ea9d950 100644</div><div style="width:71ch">--- a/Makefile.am</div><div style="width:71ch">+++ b/Makefile.am</div><div style="width:71ch">@@ -66,9 +66,9 @@ DTC_V_0       = @echo "  DTC     " $@;</div><div style="width:71ch"> %.dtsi: %.dtsi.m4</div><div style="width:71ch">        $(M4_V)m4 -I$(dir $<) $< > $@</div><div style="width:71ch"> </div><div style="width:71ch">-p9w-fsi.dtb.o: p9w-fsi.dts p9-fsi.dtsi</div><div style="width:71ch">-p9r-fsi.dtb.o: p9r-fsi.dts p9-fsi.dtsi</div><div style="width:71ch">-p9z-fsi.dtb.o: p9z-fsi.dts p9-fsi.dtsi</div><div style="width:71ch">+p9w-fsi.dtb: p9-fsi.dtsi</div><div style="width:71ch">+p9r-fsi.dtb: p9-fsi.dtsi</div><div style="width:71ch">+p9z-fsi.dtb: p9-fsi.dtsi</div><div style="width:71ch"> </div><div style="width:71ch"> %.dtb: %.dts</div><div style="width:71ch">        $(DTC_V)dtc -q -i$(dir $@) -I dts $< -O dtb > $@</div><div style="width:71ch"><br></div><div style="width:71ch">Seems to fix it. I'll send that patch - maybe apply it first.</div><div style="width:71ch"><br></div><div style="width:71ch">The fake backend works on my laptop and pdbg builds for <span id="m_-3921526044644685841-x-evo-selection-start-marker"></span><span id="m_-3921526044644685841-x-evo-selection-end-marker"></span>and runs on powerpc. So apart from the parallel make issue.</div><div style="width:71ch"><br></div><div style="width:71ch">Reviewed-by: Cyril Bur <<a href="mailto:cyrilbur@gmail.com" target="_blank">cyrilbur@gmail.com</a>></div><div style="width:71ch"><br></div><div style="width:71ch">Cyril</div><div style="width:71ch"></div><div style="width:71ch"><br></div><blockquote type="cite"><pre><span class="m_-3921526044644685841-x-evo-quoted"><span class="m_-3921526044644685841-x-evo-quote-character">> </span></span>Fixes: 8275ca370476a3 (template.S: fix to build on architecture with non-empty __USER_LABEL_PREFIX__)</pre><pre><span class="m_-3921526044644685841-x-evo-quoted"><span class="m_-3921526044644685841-x-evo-quote-character">> </span></span>Signed-off-by: Joel Stanley <<a href="mailto:joel@jms.id.au" target="_blank">joel@jms.id.au</a>></pre><pre><span class="m_-3921526044644685841-x-evo-quoted"><span class="m_-3921526044644685841-x-evo-quote-character">> </span></span>---</pre><pre><span class="m_-3921526044644685841-x-evo-quoted"><span class="m_-3921526044644685841-x-evo-quote-character">> </span></span> template.S | 20 +++++++++++---------</pre><pre><span class="m_-3921526044644685841-x-evo-quoted"><span class="m_-3921526044644685841-x-evo-quote-character">> </span></span> 1 file changed, 11 insertions(+), 9 deletions(-)</pre><pre><span class="m_-3921526044644685841-x-evo-quoted"><span class="m_-3921526044644685841-x-evo-quote-character">> </span></span><br></pre><pre><span class="m_-3921526044644685841-x-evo-quoted"><span class="m_-3921526044644685841-x-evo-quote-character">> </span></span>diff --git a/template.S b/template.S</pre><pre><span class="m_-3921526044644685841-x-evo-quoted"><span class="m_-3921526044644685841-x-evo-quote-character">> </span></span>index 2b231f9de2e1..e56b7b4b0203 100644</pre><pre><span class="m_-3921526044644685841-x-evo-quoted"><span class="m_-3921526044644685841-x-evo-quote-character">> </span></span>--- a/template.S</pre><pre><span class="m_-3921526044644685841-x-evo-quoted"><span class="m_-3921526044644685841-x-evo-quote-character">> </span></span>+++ b/template.S</pre><pre><span class="m_-3921526044644685841-x-evo-quoted"><span class="m_-3921526044644685841-x-evo-quote-character">> </span></span>@@ -1,14 +1,16 @@</pre><pre><span class="m_-3921526044644685841-x-evo-quoted"><span class="m_-3921526044644685841-x-evo-quote-character">> </span></span>-#ifdef __USER_LABEL_PREFIX__</pre><pre><span class="m_-3921526044644685841-x-evo-quoted"><span class="m_-3921526044644685841-x-evo-quote-character">> </span></span>-#define CONCAT1(a, b) CONCAT2(a, b)</pre><pre><span class="m_-3921526044644685841-x-evo-quoted"><span class="m_-3921526044644685841-x-evo-quote-character">> </span></span>-#define CONCAT2(a, b) a ## b</pre><pre><span class="m_-3921526044644685841-x-evo-quoted"><span class="m_-3921526044644685841-x-evo-quote-character">> </span></span>-#define SYM(x) CONCAT1 (__USER_LABEL_PREFIX__, x)</pre><pre><span class="m_-3921526044644685841-x-evo-quoted"><span class="m_-3921526044644685841-x-evo-quote-character">> </span></span>-#else</pre><pre><span class="m_-3921526044644685841-x-evo-quoted"><span class="m_-3921526044644685841-x-evo-quote-character">> </span></span>-#define SYM(x) x</pre><pre><span class="m_-3921526044644685841-x-evo-quoted"><span class="m_-3921526044644685841-x-evo-quote-character">> </span></span>+// On platforms that define this macro, a symbol called "foo" in C must be</pre><pre><span class="m_-3921526044644685841-x-evo-quoted"><span class="m_-3921526044644685841-x-evo-quote-character">> </span></span>+// named "_foo" in assembler. GCC Should always define the macro, but</pre><pre><span class="m_-3921526044644685841-x-evo-quoted"><span class="m_-3921526044644685841-x-evo-quote-character">> </span></span>+// we add a fallback just in case</pre><pre><span class="m_-3921526044644685841-x-evo-quoted"><span class="m_-3921526044644685841-x-evo-quote-character">> </span></span>+#ifndef __USER_LABEL_PREFIX__</pre><pre><span class="m_-3921526044644685841-x-evo-quoted"><span class="m_-3921526044644685841-x-evo-quote-character">> </span></span>+#define __USER_LABEL_PREFIX__ ""</pre><pre><span class="m_-3921526044644685841-x-evo-quoted"><span class="m_-3921526044644685841-x-evo-quote-character">> </span></span> #endif</pre><pre><span class="m_-3921526044644685841-x-evo-quoted"><span class="m_-3921526044644685841-x-evo-quote-character">> </span></span> </pre><pre><span class="m_-3921526044644685841-x-evo-quoted"><span class="m_-3921526044644685841-x-evo-quote-character">> </span></span>-#define SYM_START(x)<span class="m_-3921526044644685841Apple-tab-span" style="white-space:pre-wrap">      </span>CONCAT1(CONCAT1(_binary_, SYM(x)), _start)</pre><pre><span class="m_-3921526044644685841-x-evo-quoted"><span class="m_-3921526044644685841-x-evo-quote-character">> </span></span>-#define SYM_END(x)<span class="m_-3921526044644685841Apple-tab-span" style="white-space:pre-wrap"> </span>CONCAT1(CONCAT1(_binary_, SYM(x)), _end)</pre><pre><span class="m_-3921526044644685841-x-evo-quoted"><span class="m_-3921526044644685841-x-evo-quote-character">> </span></span>-#define SYM_SIZE(x)<span class="m_-3921526044644685841Apple-tab-span" style="white-space:pre-wrap">  </span>CONCAT1(CONCAT1(_binary_, SYM(x)), _size)</pre><pre><span class="m_-3921526044644685841-x-evo-quoted"><span class="m_-3921526044644685841-x-evo-quote-character">> </span></span>+#define CONCAT1(a, b, c, d) CONCAT2(a, b, c, d)</pre><pre><span class="m_-3921526044644685841-x-evo-quoted"><span class="m_-3921526044644685841-x-evo-quote-character">> </span></span>+#define CONCAT2(a, b, c, d) a ## b ## c ## d</pre><pre><span class="m_-3921526044644685841-x-evo-quoted"><span class="m_-3921526044644685841-x-evo-quote-character">> </span></span>+</pre><pre><span class="m_-3921526044644685841-x-evo-quoted"><span class="m_-3921526044644685841-x-evo-quote-character">> </span></span>+#define SYM_START(x)    CONCAT1(__USER_LABEL_PREFIX__, _binary_, x, _start)</pre><pre><span class="m_-3921526044644685841-x-evo-quoted"><span class="m_-3921526044644685841-x-evo-quote-character">> </span></span>+#define SYM_END(x)      CONCAT1(__USER_LABEL_PREFIX__, _binary_, x, _end)</pre><pre><span class="m_-3921526044644685841-x-evo-quoted"><span class="m_-3921526044644685841-x-evo-quote-character">> </span></span>+#define SYM_SIZE(x)     CONCAT1(__USER_LABEL_PREFIX__, _binary_, x, _size)</pre><pre><span class="m_-3921526044644685841-x-evo-quoted"><span class="m_-3921526044644685841-x-evo-quote-character">> </span></span> </pre><pre><span class="m_-3921526044644685841-x-evo-quoted"><span class="m_-3921526044644685841-x-evo-quote-character">> </span></span> .section .data</pre><pre><span class="m_-3921526044644685841-x-evo-quoted"><span class="m_-3921526044644685841-x-evo-quote-character">> </span></span> SYM_START(SYMBOL_PREFIX):</pre><pre><span class="m_-3921526044644685841-x-evo-quoted"><span class="m_-3921526044644685841-x-evo-quote-character">> </span></span>-- </pre><pre><span class="m_-3921526044644685841-x-evo-quoted"><span class="m_-3921526044644685841-x-evo-quote-character">> </span></span>2.14.1</pre><pre><span class="m_-3921526044644685841-x-evo-quoted"><span class="m_-3921526044644685841-x-evo-quote-character">> </span></span><br></pre></blockquote><div class="m_-3921526044644685841-x-evo-signature-wrapper"><span class="m_-3921526044644685841-x-evo-signature" id="m_-3921526044644685841none"></span></div></div></div>