Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Dec 2019 17:26:51 +0000 (UTC)
From:      Ian Lepore <ian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r356077 - head/sys/conf
Message-ID:  <201912251726.xBPHQquK023861@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201912251726.xBPHQquK023861>