Asm errors when cross-compiling to arm-eabi

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Asm errors when cross-compiling to arm-eabi

Henk Schurink
Hello,

I keep encountering an error when trying to cross-compile libffi for
ARM-eabi:

$ git clone https://github.com/libffi/libffi && cd libffi
$ ./configure --build=x86_64-linux-gnu --host=arm-eabi --prefix=/data/build
--enable-static
$ make
...
../src/arm/sysv.S: Assembler messages:
../src/arm/sysv.S:111: Error: unknown pseudo-op: `.syntax'
../src/arm/sysv.S:151: Error: unknown pseudo-op: `.arm'
../src/arm/sysv.S:151: Error: junk at end of line, first unrecognized
character is `@'
../src/arm/sysv.S:152: Error: no such instruction: `stmfd sp!,{r0-r3,fp,lr}'
../src/arm/sysv.S:153: Error: junk at end of line, first unrecognized
character is `@'
...
../src/arm/sysv.S:440: Error: no such instruction: `ldr pc,[pc]'
Makefile:1335: recipe for target 'src/arm/sysv.lo' failed


Any help would be appreciated.

Best regards,
Henk Schurink
Reply | Threaded
Open this post in threaded view
|

Re: Asm errors when cross-compiling to arm-eabi

Florian Weimer
* Henk Schurink:

> I keep encountering an error when trying to cross-compile libffi for
> ARM-eabi:
>
> $ git clone https://github.com/libffi/libffi && cd libffi
> $ ./configure --build=x86_64-linux-gnu --host=arm-eabi --prefix=/data/build
> --enable-static
> $ make
> ...
> ../src/arm/sysv.S: Assembler messages:
> ../src/arm/sysv.S:111: Error: unknown pseudo-op: `.syntax'
> ../src/arm/sysv.S:151: Error: unknown pseudo-op: `.arm'
> ../src/arm/sysv.S:151: Error: junk at end of line, first unrecognized
> character is `@'
> ../src/arm/sysv.S:152: Error: no such instruction: `stmfd sp!,{r0-r3,fp,lr}'
> ../src/arm/sysv.S:153: Error: junk at end of line, first unrecognized
> character is `@'
> ...
> ../src/arm/sysv.S:440: Error: no such instruction: `ldr pc,[pc]'
> Makefile:1335: recipe for target 'src/arm/sysv.lo' failed

This suggests that the native assembler is running, not the
cross-assembler.  Unfortunately, you did not include the output line
with the invocation of the assembler.
Reply | Threaded
Open this post in threaded view
|

Re: Asm errors when cross-compiling to arm-eabi

Henk Schurink
Thanks for your response.
Here's the full output: https://pastebin.com/6tqtYGBH

On Sun, Nov 10, 2019 at 9:20 AM Florian Weimer <[hidden email]> wrote:

> * Henk Schurink:
>
> > I keep encountering an error when trying to cross-compile libffi for
> > ARM-eabi:
> >
> > $ git clone https://github.com/libffi/libffi && cd libffi
> > $ ./configure --build=x86_64-linux-gnu --host=arm-eabi
> --prefix=/data/build
> > --enable-static
> > $ make
> > ...
> > ../src/arm/sysv.S: Assembler messages:
> > ../src/arm/sysv.S:111: Error: unknown pseudo-op: `.syntax'
> > ../src/arm/sysv.S:151: Error: unknown pseudo-op: `.arm'
> > ../src/arm/sysv.S:151: Error: junk at end of line, first unrecognized
> > character is `@'
> > ../src/arm/sysv.S:152: Error: no such instruction: `stmfd
> sp!,{r0-r3,fp,lr}'
> > ../src/arm/sysv.S:153: Error: junk at end of line, first unrecognized
> > character is `@'
> > ...
> > ../src/arm/sysv.S:440: Error: no such instruction: `ldr pc,[pc]'
> > Makefile:1335: recipe for target 'src/arm/sysv.lo' failed
>
> This suggests that the native assembler is running, not the
> cross-assembler.  Unfortunately, you did not include the output line
> with the invocation of the assembler.
>
Reply | Threaded
Open this post in threaded view
|

Re: Asm errors when cross-compiling to arm-eabi

Florian Weimer
* Henk Schurink:

> Thanks for your response.
> Here's the full output: https://pastebin.com/6tqtYGBH

I think you need to set CC to the name of your cross compiler.