From owner-svn-src-head@FreeBSD.ORG Mon Jul 14 13:53:10 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DC8F5C2D; Mon, 14 Jul 2014 13:53:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C9B822A81; Mon, 14 Jul 2014 13:53:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6EDrAvR083435; Mon, 14 Jul 2014 13:53:10 GMT (envelope-from jmmv@svn.freebsd.org) Received: (from jmmv@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6EDrA0L083434; Mon, 14 Jul 2014 13:53:10 GMT (envelope-from jmmv@svn.freebsd.org) Message-Id: <201407141353.s6EDrA0L083434@svn.freebsd.org> From: Julio Merino Date: Mon, 14 Jul 2014 13:53:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r268620 - head/lib/libc/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jul 2014 13:53:10 -0000 Author: jmmv Date: Mon Jul 14 13:53:10 2014 New Revision: 268620 URL: http://svnweb.freebsd.org/changeset/base/268620 Log: Make generation of nslexer.c more robust. Ensure that lex errors fail the build instead of being silently ignored due to the piped call. Also postpone the update of the nslexer.c file until we are sure we have generated it properly. These changes fix some very obscure build failures I encountered while building FreeBSD within a chroot that did not have devfs mounted. The specific errors looked like: .../libc.so.7: undefined reference to `_nsyyerror' .../libc.so.7: undefined reference to `_nsyyin' .../libc.so.7: undefined reference to `_nsyylex' .../libc.so.7: undefined reference to `_nsyylineno' .../libc.so.7: undefined reference to `_nsyytext' and were caused due to a mangled nslexer.c being linked into libc. Modified: head/lib/libc/net/Makefile.inc Modified: head/lib/libc/net/Makefile.inc ============================================================================== --- head/lib/libc/net/Makefile.inc Mon Jul 14 12:24:38 2014 (r268619) +++ head/lib/libc/net/Makefile.inc Mon Jul 14 13:53:10 2014 (r268620) @@ -34,11 +34,13 @@ CFLAGS+=-I${LIBC_SRCTOP}/resolv YFLAGS+=-p_nsyy LFLAGS+=-P_nsyy -CLEANFILES+=nslexer.c +CLEANFILES+=nslexer.c nslexer.c.* nslexer.c: nslexer.l nsparser.h - ${LEX} ${LFLAGS} -o/dev/stdout ${.IMPSRC} | \ - sed -e '/YY_BUF_SIZE/s/16384/1024/' >${.TARGET} + ${LEX} ${LFLAGS} -o${.TARGET}.tmp1 ${.IMPSRC} + sed -e '/YY_BUF_SIZE/s/16384/1024/' ${.TARGET}.tmp1 >${.TARGET}.tmp2 + rm -f ${.TARGET}.tmp1 + mv -f ${.TARGET}.tmp2 ${.TARGET} MAN+= byteorder.3 ethers.3 eui64.3 \ getaddrinfo.3 gai_strerror.3 gethostbyname.3 \