Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F103051574
D22659.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D22659.diff
View Options
Index: head/share/mk/bsd.cpu.mk
===================================================================
--- head/share/mk/bsd.cpu.mk
+++ head/share/mk/bsd.cpu.mk
@@ -375,6 +375,10 @@
.else
CFLAGS += -march=rv64imafdc -mabi=lp64d
.endif
+
+.if ${LINKER_FEATURES:U:Mriscv-relaxations} == ""
+CFLAGS += -mno-relax
+.endif
.endif
# NB: COPTFLAGS is handled in /usr/src/sys/conf/kern.pre.mk
Index: head/share/mk/bsd.linker.mk
===================================================================
--- head/share/mk/bsd.linker.mk
+++ head/share/mk/bsd.linker.mk
@@ -86,6 +86,9 @@
${X_}LINKER_FEATURES+= build-id
${X_}LINKER_FEATURES+= ifunc
.endif
+.if ${${X_}LINKER_TYPE} == "bfd" && ${${X_}LINKER_VERSION} > 21750
+${X_}LINKER_FEATURES+= riscv-relaxations
+.endif
.if ${${X_}LINKER_TYPE} == "lld" && ${${X_}LINKER_VERSION} >= 60000
${X_}LINKER_FEATURES+= retpoline
.endif
Index: head/sys/conf/kern.mk
===================================================================
--- head/sys/conf/kern.mk
+++ head/sys/conf/kern.mk
@@ -144,6 +144,10 @@
CFLAGS.clang+= -mcmodel=medium
CFLAGS.gcc+= -mcmodel=medany
INLINE_LIMIT?= 8000
+
+.if ${LINKER_FEATURES:Mriscv-relaxations} == ""
+CFLAGS+= -mno-relax
+.endif
.endif
#
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Nov 21, 7:27 AM (22 h, 8 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14756895
Default Alt Text
D22659.diff (1 KB)
Attached To
Mode
D22659: Add a new "riscv-relaxations" linker feature.
Attached
Detach File
Event Timeline
Log In to Comment