NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

toolchain/53555: sys/conf/newvers.sh awk command fails when building on a Solaris 11 host system



>Number:         53555
>Category:       toolchain
>Synopsis:       sys/conf/newvers.sh awk command fails when building on a Solaris 11 host system
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    toolchain-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Aug 26 19:20:00 +0000 2018
>Originator:     Palle Lyckegaard
>Release:        current as of 2018-08-23
>Organization:
NetBSD
>Environment:
SunOS solaris 5.11 11.3 i86pc i386 i86pc

>Description:
A basic Solaris 11.3 installation has an awk implementation which is not compatible with the awk usage in the NetBSD source tree.

By using the toolchain awk implementation a full release is now able to build on a Solaris 11.3 host system.

>How-To-Repeat:
Issue a build.sh on a Solaris 11.3 system with standard PATH setup as /usr/bin:/usr/sbin

>Fix:
Patch below (use toolchin awk):

Index: sys/conf/newvers.mk
===================================================================
RCS file: /cvsroot/src/sys/conf/newvers.mk,v
retrieving revision 1.2
diff -u -r1.2 newvers.mk
--- sys/conf/newvers.mk	8 Apr 2017 18:24:09 -0000	1.2
+++ sys/conf/newvers.mk	24 Aug 2018 19:50:32 -0000
@@ -17,7 +17,7 @@
 vers.o: ${SYSTEM_OBJ:O} Makefile $S/conf/newvers.sh \
 		$S/conf/osrelease.sh ${_NETBSD_VERSION_DEPENDS}
 	${_MKMSG_CREATE} vers.c
-	${HOST_SH} $S/conf/newvers.sh ${_NVFLAGS}
+	AWK=${TOOL_AWK} ${HOST_SH} $S/conf/newvers.sh ${_NVFLAGS}
 	${_MKTARGET_COMPILE}
 	${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c vers.c
 	${COMPILE_CTFCONVERT}
Index: sys/conf/newvers.sh
===================================================================
RCS file: /cvsroot/src/sys/conf/newvers.sh,v
retrieving revision 1.62
diff -u -r1.62 newvers.sh
--- sys/conf/newvers.sh	8 Apr 2017 18:24:09 -0000	1.62
+++ sys/conf/newvers.sh	24 Aug 2018 19:50:32 -0000
@@ -134,7 +134,7 @@
 	else
 		cat
 	fi \
-	| awk '{
+	| $AWK '{
 		# awk does not care about whether or not the last line
 		# of input ends with a newline.
 		# Convert <backslash> to <backslash><backslash>.
Index: sys/rump/librump/rumpkern/Makefile.rumpkern
===================================================================
RCS file: /cvsroot/src/sys/rump/librump/rumpkern/Makefile.rumpkern,v
retrieving revision 1.170
diff -u -r1.170 Makefile.rumpkern
--- sys/rump/librump/rumpkern/Makefile.rumpkern	25 Jul 2017 05:01:25 -0000	1.170
+++ sys/rump/librump/rumpkern/Makefile.rumpkern	24 Aug 2018 19:51:55 -0000
@@ -51,7 +51,7 @@
 vers.c: ${RUMPTOP}/../conf/newvers.sh ${RUMPTOP}/../conf/osrelease.sh \
 		${RUMPTOP}/../sys/param.h ${_NETBSD_VERSION_DEPENDS}
 	${_MKMSG_CREATE} vers.c
-	${HOST_SH} ${RUMPTOP}/../conf/newvers.sh -i RUMP-ROAST -n -R
+	AWK=${TOOL_AWK} ${HOST_SH} ${RUMPTOP}/../conf/newvers.sh -i RUMP-ROAST -n -R
 SRCS+=		vers.c
 CLEANFILES+=	vers.c version
 
Index: usr.sbin/crash/Makefile
===================================================================
RCS file: /cvsroot/src/usr.sbin/crash/Makefile,v
retrieving revision 1.40
diff -u -r1.40 Makefile
--- usr.sbin/crash/Makefile	20 May 2018 03:09:02 -0000	1.40
+++ usr.sbin/crash/Makefile	24 Aug 2018 19:53:05 -0000
@@ -95,7 +95,7 @@
 # vers.c
 SRCS+=	vers.c
 vers.c:	${S}/conf/newvers.sh ${_NETBSD_VERSION_DEPENDS}
-	${HOST_SH} ${S}/conf/newvers.sh ${NVFLAGS} -n -m ${MACHINE} -i CRASH
+	AWK=${TOOL_AWK} ${HOST_SH} ${S}/conf/newvers.sh ${NVFLAGS} -n -m ${MACHINE} -i CRASH
 CLEANFILES+=	vers.c version
 
 .else				# } {



Home | Main Index | Thread Index | Old Index