Architecutres such as Debian i386 may enable PIE by default, resulting
in test binaries that include extra symbols such as
'__x86.get_pc_thunk.ax'.
These extra symbols are added to test archive symbol indices. This
changes ar-extract-ar output which causes test failures.
Include '-fno-pic -fno-pie -fno-plt' when compiling test binaries to
ensure that no extra symbols are added and no symbols are reordered.
Signed-off-by: Aaron Merey <amerey@redhat.com>
# Compile the source files.
for src in *.c; do
obj=$(echo "$src" | sed 's/\.c$/.o/')
- gcc -O0 -c "$src" -o "$obj"
+ gcc -O0 -fno-pic -fno-pie -fno-plt -c "$src" -o "$obj"
done
echo Create nested archives.