From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 93570 invoked by alias); 20 Jan 2018 12:23:31 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 93400 invoked by uid 89); 20 Jan 2018 12:23:30 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.6 required=5.0 tests=AWL,BAYES_50,KAM_NUMSUBJECT,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy=disablelibssp, disable-libssp, sk:U_FORTI, sk:gcc_cv_ X-HELO: limerock03.mail.cornell.edu Received: from limerock03.mail.cornell.edu (HELO limerock03.mail.cornell.edu) (128.84.13.243) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 20 Jan 2018 12:23:29 +0000 X-CornellRouted: This message has been Routed already. Received: from authusersmtp.mail.cornell.edu (granite4.serverfarm.cornell.edu [10.16.197.9]) by limerock03.mail.cornell.edu (8.14.4/8.14.4_cu) with ESMTP id w0KCNQIo016521 for ; Sat, 20 Jan 2018 07:23:26 -0500 Received: from [10.13.22.4] (50-192-26-108-static.hfc.comcastbusiness.net [50.192.26.108]) (authenticated bits=0) by authusersmtp.mail.cornell.edu (8.14.4/8.12.10) with ESMTP id w0KCNONu001798 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT) for ; Sat, 20 Jan 2018 07:23:26 -0500 Subject: Re: [ANNOUNCEMENT] TEST RELEASE: Cygwin 2.10.0-0.1 To: cygwin@cygwin.com References: <9990d909-f112-9658-1b0f-d63e3f338a18@cornell.edu> <4f7edc68-4c98-8fa3-9fef-47bdd3343330@cornell.edu> <3b738a06-a3b8-210b-2886-4c9701efcd48@cygwin.com> From: Ken Brown Message-ID: <39045e32-8a2c-c767-0fcd-27d544ba6d93@cornell.edu> Date: Sat, 20 Jan 2018 12:23:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-PMX-Cornell-Gauge: Gauge=XX X-PMX-CORNELL-AUTH-RESULTS: dkim-out=none; X-IsSubscribed: yes X-SW-Source: 2018-01/txt/msg00189.txt.bz2 On 1/19/2018 10:27 PM, Ken Brown wrote: > On 1/18/2018 6:28 PM, Ken Brown wrote: >> On 1/18/2018 4:30 PM, Yaakov Selkowitz wrote: >>> On 2018-01-18 08:35, Ken Brown wrote: >>>> On 1/17/2018 5:29 PM, Ken Brown wrote: >>>>> Do we need a new gcc release to go along with the recent ssp changes? >>>> >>>> The following commit message seems to answer my question: >>>> >>>>      Note that this does require building gcc with --disable-libssp and >>>>      gcc_cv_libc_provides_ssp=yes. >>> >>> Correct. >>> >>>> Are there plans to coordinate the release of Cygwin 2.10.0 with a new >>>> gcc release?  In the meantime, I guess package maintainers have to >>>> build >>>> with -U_FORTIFY_SOURCE in order to test building with Cygwin >>>> 2.10.0.  Or >>>> am I missing something? >>> >>> -D_FORTIFY_SOURCE is not the default, so simply omitting it is >>> sufficient. >> >> I was talking about building projects in which _FORTIFY_SOURCE is >> defined by default.  That happens, for instance, in the gnulib >> subdirectory of the emacs tree, so it may affect other projects that >> use gnulib also. >> >>> You could also just delete >>> /usr/lib/gcc/*-pc-cygwin/6.4.0/include/ssp, since we won't need it >>> anymore and it wasn't even being used properly in the first place. >> >> That's a simpler workaround than what I was doing.  Thanks. > > Here's another issue that's come up with _FORTIFY_SOURCE.  One of the > emacs source files, fileio.c, makes use of a pointer to readlinkat. > [More precisely, the file uses an external function foo() with a > parameter 'bar' that's a pointer to a function; foo is called in > fileio.c with bar = readlinkat.] > > When _FORTIFY_SOURCE > 0, this leads to an "undefined reference to > `__ssp_protected_readlinkat'" linking error.  Does this sound like > something that will be fixed with the new gcc release? > > I realize I haven't given you full details, but it might be a few days > until I have a chance to extract an STC for this issue, so I thought I'd > give it a shot. > > If you can't answer the question based on the information above, I'll > make an STC as soon as I can. I got to this sooner than expected: $ cat ssp_test.c #define _FORTIFY_SOURCE 1 #include void foo (ssize_t (*preadlinkat) (int, char const *, char *, size_t)); void baz () { foo (readlinkat); } $ gcc -c -O1 ssp_test.c $ objdump -x ssp_test.o | grep readlinkat 6 .rdata$.refptr.__ssp_protected_readlinkat 00000010 0000000000000000 0000000000000000 00000180 2**4 [...] Ken -- 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