From patchwork Wed Jun 9 12:29:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 1489851 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=rwnAjO2O; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4G0RHz6b0Lz9sSs for ; Wed, 9 Jun 2021 22:29:35 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B664D3891C2C for ; Wed, 9 Jun 2021 12:29:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B664D3891C2C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1623241773; bh=++cpkkkwQkZ7bYFUqmxSNbFFWpn/VNRa/JYuX/rigwI=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=rwnAjO2OawBlgTUQXKqSsjPuF9qArOQbb5sUQhLZLNM98cGB6R094J6ZmMCxx91jV XQHTbC5e2rhWtHUh+GqZulxTZ5Ba1Skbq7lXcXnH54b3f740hunU7a/sT1IM4FwnFT /f9VcBB/fVMNDDvXknJ30RzwXwapMMCFKHe0yABQ= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pj1-x1029.google.com (mail-pj1-x1029.google.com [IPv6:2607:f8b0:4864:20::1029]) by sourceware.org (Postfix) with ESMTPS id 82A593857000 for ; Wed, 9 Jun 2021 12:29:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 82A593857000 Received: by mail-pj1-x1029.google.com with SMTP id md2-20020a17090b23c2b029016de4440381so1281812pjb.1 for ; Wed, 09 Jun 2021 05:29:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=++cpkkkwQkZ7bYFUqmxSNbFFWpn/VNRa/JYuX/rigwI=; b=kRYySQGsrdaFXas+pv/mqSVa6+su/jewn9tDx8zPZr9YGdkRJsQ8YwmLZOGto43Xev giEtpuNyKsRWOvNP8Sl/LSCRYmks0YB9259VyxAA1/6AOw8ruzrRfN8rY6psO2T+uaC3 wWk1D9IHku9KCPctx6wkbSFXb5eB/ts3gCS+m0hPvlUE8hFDcW8OxRl5z7UhMrRi4xmr Kg8LHprfFvEUuob1ZtQKazhkpWc3HAPjlESBsxycq7kUigJc48dLhk4dhM4n//zJI08n PKM0y2hUtUjB+dOvA2J6VlxQhayTTvdBhGJIrh1oPw0hLuffowOzbl89lDZx1dTNNHGj DuUw== X-Gm-Message-State: AOAM531dzSm2kQ8sBP+BV3mIK4QDVC7yPqEoYlMrZLl20ccT3WjNijfU 9TS9vnwJHlAMESiE4PEPEYinIiLyNcY= X-Google-Smtp-Source: ABdhPJyxwo0iO3NuFu5ZedGOvlSwVoisplRZAJtWVg+zdw+k7KndQxdWDy4hQ6fBg+QtRMCYzA2GIg== X-Received: by 2002:a17:90a:4e0f:: with SMTP id n15mr9156077pjh.167.1623241758587; Wed, 09 Jun 2021 05:29:18 -0700 (PDT) Received: from gnu-cfl-2.localdomain ([172.56.38.102]) by smtp.gmail.com with ESMTPSA id x3sm15366368pgx.8.2021.06.09.05.29.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Jun 2021 05:29:18 -0700 (PDT) Received: from gnu-cfl-2.. (localhost [IPv6:::1]) by gnu-cfl-2.localdomain (Postfix) with ESMTP id 03004C0301 for ; Wed, 9 Jun 2021 05:29:17 -0700 (PDT) To: libc-alpha@sourceware.org Subject: [PATCH] Configure GCC with --enable-initfini-array [BZ #27945] Date: Wed, 9 Jun 2021 05:29:16 -0700 Message-Id: <20210609122916.3884385-1-hjl.tools@gmail.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-Spam-Status: No, score=-3034.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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-Patchwork-Original-From: "H.J. Lu via Libc-alpha" From: "H.J. Lu" Reply-To: "H.J. Lu" Errors-To: libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org Sender: "Libc-alpha" Starting from GCC 12, the .init_array and .fini_array sections are enabled unconditionally by commit 13a39886940331149173b25d6ebde0850668d8b9 Author: H.J. Lu Date: Tue Jun 8 16:09:24 2021 -0700 Always enable DT_INIT_ARRAY/DT_FINI_ARRAY on Linux configure GCC with --enable-initfini-array to enable them when using GCC release branches. Fixes BZ #27945. --- scripts/build-many-glibcs.py | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/build-many-glibcs.py b/scripts/build-many-glibcs.py index 4a4b91abda..5ce86c96d0 100755 --- a/scripts/build-many-glibcs.py +++ b/scripts/build-many-glibcs.py @@ -1437,6 +1437,7 @@ class Config(object): # removed once glibc no longer supports building with older # GCC versions). cfg_opts = list(self.gcc_cfg) + cfg_opts += ['--enable-initfini-array'] cfg_opts += ['--disable-libssp', '--disable-libcilkrts'] host_libs = self.ctx.host_libraries_installdir cfg_opts += ['--with-gmp=%s' % host_libs,