https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64810
--- Comment #13 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
(In reply to David Malcolm from comment #12)
> Created attachment 34612 [details]
> WIP patch to inject configure-time options into jit's toplev::main (no
> ChangeLog yet)
With this patch, the 1st iteration of each test case works, with toplev::main
containing e.g.:
JIT: entering: toplev::main
JIT: argv[0]: ./test-hello-world.c.exe
JIT: argv[1]: /tmp/libgccjit-E39s8G/fake.c
JIT: argv[2]: -fPIC
JIT: argv[3]: -O3
JIT: argv[4]: -g
JIT: argv[5]: -quiet
JIT: argv[6]: --param
JIT: argv[7]: ggc-min-expand=0
JIT: argv[8]: --param
JIT: argv[9]: ggc-min-heapsize=0
JIT: argv[10]: -fdump-tree-all
JIT: argv[11]: -fdump-rtl-all
JIT: argv[12]: -fdump-ipa-all
JIT: argv[13]: -march=armv7-a
JIT: argv[14]: -mfloat-abi=hard
JIT: argv[15]: -mfpu=vfpv3-d16
JIT: argv[16]: -mtls-dialect=gnu
(note the presence of e.g. "-mfloat-abi=hard")
However, it fails on the 2nd in-process iteration of each test case, with e.g.:
GNU assembler version 2.24 (armv7hl-redhat-linux-gnueabi) using BFD version
version 2.24
/tmp/libgccjit-E39s8G/fake.s: Assembler messages:
/tmp/libgccjit-E39s8G/fake.s:1: Error: unknown cpu `armv7-a'
./test-hello-world.c.exe: error: error invoking gcc driver: exit_status: 256
err: 0
The 1st iteration's .s file begins:
.arch armv7-a
.eabi_attribute 28, 1
.fpu vfpv3-d16
.eabi_attribute 20, 1
.eabi_attribute 21, 1
.eabi_attribute 23, 3
.eabi_attribute 24, 1
.eabi_attribute 25, 1
.eabi_attribute 26, 2
.eabi_attribute 30, 2
.eabi_attribute 34, 1
.arm
.syntax divided
.file "fake.c"
.text
2nd iteration's .s file begins:
.cpu armv7-a
.eabi_attribute 28, 1
.fpu vfpv3-d16
.eabi_attribute 20, 1
.eabi_attribute 21, 1
.eabi_attribute 23, 3
.eabi_attribute 24, 1
.eabi_attribute 25, 1
.eabi_attribute 26, 2
.eabi_attribute 30, 2
.eabi_attribute 34, 1
.arm
.syntax divided
.file "fake.c"
.text
Note the changing first line, from:
.arch armv7-a
to:
.cpu armv7-a
Am investigating.