criu/compel
Adrian Reber 0568889ee3 compel: fix parasite with GCC 12
Parasite creation started to fail with GCC 12:

On x86_64 with:
 ./compel/compel-host hgen -f criu/pie/restorer.built-in.o -o criu/pie/restorer-blob.h
 Error (compel/src/lib/handle-elf-host.c:337): Unexpected undefined symbol: `strlen'. External symbol in PIE?

On aarch64 with:
 ld: criu/pie/restorer.o: in function `lsm_set_label':
 /drone/src/criu/pie/restorer.c:174: undefined reference to `strlen'

Line 174 is: "for (len = 0; label[len]; len++)"

Adding '-ffreestanding' to parasite compilation fixes these errors
because, according to GCC developers:

"strlen is a standard C function, so I don't see any bug in that being used
unless you do a freestanding compilation (-nostdlib isn't that)."

Signed-off-by: Adrian Reber <areber@redhat.com>
2022-04-28 17:53:52 -07:00
..
arch x86/compel/fault-inject: print the initial seed 2022-04-28 17:53:52 -07:00
include clang-format: do automatic comment fixups 2022-04-28 17:53:52 -07:00
plugins compel: fix GCC 12 failure (out of bounds) 2022-04-28 17:53:52 -07:00
src compel: fix parasite with GCC 12 2022-04-28 17:53:52 -07:00
test Run 'make indent' on all C files 2021-09-03 10:31:00 -07:00
.gitignore compel: adapt .gitgnore for aarch64 and ppc64le 2017-08-09 18:51:42 +03:00
compel-host compel cli: show includes 2017-03-15 00:09:55 +03:00
Makefile x86: Use PTRACE_GET_THREAD_AREA instead of sys_get_thread_area() 2021-09-03 10:31:00 -07:00