commit 56f0b759acee0915a292f39bd6266e6e5c826700
parent c8c215117a068df9581dde38954ffcac4ae3b5e1
Author: Vincent Forest <vincent.forest@meso-star.com>
Date: Fri, 27 Oct 2023 11:22:06 +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
@@ -169,7 +169,7 @@ test_suvm_device \
test_suvm_volume \
test_suvm_primitive_intersection \
: config.mk suvm-local.pc
- $(CC) $(CFLAGS_EXE) -o $@ src/$@.o $(LDFLAGS_EXE) $(RSYS_LIBS) $(SUVM_LIBS) -lm
+ $(CC) -std=c89 $(CFLAGS_EXE) -o $@ src/$@.o $(LDFLAGS_EXE) $(RSYS_LIBS) $(SUVM_LIBS) -lm
suvm_voxelize: config.mk suvm-local.pc
- $(CC) $(CFLAGS_EXE) -o $@ src/$@.o $(LDFLAGS_EXE) $(RSYS_LIBS) $(SUVM_LIBS) $(SMSH_LIBS) -lm
+ $(CC) -std=c89 $(CFLAGS_EXE) -o $@ src/$@.o $(LDFLAGS_EXE) $(RSYS_LIBS) $(SUVM_LIBS) $(SMSH_LIBS) -lm