From patchwork Thu Mar 9 16:12:28 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Neyman X-Patchwork-Id: 737039 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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 3vfFrs47PCz9s7g for ; Fri, 10 Mar 2017 03:16:45 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="ShJGNC7x"; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:to:from:subject:message-id:date:mime-version :content-type; q=dns; s=default; b=RmbkResI7nEVNgfpDvamuGZ+LKVf6 xOcwSbnI4duU5urohzvqy4PfqxuCLMdvgO43D8UWBGVuyOwF+MSGsMbpK7D0Rr9D INWns8g9Tp2lvhwL87uZv6WWHlMlnwwXMhu3jPn0Ot8kTQkn7GGcPAF56QJgV8U/ i3j33Wde+KOm2I= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:to:from:subject:message-id:date:mime-version :content-type; s=default; bh=L1UNfVQs54pEKm1I8MCrQnfKIYE=; b=ShJ GNC7x+MzCoa1+9QMGv7QwlDyNcS87u5A/2d6/ShhbQ2fomnPqYhwsFDNpQ2+UPLp perVTg6u0Q57hM4yUn6KTgDNYL6zVOLEQiYTQzYSGd+asIQtFNb92tg1nLMJf27U ZA+z129gckq8JGIM0noMh6lAMlVYM6JduUgw6urI= Received: (qmail 35447 invoked by alias); 9 Mar 2017 16:16:10 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 33836 invoked by uid 89); 9 Mar 2017 16:15:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.7 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 spammy=HX-Yahoo-Newman-Property:ymail-4, H*Ad:D*att.net X-HELO: nm45-vm3.bullet.mail.ne1.yahoo.com X-Yahoo-SMTP: 0h0Q7euswBD_g.kcEqbzJWRFfrba801gq1M1 To: libc-alpha@sourceware.org From: Alexey Neyman Subject: [PATCH] configure.ac: Avoid empty subexpression in grep Message-ID: <8370e47b-8475-a19d-def9-2cac565eb48c@att.net> Date: Thu, 9 Mar 2017 08:12:28 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 Hi all, The test for "-z combreloc" fails when cross-compiling on a machine that uses BSD grep (e.g. on macos). grep complains about empty subexpression and exits with non-zero status, which is interpreted by configure as "not found". As a result, support for "-z combreloc" (HAVE_Z_COMBRELOC) is not detected, leading to link failure on SPARC. Trivial patch attached. Regards, Alexey. From 61d5f9c09b3157db76bd1a393e248c262a8d9dd4 Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Wed, 8 Mar 2017 14:31:10 -0800 Subject: [PATCH] Fix combreloc test with BSD grep The test for "-z combreloc" fails when cross-compiling on a machine that uses BSD grep (e.g. on macos). grep complains about empty subexpression and exits with non-zero status, which is interpreted by configure as "not found". As a result, support for "-z combreloc" (HAVE_Z_COMBRELOC) is not detected, leading to link failure on SPARC. * configure.ac: Avoid empty subexpression in grep. Signed-off-by: Alexey Neyman --- ChangeLog | 5 +++++ configure | 2 +- configure.ac | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index ba57667..0ed7d3d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2017-03-08 Alexey Neyman + + * configure.ac: Avoid empty subexpression in grep. + * configure: Regenerate. + 2017-03-08 Yury Norov Zack Weinberg diff --git a/configure.ac b/configure.ac index 4a77411..19f6d87 100644 --- a/configure.ac +++ b/configure.ac @@ -1391,7 +1391,7 @@ dnl cross-platform since the gcc used can be a cross compiler. Without dnl introducing new options this is not easily doable. Instead use a tool dnl which always is cross-platform: readelf. To detect whether -z combreloc dnl look for a section named .rel.dyn. - if $READELF -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then + if $READELF -S conftest.so | grep '\.\(rel\|rela\)\.dyn' > /dev/null; then libc_cv_z_combreloc=yes else libc_cv_z_combreloc=no -- 2.9.3