Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ BUILD_DIR ?= test/build

# Skip includes for clean target
ifneq ($(MAKECMDGOALS),clean)
include test/mk/config.mk
include test/mk/compiler.mk
include test/mk/config.mk
include test/mk/auto.mk
include test/mk/components.mk
include test/mk/rules.mk
Expand Down Expand Up @@ -266,6 +266,9 @@ else
@echo "=== Architecture Not Supported ==="
@echo "No specific feature detection available for $(ARCH)"
endif
@echo ""
@echo "=== Linker Feature Support ==="
@echo "Fatal Warnings: $(if $(filter 1,$(MK_LINKER_SUPPORTS_FATAL_WARNINGS)),✅,❌)"

EXAMPLE_DIRS := \
examples/bring_your_own_fips202 \
Expand Down
5 changes: 5 additions & 0 deletions test/mk/compiler.mk
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,9 @@ MK_COMPILER_SUPPORTS_SHA3 ?= $(shell echo 'int main() { __asm__("eor3 v0.16b, v1

endif # aarch64

# Linker feature detection

# Test --fatal-warnings support
MK_LINKER_SUPPORTS_FATAL_WARNINGS ?= $(shell echo 'int main() { return 0; }' | $(CC) -x c - -o /dev/null -Wl,--fatal-warnings 2>/dev/null && echo 1 || echo 0)

endif # _COMPILER_MK
5 changes: 5 additions & 0 deletions test/mk/config.mk
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ CFLAGS := \
-MMD \
$(CFLAGS)

# Treat linker warnings as errors
ifeq ($(MK_LINKER_SUPPORTS_FATAL_WARNINGS),1)
LDFLAGS += -Wl,--fatal-warnings
endif

##################
# Some Variables #
##################
Expand Down
Loading