From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 7A6803858D1E for ; Fri, 29 Apr 2022 16:15:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7A6803858D1E Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-612-ulV5m4FTOyOC6Bxszzi-kQ-1; Fri, 29 Apr 2022 12:14:33 -0400 X-MC-Unique: ulV5m4FTOyOC6Bxszzi-kQ-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 653C538337E8; Fri, 29 Apr 2022 16:14:29 +0000 (UTC) Received: from oldenburg.str.redhat.com (unknown [10.39.193.187]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 833717C2B; Fri, 29 Apr 2022 16:14:28 +0000 (UTC) From: Florian Weimer To: "Dmitry V. Levin" Cc: Siddhesh Poyarekar , libc-alpha@sourceware.org Subject: Re: [PATCH v3 2/2] Default to --with-default-link=no (bug 25812) References: <15c7f6e9afe2c2b9c51ebc6372682a39b0932712.1649691083.git.fweimer@redhat.com> <87a6cdtykm.fsf@oldenburg.str.redhat.com> <20220429160206.GA7698@altlinux.org> Date: Fri, 29 Apr 2022 18:14:27 +0200 In-Reply-To: <20220429160206.GA7698@altlinux.org> (Dmitry V. Levin's message of "Fri, 29 Apr 2022 19:02:06 +0300") Message-ID: <871qxf27fg.fsf@oldenburg.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-11.7 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Apr 2022 16:15:34 -0000 * Dmitry V. Levin: > On Fri, Apr 22, 2022 at 08:35:37AM +0200, Florian Weimer via Libc-alpha wrote: >> * Siddhesh Poyarekar: >> >> >> diff --git a/INSTALL b/INSTALL >> >> index 63c022d6b9..de150f66eb 100644 >> >> --- a/INSTALL >> >> +++ b/INSTALL >> >> @@ -90,6 +90,12 @@ if 'CFLAGS' is specified it must enable optimization. For example: >> >> library will still be usable, but functionality may be lost--for >> >> example, you can't build a shared libc with old binutils. >> >> +'--with-default-link=FLAG' >> >> + With '--with-default-link=yes', the GNU C Library does not use a >> >> + custom linker scipt for linking its individual shared objects. The >> >> + default for FLAG is the opposite, 'no', because the custom linker >> >> + script is needed for full RELRO protection. >> >> + >> > >> > Andreas' comments still apply here I think, i.e. fix the "scipt" type >> > and rephrase so that it's clearer that the option controls the library >> > build process and not the library itself. >> >> I thought I had fixed this. What about this? >> >> '--with-default-link=FLAG' >> With '--with-default-link=yes', the build system does not use a >> custom linker script for linking shared objects. The default for >> FLAG is the opposite, 'no', because the custom linker script is >> needed for full RELRO protection. >> >> > Does it make sense to make this --disable-custom-link or >> > --enable-default-link instead, since the option is binary? The --with >> > prefix is typically for richer options, e.g. paths. Suggest something >> > like this: >> > >> > --disable-custom-link >> > Don't use a custom linker script to build the GNU C Library, >> > preferring the static linker's default script instead. The custom >> > linker script is needed for full RELRO protection. >> >> I want to backport this, and distributions are already using this >> option, so I prefer not to make changes here. > > I'm sorry to remind you something you know pretty well - the traditional > recommendations on choosing --enable-FEATURE[=ARG]/--disable-FEATURE[1] > vs --with-PACKAGE[=ARG]/--without-PACKAGE[2]. > > The first pair of options is to specify which build-time features to > enable, and the second one is to specify which external software to use. > > If a downstream does not follow the documentation, this fact shouldn't be > normally used as a rationale for not following the documentation upstream. > > If changes are accepted upstream as is just because they are already in > use downstream, this would open the way to all kinds of sloppy changes. I think your comment is based on an assumption that this is a new option? This change did not add the --with-default-link configure option, only the documentation for it, and it changed the default to the safe one. Thanks, Florian