From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/15106 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: PATCH: Fix cfi awk scripts for gawk 5 warning Date: Wed, 8 Jan 2020 15:06:40 -0500 Message-ID: <20200108200640.GV30412@brightrain.aerifal.cx> References: <20200108134809.GB24159@dtznix> Reply-To: musl@lists.openwall.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="68621"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mutt/1.5.21 (2010-09-15) To: musl@lists.openwall.com Original-X-From: musl-return-15122-gllmg-musl=m.gmane.org@lists.openwall.com Wed Jan 08 21:07:20 2020 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.89) (envelope-from ) id 1ipHbT-0003ux-Fc for gllmg-musl@m.gmane.org; Wed, 08 Jan 2020 21:06:55 +0100 Original-Received: (qmail 16061 invoked by uid 550); 8 Jan 2020 20:06:53 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 16038 invoked from network); 8 Jan 2020 20:06:52 -0000 Content-Disposition: inline In-Reply-To: <20200108134809.GB24159@dtznix> Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:15106 Archived-At: On Wed, Jan 08, 2020 at 01:48:09PM -0600, Will Dietz wrote: > When `awk` is gawk 5.0.1, the cfi awk scripts print a warning > due to unnecessarily escaping '@' character (see attached patch). > > Warning message example: > > awk: ./tools/add-cfi.x86_64.awk:79: warning: regexp escape sequence `\@' is not a known regexp operator > > Trivial patch addressing this is attached. > > Unsure which awk implementations are relevant, > tested with gawk 4.2.1, gawk 5.0.1, and mawk 1.3.4. > Also tested with busybox 1.31.1, didn't check config options used (if that matters). > > For all, `.cfi_startproc` seems to be inserted appropriately on example used for testing > (src/math/x86_64/lrintf.s) and no warnings were printed. > > Minor issue, but seems might as well fix if there aren't awk's requiring escaping '@'. > > Thanks! > > ~Will > From 004799af62609eab3261ea9a75794dd7281ce02e Mon Sep 17 00:00:00 2001 > From: Will Dietz > Date: Wed, 8 Jan 2020 13:20:44 -0600 > Subject: [PATCH] tools/add-cfi.{i386,x86_64}.awk: fix for gawk 5, '\@' -> '@' > > --- > tools/add-cfi.i386.awk | 2 +- > tools/add-cfi.x86_64.awk | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/tools/add-cfi.i386.awk b/tools/add-cfi.i386.awk > index 9162e309..d05037de 100644 > --- a/tools/add-cfi.i386.awk > +++ b/tools/add-cfi.i386.awk > @@ -81,7 +81,7 @@ function adjust_sp_offset(delta) { > in_function = 0 > } > } > -/^\.type [a-zA-Z0-9_]+,\@function/ { > +/^\.type [a-zA-Z0-9_]+,@function/ { > functions[substr($2, 1, length($2)-10)] = 1 > } > # not interested in assembler directives beyond this, just pass them through > diff --git a/tools/add-cfi.x86_64.awk b/tools/add-cfi.x86_64.awk > index bbc90daa..7e1513d6 100644 > --- a/tools/add-cfi.x86_64.awk > +++ b/tools/add-cfi.x86_64.awk > @@ -76,7 +76,7 @@ function adjust_sp_offset(delta) { > in_function = 0 > } > } > -/^\.type [a-zA-Z0-9_]+,\@function/ { > +/^\.type [a-zA-Z0-9_]+,@function/ { > functions[substr($2, 1, length($2)-10)] = 1 > } > # not interested in assembler directives beyond this, just pass them through > -- > 2.25.0-rc1 > I think this should be okay, but I'll probably wait until after release to commit just in case. At some point it may make sense to remove these entirely, if we can get rid of most of the external asm files. Rich