Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F163220384
D22659.id65185.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.id65185.diff
View Options
Index: share/mk/bsd.cpu.mk
===================================================================
--- share/mk/bsd.cpu.mk
+++ 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: share/mk/bsd.linker.mk
===================================================================
--- share/mk/bsd.linker.mk
+++ 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: sys/conf/kern.mk
===================================================================
--- sys/conf/kern.mk
+++ sys/conf/kern.mk
@@ -141,6 +141,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
Wed, Jul 22, 4:30 AM (4 h, 22 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35347325
Default Alt Text
D22659.id65185.diff (1 KB)
Attached To
Mode
D22659: Add a new "riscv-relaxations" linker feature.
Attached
Detach File
Event Timeline
Log In to Comment