svn commit: r356077 - head/sys/conf

Ian Lepore ian at FreeBSD.org
Wed Dec 25 17:26:52 UTC 2019


Author: ian
Date: Wed Dec 25 17:26:51 2019
New Revision: 356077
URL: https://svnweb.freebsd.org/changeset/base/356077

Log:
  For riscv kernel builds, add -N to LDFLAGS instead of replacing the
  SYSTEM_LD variable.  This avoids duplicating the contents of SYSTEM_LD
  from kern.pre.mk just to add the -N flag to it.  If the basic linker command
  ever needs to be changed, this will be one less place that has to be found
  and fixed.
  
  Some testing by kp@ indicates that the -N flag may not be needed at all,
  so a comment to that effect is also added, and the -N flag may be removed
  in a followup commit.
  
  Differential Revision:	https://reviews.freebsd.org/D22920

Modified:
  head/sys/conf/Makefile.riscv

Modified: head/sys/conf/Makefile.riscv
==============================================================================
--- head/sys/conf/Makefile.riscv	Wed Dec 25 15:55:45 2019	(r356076)
+++ head/sys/conf/Makefile.riscv	Wed Dec 25 17:26:51 2019	(r356077)
@@ -28,10 +28,10 @@ S=	../../..
 
 INCLUDES+= -I$S/contrib/libfdt
 
-SYSTEM_LD= @${LD} -N -m ${LD_EMULATION} -Bdynamic -T ${LDSCRIPT} ${_LDFLAGS} \
-	--no-warn-mismatch --warn-common --export-dynamic \
-	--dynamic-linker /red/herring \
-	-o ${.TARGET} -X ${SYSTEM_OBJS} vers.o
+# XXX Make text segments writable.  This has historically been set for
+# riscv, but some preliminary testing shows it may not be needed; this
+# can likely be removed after some more testing.
+LDFLAGS+= -N
 
 .if !empty(DDB_ENABLED)
 CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls


More information about the svn-src-head mailing list