From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 108052 invoked by alias); 16 Aug 2018 17:59:52 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 108021 invoked by uid 89); 16 Aug 2018 17:59:51 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-4.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 spammy=sorting X-HELO: mail-qk0-f194.google.com Return-Path: Subject: Re: [PATCH] Add --with-nonshared-cflags option to configure To: Florian Weimer , libc-alpha@sourceware.org References: <20180704093557.3723F43994575@oldenburg.str.redhat.com> <32c2fb92-9b50-9252-10ed-39931c0ff2f4@redhat.com> From: Carlos O'Donell Openpgp: preference=signencrypt Message-ID: <0b13258b-3285-18f6-5db6-7771c248bf73@redhat.com> Date: Thu, 16 Aug 2018 17:59:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <32c2fb92-9b50-9252-10ed-39931c0ff2f4@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2018-08/txt/msg00358.txt.bz2 On 08/16/2018 01:45 PM, Florian Weimer wrote: > On 08/16/2018 07:19 PM, Carlos O'Donell wrote: > >>> +@item --with-nonshared-cflags=@var{cflags} +Use additional >>> compiler flags @var{cflags} to build the parts of the +library >>> which are always statically linked into applications and >>> +libraries even with shared linking (that is, the object files >>> contained +in @file{lib*_nonshared.a} libraries). The build >>> process will +automatically use the appropriate flags, but this >>> option can be used to +set additional flags required for building >>> applications and libraries, +to match local policy. + >> >> I'd like to see an example added to this to show what the flag is >> used for. > > Our use-case is to compile with -Wp,-D_FORTIFY_SOURCE=2, which does > not change the compiled code, only the metadata embedded in the > nonshared objects. Which makes this feature *really* obscure, of > course. Please add this as a comment or description in install.texi, much like CFLAGS sorting, I want to come back to this 10 years later, read the comment and understand the intent. >> P.S. Is there any way I can convince you to fix bug 17248 given >> that you're looking at CFLAGS? :-) > > Can we do anything else but remove the sorting and deduplication? > This was added such a long time ago that we don't have a record why > this was needed. > > I can check that the binaries on x86_64 do not change. Right, I think that's the only solution, and what we should do. This leaves CFLAGS as expected without sorting (which might change based on locale?). -- Cheers, Carlos.