[llvmlinux] Assembler error: junk at end of file... cross-compiling for arm64

Behan Webster behanw at converseincode.com
Tue Apr 19 12:06:08 UTC 2016


dotweiba: Which version of clang are you using?

Behan

--
Behan Webster
behanw at converseincode.com


> On Apr 19, 2016, at 12:41 PM, Renato Golin <renato.golin at linaro.org> wrote:
> 
> Looks like it's picking the host assembler instead of the target one.
> Try running the command with -v and see if it is choosing /usr/bin/as
> instead of some aarch64-linux-gnueabihf-as.
> 
> cheers,
> --renato
> 
> On 19 April 2016 at 02:29, dotweiba <dotweiba at gmail.com> wrote:
>> Hi all,
>> I am doing cross-compiling LLVMLinux for arm64 platform with the purpose of
>> generating some *.bc files to analysis. So I followed the procedure as
>> below:
>> 1-> git clone git://git.linuxfoundation.org/llvmlinux/kernel.git
>> 2-> downloaded little ‘m’ makefile and change ARCH, CROSS_COMPILE, CC and
>> HOSTCC
>> 3-> make memuconfig && make
>> 
>> But something weird happened:
>> 
>>>> 
>> 2 warnings generated.
>>  HOSTCC  scripts/dtc/util.o
>>  HOSTCC  scripts/dtc/dtc-lexer.lex.o
>>  HOSTCC  scripts/dtc/dtc-parser.tab.o
>>  HOSTLD  scripts/dtc/dtc
>>  HOSTCC  scripts/genksyms/genksyms.o
>>  HOSTCC  scripts/genksyms/parse.tab.o
>>  HOSTCC  scripts/genksyms/lex.lex.o
>>  HOSTLD  scripts/genksyms/genksyms
>>  CC      scripts/mod/empty.o
>> /tmp/empty-1a3667.s: Assembler messages:
>> /tmp/empty-1a3667.s:28: Error: bad expression
>> /tmp/empty-1a3667.s:28: Warning: division by zero
>> /tmp/empty-1a3667.s:28: Error: junk at end of line, first unrecognized
>> character is `L'
>> /tmp/empty-1a3667.s:29: Error: bad expression
>> /tmp/empty-1a3667.s:29: Warning: division by zero
>> /tmp/empty-1a3667.s:29: Error: junk at end of line, first unrecognized
>> character is `D'
>> /tmp/empty-1a3667.s:30: Error: bad expression
>> /tmp/empty-1a3667.s:30: Error: junk at end of line, first unrecognized
>> character is `O’
>>>> 
>> I tried to figure out what was wrong. And for native compiling (HOST=Clang
>> CC=Clang) it goes all right.
>> So I wonder if it is the dependency problem as you said
>> “Yes, there is still a dependency on parts of the gcc toolchain. Most
>> notably ld, as, and sometimes libgcc.”
>> 
>> Any help? I would appreciate it a lot.
>> 
>> _______________________________________________
>> LLVMLinux mailing list
>> LLVMLinux at lists.linuxfoundation.org
>> https://lists.linuxfoundation.org/mailman/listinfo/llvmlinux
> _______________________________________________
> LLVMLinux mailing list
> LLVMLinux at lists.linuxfoundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/llvmlinux

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxfoundation.org/pipermail/llvmlinux/attachments/20160419/ccd53c38/attachment.html>


More information about the LLVMLinux mailing list