delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2017/05/29/11:11:26

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:reply-to:subject:to:references:from:message-id
:date:mime-version:in-reply-to:content-type
:content-transfer-encoding; q=dns; s=default; b=s9VH8P5xb7BwvEgB
Eqoo6VNjffOXoRYsrk4UXP0Zb4V7qI3VhwpgmyiYtZy4a1/rrehaDh/V2IrCuWOe
Qw+jvVOgvP/NsOcD2KigQRqSXHF+/jmpwWmLnJ+c6zpNMfvnBvxSs7x+sx0rakET
/btwZ6F+EIityEr3NAm19FNpr6w=
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:reply-to:subject:to:references:from:message-id
:date:mime-version:in-reply-to:content-type
:content-transfer-encoding; s=default; bh=9CMobprosdlBq1JT+uoGXU
Djlxk=; b=SCcjd2Ijfmc9Cu9Pp44b+e+lzWbvv9mOH+tbPdO8m/gFTP+4KTyOOa
sW3KfUs+shC6kyAEX9pu3SJU24/xy1T7PDsYmfrrqrvtOHeoLZgvRW1ZOFKhMkBs
cWshV/hGMjSbyLulvniLMy8rV0+rxPzrwbZg5cTXSW0mU6KjsRUAU=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 spammy=sofa, zro, 8
X-HELO: smtp-out-no.shaw.ca
X-Authority-Analysis: v=2.2 cv=dZbw5Tfe c=1 sm=1 tr=0 a=WqCeCkldcEjBO3QZneQsCg==:117 a=WqCeCkldcEjBO3QZneQsCg==:17 a=IkcTkHD0fZMA:10 a=v1OfHkp4bXOIkeHmsTwA:9 a=QEXdDO2ut3YA:10
Reply-To: Brian DOT Inglis AT SystematicSw DOT ab DOT ca
Subject: Re: grep-3.0-2 issues within Makefile
To: cygwin AT cygwin DOT com
References: <CA+fGtfD__FcrTwnWbg4HyTLPE-2tkSUj7cGUqyioXv6ZtiTh7Q AT mail DOT gmail DOT com> <c1317ef2-f8db-e96e-fc0a-0bda4248c3f4 AT gmail DOT com> <aa4bc3a5-89f3-5379-8a45-274d2aa0d2fe AT redhat DOT com> <845061b7-fab9-33b8-d699-25c9ac07906f AT redhat DOT com>
From: Brian Inglis <Brian DOT Inglis AT SystematicSw DOT ab DOT ca>
Message-ID: <d76bed8b-ff97-b12f-94eb-b9dba28dcc3b@SystematicSw.ab.ca>
Date: Mon, 29 May 2017 09:11:02 -0600
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1
MIME-Version: 1.0
In-Reply-To: <845061b7-fab9-33b8-d699-25c9ac07906f@redhat.com>
X-CMAE-Envelope: MS4wfLD6lJSsBvF7x3eqCSqORA8MQceDfhsRWZRhYTjZkAdJMZdaXaVA9DXgfwYPVp8sV0GVaTgprYQK+6Az2UKk5+AAQjfqCez3TpTTvebrE4K3gxMogAQ7 +OIstvkDKVI9oaORdW2Q536J+53DI6Ub6ukGcTYTdip06m8yefDWj6ur8UwoQy4SwJpsNRN2XVnBlA==
X-IsSubscribed: yes

On 2017-05-29 05:44, Eric Blake wrote:
> On 05/29/2017 06:39 AM, Eric Blake wrote:
>>>> localsyms: libtcctmp.o
>>>>     @$(READELF) $< -Ws | $(AWK) "{print \$$8}" | sort | uniq \
>> Most likely, $(READELF) is producing \r\n-terminated output.
> That said, WHAT is $(READELF) actually expanding to? If it is the cygwin
> binutils version, it should NOT be outputting \r\n in the first place.
> Generally, you don't get \r\n output unless you are mixing non-cygwin
> programs into the pipeline.

Cygwin .o files are not ELF format and not recognized as such by readelf

$ readelf src/astro/sofa/20160503_a/c/build/zr.o -Ws
readelf: Error: Not an ELF file - it has the wrong magic bytes at the start

or file

$ file src/astro/sofa/20160503_a/c/build/zr.o
src/astro/sofa/20160503_a/c/build/zr.o: data

running Cygwin readelf on cross builds which produce ELF .o don't
generate "\r":

$ file util/*.o
util/ntp-keygen.o:      ELF 32-bit LSB relocatable, ARM, EABI5 version 1
(SYSV), not stripped, with debug_info
util/ntp-keygen-opts.o: ELF 32-bit LSB relocatable, ARM, EABI5 version 1
(SYSV), not stripped, with debug_info
util/ntptime.o:         ELF 32-bit LSB relocatable, ARM, EABI5 version 1
(SYSV), not stripped, with debug_info
util/tickadj.o:         ELF 32-bit LSB relocatable, ARM, EABI5 version 1
(SYSV), not stripped, with debug_info
util/version.o:         ELF 32-bit LSB relocatable, ARM, EABI5 version 1
(SYSV), not stripped, with debug_info

$ readelf util/*.o -Ws | wc -lwcL
    460    3479   26678      84
$ readelf util/*.o -Ws | grep $'\r' | wc -lwcL
      0       0       0       0

and it's not the Cygwin mingw binutils

$ /usr/bin/x86_64-w64-mingw32-readelf util/*.o -Ws | grep $'\r' | wc -lwcL
      0       0       0       0

and just to prove this detects "\r"

$ echo $'\r' | grep $'\r' | wc -lwcL
      1       0       2       0

so culprit must be native Mingw binutils readelf.

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019