commit c22b4dfa5b911e705fc8873dac53e26d93962544
parent 2d5351015f85df322680e113bc58c6e2823544a1
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Wed, 18 Oct 2023 16:11:43 +0200
Add missing compiler flags when linking tests
Tests are compiled as position-independent executables using the -fPIE
option in the compiler and the -pie option in the linker. The GCC manual
page states that when editing links with the -pie option "you must also
specify the same set of options as used for compilation". Until this
release, however, the "-std=c89" compiler option was absent from test
linking. Although it was dispensable, we've added it to comply strictly
with what's expected by GCC.
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
@@ -223,9 +223,9 @@ test_soa8f4 \
test_v4f \
test_v4i \
: config.mk rsimd-local.pc $(LIBNAME)
- $(CC) $(CFLAGS_EXE) -o $@ src/$@.o $(LDFLAGS_EXE) $(RSIMD_LIBS) $(RSYS_LIBS)
+ $(CC) -std=c89 $(CFLAGS_EXE) -o $@ src/$@.o $(LDFLAGS_EXE) $(RSIMD_LIBS) $(RSYS_LIBS)
test_math4 \
test_math8 \
: config.mk rsimd-local.pc $(LIBNAME)
- $(CC) $(CFLAGS_EXE) -o $@ src/$@.o $(LDFLAGS_EXE) $(RSIMD_LIBS) $(RSYS_LIBS) -lm
+ $(CC) -std=c89 $(CFLAGS_EXE) -o $@ src/$@.o $(LDFLAGS_EXE) $(RSIMD_LIBS) $(RSYS_LIBS) -lm