Skip to content
Commit d9053860 authored by Alex Coplan's avatar Alex Coplan
Browse files

Fix aarch64-none-linux-gnu build for morello

This fixes an issue in build-cross-linux-toolchain.sh which was causing the
build to fail when attempting to build a Morello Linux toolchain as follows:

./build-gnu-toolchain.sh --target=aarch64-none-linux-gnu --morello

The problem was that in the libc{,-headers} stages, the variable
libc[_headers]_extra_config_envflags lost some quotes around the operands to the
ternary invocation inside the CC=, CXX= lines.  In particular, this meant that
instead of setting:

CC=aarch64-none-linux-gnu-gcc -mabi=purecap -march=morello+c64

it would just set:

CC=aarch64-none-linux-gnu-gcc

and this eventually caused the gcc2 build to attempt to link vanilla A64
objects (libc crt files) into a purecap libgcc.

This patch fixes the issue by using heredocs around the definitions of
the appropriate extra_config_envflags variables and inserting double
quotes around the operands to the ternary invocations.

Tested by building a Morello toolchain as described above.

Change-Id: Id06f0750f4df9f47df9c05742672a628d4067003
parent abc44060
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment