From patchwork Fri Feb 28 16:15:29 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Martin_Li=C5=A1ka?= X-Patchwork-Id: 1246614 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-520317-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha1 header.s=default header.b=KMgi5c52; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48TZRB5Qcrz9sPg for ; Sat, 29 Feb 2020 03:16:21 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :subject:to:cc:message-id:date:mime-version:content-type; q=dns; s=default; b=okwMXIUqiBLGyePvNQ+uUVwMwtcQhPXY0kAoNQ4jaKj78+fP44 nnLZAztBqKkYuears/wNBfKtteB+YlMPdzss+RAt0M3SGZW2uuYfAD8bJ35dGA+r 9eHFdl+bsp5PnFwSlCD99Q3VpnGLXjfBJISOnCUGQJHKnXK+Xwq9H3sJw= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :subject:to:cc:message-id:date:mime-version:content-type; s= default; bh=HeECT8/wSFls5lls2W0DrlKrtyo=; b=KMgi5c52EVFEc4wjnApE FS3WpAz3rX+5oP8rHhqg/R4FSq+2BzkRu9fq5G2vVRCg2Yul11zVS4BwDbiLXCi+ CMGDRZ8EEkSjLkCwfVNipGht0lICTadTF3QmxRgRVa7AJkXcPHHVDraGz/yhPQOL Kc05AW86wdAuUSN65DhEbt4= Received: (qmail 25873 invoked by alias); 28 Feb 2020 16:16:12 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 25730 invoked by uid 89); 28 Feb 2020 16:15:51 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-18.8 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_PASS autolearn=ham version=3.3.1 spammy=28047 X-HELO: mx2.suse.de Received: from mx2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 28 Feb 2020 16:15:34 +0000 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 03EE9B2B1; Fri, 28 Feb 2020 16:15:30 +0000 (UTC) From: =?utf-8?q?Martin_Li=C5=A1ka?= Subject: [PATCH] Improve detection of ld_date. To: gcc-patches@gcc.gnu.org Cc: Jakub Jelinek Message-ID: Date: Fri, 28 Feb 2020 17:15:29 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 X-IsSubscribed: yes Hi. The patch is about better ld date format detection as described in the PR in more detail. I'm also changing '[-]' into '-' which is a simplification. Ready to be installed after tests? Thanks, Martin gcc/ChangeLog: 2020-02-28 Martin Liska PR other/93965 * configure: Improve detection of ld_date by requiring either two dashes or none. * configure.ac: Likewise. --- gcc/configure | 2 +- gcc/configure.ac | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/configure b/gcc/configure index f55cdb8c77f..5381e107bce 100755 --- a/gcc/configure +++ b/gcc/configure @@ -23384,7 +23384,7 @@ if test $in_tree_ld != yes ; then ld_vers=`echo $ld_ver | sed -n \ -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*.*\)$,\1,p'` fi - ld_date=`echo $ld_ver | sed -n 's,^.*\([2-9][0-9][0-9][0-9]\)[-]*\([01][0-9]\)[-]*\([0-3][0-9]\).*$,\1\2\3,p'` + ld_date=`echo $ld_ver | sed -n 's,^.*\([2-9][0-9][0-9][0-9]\)\(-*\)\([01][0-9]\)\2\([0-3][0-9]\).*$,\1\3\4,p'` ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'` ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'` ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'` diff --git a/gcc/configure.ac b/gcc/configure.ac index 0e6e475950d..0d6230e0ca1 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -2804,7 +2804,7 @@ if test $in_tree_ld != yes ; then ld_vers=`echo $ld_ver | sed -n \ -e 's,^.*[ ]\([0-9][0-9]*\.[0-9][0-9]*.*\)$,\1,p'` fi - ld_date=`echo $ld_ver | sed -n 's,^.*\([2-9][0-9][0-9][0-9]\)[-]*\([01][0-9]\)[-]*\([0-3][0-9]\).*$,\1\2\3,p'` + ld_date=`echo $ld_ver | sed -n 's,^.*\([2-9][0-9][0-9][0-9]\)\(-*\)\([01][0-9]\)\2\([0-3][0-9]\).*$,\1\3\4,p'` ld_vers_major=`expr "$ld_vers" : '\([0-9]*\)'` ld_vers_minor=`expr "$ld_vers" : '[0-9]*\.\([0-9]*\)'` ld_vers_patch=`expr "$ld_vers" : '[0-9]*\.[0-9]*\.\([0-9]*\)'`