Cross-compiling for Android
Jonas Vautherin via Boost-build <[email protected]> Thu, 18 Aug 2022 10:58:35 +0200
| Newsgroups | gmane.comp.lib.boost.build |
|---|---|
| Message-ID | <CAEyb4nF=3CybGJi2qtQXFidxZStf1RLMtGGg6b2usVqjdedoXA@mail.gmail.com> |
--===============0953623045322553364==
Content-Type: multipart/alternative; boundary="0000000000006c252505e68030b9"
--0000000000006c252505e68030b9
Content-Type: text/plain; charset="UTF-8"
Good morning!
I am trying to cross-compile Boost for Android, from a Dockcross container
(i.e. it has the environment variables `AS`, `AR`, `CC`, `CXX`, `LD` set to
the toolchain) by running the following commands:
$ ./bootstrap.sh
$ ./b2 architecture=arm address-model=32 binary-format=elf abi=aapcs
target-os=android
My hope is that I don't need a `user-config.jam`, given that I pass
everything to `./b2`.
However, I am getting the errors looking like below:
```
"g++" -x assembler-with-cpp -O3 -finline-functions -Wno-inline -Wall
-fvisibility=hidden -DBOOST_ALL_NO_LIB=1 -DBOOST_CONTEXT_SOURCE
-DBOOST_DISABLE_ASSERTS -DNDEBUG -I"." -c -o
"bin.v2/libs/context/build/gcc-10/release/abi-aapcs/address-model-32/architecture-arm/link-static/target-os-android/threading-multi/visibility-hidden/asm/jump_arm_aapcs_elf_gas.o"
"libs/context/src/asm/jump_arm_aapcs_elf_gas.S"
...failed gcc.compile.asm
bin.v2/libs/context/build/gcc-10/release/abi-aapcs/address-model-32/architecture-arm/link-static/target-os-android/threading-multi/visibility-hidden/asm/jump_arm_aapcs_elf_gas.o...
gcc.compile.asm
bin.v2/libs/context/build/gcc-10/release/abi-aapcs/address-model-32/architecture-arm/link-static/target-os-android/threading-multi/visibility-hidden/asm/ontop_arm_aapcs_elf_gas.o
ontop_arm_aapcs_elf_gas.S: Assembler messages:
ontop_arm_aapcs_elf_gas.S:46: Error: unknown pseudo-op: `.syntax'
ontop_arm_aapcs_elf_gas.S:48: Error: junk at end of line, first
unrecognized character is `@'
ontop_arm_aapcs_elf_gas.S:49: Error: invalid char '{' beginning operand 1
`{lr}'
ontop_arm_aapcs_elf_gas.S:50: Error: junk at end of line, first
unrecognized character is `@'
ontop_arm_aapcs_elf_gas.S:51: Error: invalid char '{' beginning operand 1
`{a1'
ontop_arm_aapcs_elf_gas.S:53: Error: junk at end of line, first
unrecognized character is `@'
ontop_arm_aapcs_elf_gas.S:54: Error: too many memory references for `sub'
ontop_arm_aapcs_elf_gas.S:60: Error: junk at end of line, first
unrecognized character is `@'
ontop_arm_aapcs_elf_gas.S:61: Error: too many memory references for `mov'
ontop_arm_aapcs_elf_gas.S:63: Error: junk at end of line, first
unrecognized character is `@'
ontop_arm_aapcs_elf_gas.S:64: Error: too many memory references for `mov'
ontop_arm_aapcs_elf_gas.S:66: Error: junk at end of line, first
unrecognized character is `@'
ontop_arm_aapcs_elf_gas.S:67: Error: too many memory references for `mov'
ontop_arm_aapcs_elf_gas.S:73: Error: junk at end of line, first
unrecognized character is `@'
ontop_arm_aapcs_elf_gas.S:74: Error: too many memory references for `add'
ontop_arm_aapcs_elf_gas.S:76: Error: junk at end of line, first
unrecognized character is `@'
ontop_arm_aapcs_elf_gas.S:77: Error: invalid char '{' beginning operand 1
`{a1'
ontop_arm_aapcs_elf_gas.S:79: Error: junk at end of line, first
unrecognized character is `@'
ontop_arm_aapcs_elf_gas.S:80: Error: invalid char '[' beginning operand 2
`[a1'
ontop_arm_aapcs_elf_gas.S:81: Error: invalid char '[' beginning operand 2
`[a1'
ontop_arm_aapcs_elf_gas.S:82: Error: junk at end of line, first
unrecognized character is `@'
ontop_arm_aapcs_elf_gas.S:83: Error: junk at end of line, first
unrecognized character is `@'
ontop_arm_aapcs_elf_gas.S:85: Error: junk at end of line, first
unrecognized character is `@'
ontop_arm_aapcs_elf_gas.S:86: Error: too many memory references for `add'
ontop_arm_aapcs_elf_gas.S:88: Error: junk at end of line, first
unrecognized character is `@'
ontop_arm_aapcs_elf_gas.S:89: Error: no such instruction: `bx a4'
ontop_arm_aapcs_elf_gas.S:92: Error: junk at end of line, first
unrecognized character is `@'
```
What am I missing?
Best Regards,
--0000000000006c252505e68030b9
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div>Good morning!<br></div><div><br></div><div>I am tryin=
g to cross-compile Boost for Android, from a Dockcross container (i.e. it h=
as the environment variables `AS`, `AR`, `CC`, `CXX`, `LD` set to the toolc=
hain) by running the following commands:<br></div><div><br></div><div>$ ./b=
ootstrap.sh</div><div>$ ./b2 architecture=3Darm address-model=3D32 binary-f=
ormat=3Delf abi=3Daapcs target-os=3Dandroid</div><div><br></div><div>My hop=
e is that I don't need a `user-config.jam`, given that I pass everythin=
g to `./b2`.<br></div><div><br></div><div>However, I am getting the errors =
looking like below:</div><div><br></div><div>```</div><div>=C2=A0 =C2=A0 &q=
uot;g++" -x assembler-with-cpp -O3 -finline-functions -Wno-inline -Wal=
l -fvisibility=3Dhidden =C2=A0-DBOOST_ALL_NO_LIB=3D1 -DBOOST_CONTEXT_SOURCE=
-DBOOST_DISABLE_ASSERTS -DNDEBUG -I"." -c -o "bin.v2/libs/c=
ontext/build/gcc-10/release/abi-aapcs/address-model-32/architecture-arm/lin=
k-static/target-os-android/threading-multi/visibility-hidden/asm/jump_arm_a=
apcs_elf_gas.o" "libs/context/src/asm/jump_arm_aapcs_elf_gas.S&qu=
ot;<br><br>...failed gcc.compile.asm bin.v2/libs/context/build/gcc-10/relea=
se/abi-aapcs/address-model-32/architecture-arm/link-static/target-os-androi=
d/threading-multi/visibility-hidden/asm/jump_arm_aapcs_elf_gas.o...<br>gcc.=
compile.asm bin.v2/libs/context/build/gcc-10/release/abi-aapcs/address-mode=
l-32/architecture-arm/link-static/target-os-android/threading-multi/visibil=
ity-hidden/asm/ontop_arm_aapcs_elf_gas.o<br>ontop_arm_aapcs_elf_gas.S: Asse=
mbler messages:<br>ontop_arm_aapcs_elf_gas.S:46: Error: unknown pseudo-op: =
`.syntax'<br>ontop_arm_aapcs_elf_gas.S:48: Error: junk at end of line, =
first unrecognized character is `@'<br>ontop_arm_aapcs_elf_gas.S:49: Er=
ror: invalid char '{' beginning operand 1 `{lr}'<br>ontop_arm_a=
apcs_elf_gas.S:50: Error: junk at end of line, first unrecognized character=
is `@'<br>ontop_arm_aapcs_elf_gas.S:51: Error: invalid char '{'=
; beginning operand 1 `{a1'<br>ontop_arm_aapcs_elf_gas.S:53: Error: jun=
k at end of line, first unrecognized character is `@'<br>ontop_arm_aapc=
s_elf_gas.S:54: Error: too many memory references for `sub'<br>ontop_ar=
m_aapcs_elf_gas.S:60: Error: junk at end of line, first unrecognized charac=
ter is `@'<br>ontop_arm_aapcs_elf_gas.S:61: Error: too many memory refe=
rences for `mov'<br>ontop_arm_aapcs_elf_gas.S:63: Error: junk at end of=
line, first unrecognized character is `@'<br>ontop_arm_aapcs_elf_gas.S=
:64: Error: too many memory references for `mov'<br>ontop_arm_aapcs_elf=
_gas.S:66: Error: junk at end of line, first unrecognized character is `@&#=
39;<br>ontop_arm_aapcs_elf_gas.S:67: Error: too many memory references for =
`mov'<br>ontop_arm_aapcs_elf_gas.S:73: Error: junk at end of line, firs=
t unrecognized character is `@'<br>ontop_arm_aapcs_elf_gas.S:74: Error:=
too many memory references for `add'<br>ontop_arm_aapcs_elf_gas.S:76: =
Error: junk at end of line, first unrecognized character is `@'<br>onto=
p_arm_aapcs_elf_gas.S:77: Error: invalid char '{' beginning operand=
1 `{a1'<br>ontop_arm_aapcs_elf_gas.S:79: Error: junk at end of line, f=
irst unrecognized character is `@'<br>ontop_arm_aapcs_elf_gas.S:80: Err=
or: invalid char '[' beginning operand 2 `[a1'<br>ontop_arm_aap=
cs_elf_gas.S:81: Error: invalid char '[' beginning operand 2 `[a1&#=
39;<br>ontop_arm_aapcs_elf_gas.S:82: Error: junk at end of line, first unre=
cognized character is `@'<br>ontop_arm_aapcs_elf_gas.S:83: Error: junk =
at end of line, first unrecognized character is `@'<br>ontop_arm_aapcs_=
elf_gas.S:85: Error: junk at end of line, first unrecognized character is `=
@'<br>ontop_arm_aapcs_elf_gas.S:86: Error: too many memory references f=
or `add'<br>ontop_arm_aapcs_elf_gas.S:88: Error: junk at end of line, f=
irst unrecognized character is `@'<br>ontop_arm_aapcs_elf_gas.S:89: Err=
or: no such instruction: `bx a4'<br>ontop_arm_aapcs_elf_gas.S:92: Error=
: junk at end of line, first unrecognized character is `@'</div><div>``=
`</div><div><br></div><div>What am I missing?</div><div><br></div><div>Best=
Regards,<br></div></div>
--0000000000006c252505e68030b9--
--===============0953623045322553364==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Unsubscribe & other changes: https://lists.boost.org/mailman/listinfo.cgi/boost-build
--===============0953623045322553364==--