<html><head></head><body dir="auto" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Well in temp files psci.s, in “__invoke_psci_fn_hvc: “ and “__invoke_psci_fn_smc:” &nbsp;<br><br> 2050 &nbsp;&nbsp;&nbsp;&nbsp;bl &nbsp;mcount<br> 2051 &nbsp;&nbsp;&nbsp;&nbsp;.loc &nbsp;&nbsp;&nbsp;28 119 2 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// arch/arm64/kernel/psci.c:119:2<br> 2052 &nbsp;&nbsp;&nbsp;&nbsp;//APP<br> 2053 &nbsp;&nbsp;&nbsp;&nbsp;.ifnc x22,x0 ; .err ; .endif<br> 2054 &nbsp;&nbsp;&nbsp;&nbsp;.ifnc x21,x1 ; .err ; .endif<br> 2055 &nbsp;&nbsp;&nbsp;&nbsp;.ifnc x20,x2 ; .err ; .endif<br> 2056 &nbsp;&nbsp;&nbsp;&nbsp;.ifnc x19,x3 ; .err ; .endif<br> 2057 &nbsp;&nbsp;&nbsp;&nbsp;hvc #0<br> 2058 <br> 2059 &nbsp;&nbsp;&nbsp;&nbsp;//NO_APP<br><br>From line 2053 to line 2056, the literal “.err” is the cause as the aarch64 assembler compiled psci.s without errors after deleting “; .err ; .endif”. Is it a compatible problem?<br><br><blockquote type="cite">在 2016年4月22日,20:08,dotweiba &lt;dotweiba@gmail.com&gt; 写道:<br><br>Having forgotten to CC all of you, perhaps I should post the detailed mail on the mailing list . XD<br><br><blockquote type="cite">在 2016年4月22日,17:20,Renato Golin &lt;renato.golin@linaro.org&gt; 写道:<br><br>On 20 April 2016 at 06:26, dotweiba &lt;dotweiba@gmail.com&gt; wrote:<br><blockquote type="cite">/tmp/psci-5f0b3d.s: Assembler messages:<br>/tmp/psci-5f0b3d.s:2049: Error: .err encountered<br>/tmp/psci-5f0b3d.s:2050: Error: .err encountered<br>/tmp/psci-5f0b3d.s:2051: Error: .err encountered<br>/tmp/psci-5f0b3d.s:2052: Error: .err encountered<br>/tmp/psci-5f0b3d.s:2116: Error: .err encountered<br>/tmp/psci-5f0b3d.s:2117: Error: .err encountered<br>/tmp/psci-5f0b3d.s:2118: Error: .err encountered<br>/tmp/psci-5f0b3d.s:2119: Error: .err encountered<br>clang: error: assembler command failed with exit code 1 (use -v to see invocation)<br>make[2]: *** [arch/arm64/kernel/psci.o] Error 1<br><br>It seemed that the right aarch64-linux-gnu-as was called and the compiling progress went further.<br></blockquote><br>Yes, this seems like the kind of bug the LLVMLinux guys are better at<br>identifying. :)<br><br>IIRC, this file was problematic in the past...<br><br>cheers,<br>--renato<br></blockquote><br>Details:<br><blockquote type="cite">在 2016年4月20日,13:26,dotweiba &lt;dotweiba@gmail.com&gt; 写道:<br><br>I guess I should append “-Xassembler -v” to AFLAGS_KERNEL and AFLAGS_MODULE in Makefile.<br>So in big “M” Makefile:<br><span class="Apple-tab-span" style="white-space:pre">        </span>AFLAGS_KERNEL := -Xassembler -v<br><span class="Apple-tab-span" style="white-space:pre">        </span>AFLAGS_MODULE := -Xassembler -v<br>In little “m” makefile:<br><span class="Apple-tab-span" style="white-space:pre">        </span>HOSTCC &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:=/home/cas/toolchain/clang+llvm-3.5.0-x86_64-linux-gnu/bin/clang<br><span class="Apple-tab-span" style="white-space:pre">        </span>CC <span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span> :=/home/cas/toolchain/clang+llvm-3.5.0-x86_64-linux-gnu/bin/clang<br><span class="Apple-tab-span" style="white-space:pre">        </span>ARCH <span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span> := arm64 <br><span class="Apple-tab-span" style="white-space:pre">        </span>CROSS_COMPILE := /home/cas/toolchain/gcc-linaro-aarch64-linux-gnu-4.9-2014.08_linux/bin/aarch64-linux-gnu- <br><br>Neglecting warnings during HOSTCC scripts/*.o files, I got this:<br><br>CC &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;arch/arm64/kernel/psci.o<br>GNU assembler version 2.24.0 (aarch64-linux-gnu) using BFD version (crosstool-NG linaro-1.13.1-4.9-2014.08 - Linaro GCC 4.9-2014.08) 2.24.0.20140801 Linaro 2014.08<br>/tmp/psci-5f0b3d.s: Assembler messages:<br>/tmp/psci-5f0b3d.s:2049: Error: .err encountered<br>/tmp/psci-5f0b3d.s:2050: Error: .err encountered<br>/tmp/psci-5f0b3d.s:2051: Error: .err encountered<br>/tmp/psci-5f0b3d.s:2052: Error: .err encountered<br>/tmp/psci-5f0b3d.s:2116: Error: .err encountered<br>/tmp/psci-5f0b3d.s:2117: Error: .err encountered<br>/tmp/psci-5f0b3d.s:2118: Error: .err encountered<br>/tmp/psci-5f0b3d.s:2119: Error: .err encountered<br>clang: error: assembler command failed with exit code 1 (use -v to see invocation)<br>make[2]: *** [arch/arm64/kernel/psci.o] Error 1<br><br>It seemed that the right aarch64-linux-gnu-as was called and the compiling progress went further.<br><br><blockquote type="cite">在 2016年4月19日,17:41,Renato Golin &lt;renato.golin@linaro.org&gt; 写道:<br><br>Looks like it's picking the host assembler instead of the target one.<br>Try running the command with -v and see if it is choosing /usr/bin/as<br>instead of some aarch64-linux-gnueabihf-as.<br><br>cheers,<br>--renato<br><br>On 19 April 2016 at 02:29, dotweiba &lt;dotweiba@gmail.com&gt; wrote:<br><blockquote type="cite">Hi all,<br>I am doing cross-compiling LLVMLinux for arm64 platform with the purpose of<br>generating some *.bc files to analysis. So I followed the procedure as<br>below:<br>1-&gt; git clone git://git.linuxfoundation.org/llvmlinux/kernel.git<br>2-&gt; downloaded little ‘m’ makefile and change ARCH, CROSS_COMPILE, CC and<br>HOSTCC<br>3-&gt; make memuconfig &amp;&amp; make<br><br>But something weird happened:<br><br>…<br><br>2 warnings generated.<br>HOSTCC &nbsp;scripts/dtc/util.o<br>HOSTCC &nbsp;scripts/dtc/dtc-lexer.lex.o<br>HOSTCC &nbsp;scripts/dtc/dtc-parser.tab.o<br>HOSTLD &nbsp;scripts/dtc/dtc<br>HOSTCC &nbsp;scripts/genksyms/genksyms.o<br>HOSTCC &nbsp;scripts/genksyms/parse.tab.o<br>HOSTCC &nbsp;scripts/genksyms/lex.lex.o<br>HOSTLD &nbsp;scripts/genksyms/genksyms<br>CC &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;scripts/mod/empty.o<br>/tmp/empty-1a3667.s: Assembler messages:<br>/tmp/empty-1a3667.s:28: Error: bad expression<br>/tmp/empty-1a3667.s:28: Warning: division by zero<br>/tmp/empty-1a3667.s:28: Error: junk at end of line, first unrecognized<br>character is `L'<br>/tmp/empty-1a3667.s:29: Error: bad expression<br>/tmp/empty-1a3667.s:29: Warning: division by zero<br>/tmp/empty-1a3667.s:29: Error: junk at end of line, first unrecognized<br>character is `D'<br>/tmp/empty-1a3667.s:30: Error: bad expression<br>/tmp/empty-1a3667.s:30: Error: junk at end of line, first unrecognized<br>character is `O’<br>…<br><br>I tried to figure out what was wrong. And for native compiling (HOST=Clang<br>CC=Clang) it goes all right.<br>So I wonder if it is the dependency problem as you said<br>“Yes, there is still a dependency on parts of the gcc toolchain. Most<br>notably ld, as, and sometimes libgcc.”<br><br>Any help? I would appreciate it a lot.<br><br>_______________________________________________<br>LLVMLinux mailing list<br>LLVMLinux@lists.linuxfoundation.org<br>https://lists.linuxfoundation.org/mailman/listinfo/llvmlinux<br></blockquote></blockquote><br></blockquote><br></blockquote><br></body></html>