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

Renato Golin renato.golin at linaro.org
Tue Apr 19 09:41:04 UTC 2016


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


More information about the LLVMLinux mailing list