mirror of
https://git.freebsd.org/ports.git
synced 2025-04-28 01:26:39 -04:00
Building sysutils/opensbi with clang 17 results in the following errors: clang: error: unsupported option '-mno-unaligned-access' for target 'riscv64-unknown-elf' clang: error: unsupported option '-mno-unaligned-access' for target 'riscv64-unknown-elf' [... many more times...] The target-specific option -mno-unaligned-access (which is emitted from the compiler driver when -mstrict-align is used) did not do anything for riscv64, but clang 17 is now more strict about reporting unsupported options. Remove the -mstrict-align option from the Makefile's CFLAGS and ASFLAGS to fix it. PR: 273753 MFH: 2023Q4
20 lines
780 B
Text
20 lines
780 B
Text
--- Makefile.orig 2023-07-19 06:21:59 UTC
|
|
+++ Makefile
|
|
@@ -337,7 +337,7 @@ endif
|
|
else
|
|
CFLAGS += -O2
|
|
endif
|
|
-CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls -mstrict-align
|
|
+CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls
|
|
# enable -m(no-)save-restore option by CC_SUPPORT_SAVE_RESTORE
|
|
ifeq ($(CC_SUPPORT_SAVE_RESTORE),y)
|
|
CFLAGS += -mno-save-restore
|
|
@@ -355,7 +355,7 @@ ASFLAGS = -g -Wall -nostdlib
|
|
CPPFLAGS += $(firmware-cppflags-y)
|
|
|
|
ASFLAGS = -g -Wall -nostdlib
|
|
-ASFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls -mstrict-align
|
|
+ASFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls
|
|
# enable -m(no-)save-restore option by CC_SUPPORT_SAVE_RESTORE
|
|
ifeq ($(CC_SUPPORT_SAVE_RESTORE),y)
|
|
ASFLAGS += -mno-save-restore
|