From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi1-x22e.google.com (mail-oi1-x22e.google.com [IPv6:2607:f8b0:4864:20::22e]) by sourceware.org (Postfix) with ESMTPS id BF6ED3858D28 for ; Fri, 5 Nov 2021 19:45:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org BF6ED3858D28 Received: by mail-oi1-x22e.google.com with SMTP id bn12so16183283oib.2 for ; Fri, 05 Nov 2021 12:45:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=lW3R6vH9s8pVp79pj15NRWdnE+u5OqgepglPPsvAi0s=; b=ZIZ8rHY2vSdZcdVwuosa3QfbIt3DIKkDekawopTSpvptwjueYJLtsZaVteL8xWgNsN Xg5rBgOSCRctF+Xpqf0EP2zbWzZx3Gh8BSwXIDHOl8I1FIfm+Eo78Huzbgy9MPcjIDEC dWBIWgYKqaHHQjFiAGjTxWo3+pJXruG+64tDMN/TwOGpTl9WrgtBIv4FvLxfh2ANWzj1 dGhwHl7KYZkLxQ/XeROOU8vUymCO9Rx1Wq3XKmVkQxtT4lg/JjHOkXk3ZRP+SqWedni9 GwCgvUUZAQsWmFTekfB0dWoo0xJIYbK+tqq6pLqupPYiTSNOmTR1EN37VkIbwumoJylT LOPA== X-Gm-Message-State: AOAM5309lCJzegEexc6/zqKUR4SDw4uUHBpzw0Bu0Pwt+7p76Pa4TnjP aNo61oO+KEAvIJURYTqG2JLitxkLY5KrSg== X-Google-Smtp-Source: ABdhPJxx18RJvsLkUC8DHcELxW8L2lBwyEkYyfVTwbmjZoROtbFEfAeZ6sgjNS/jmjm1001ovQ/YuA== X-Received: by 2002:a05:6808:1287:: with SMTP id a7mr11045156oiw.133.1636141536181; Fri, 05 Nov 2021 12:45:36 -0700 (PDT) Received: from ?IPV6:2804:431:c7cb:55a:c916:e574:3d13:f60c? ([2804:431:c7cb:55a:c916:e574:3d13:f60c]) by smtp.gmail.com with ESMTPSA id k23sm2825809otb.56.2021.11.05.12.45.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 05 Nov 2021 12:45:35 -0700 (PDT) Message-ID: <53e17f0c-b76f-d256-8584-8677926166ab@linaro.org> Date: Fri, 5 Nov 2021 16:45:33 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.2.1 Subject: Re: [PATCH] Configure GCC with --enable-initfini-array [BZ #27945] Content-Language: en-US To: Joseph Myers , "H.J. Lu" Cc: libc-alpha@sourceware.org References: <20210609122916.3884385-1-hjl.tools@gmail.com> From: Adhemerval Zanella In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, 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, 05 Nov 2021 19:45:38 -0000 On 09/06/2021 17:44, Joseph Myers wrote: > On Wed, 9 Jun 2021, Adhemerval Zanella via Libc-alpha wrote: > >> On 09/06/2021 15:02, Joseph Myers wrote: >>> On Wed, 9 Jun 2021, H.J. Lu via Libc-alpha wrote: >>> >>>> I disagree. The behavior of the cross compiler should be as close to the native >>>> Linux system compiler, not other versions of cross compilers, as possible. >>> >>> But fixing that was the point of your GCC patch. I don't think working >>> around deficiencies in previous versions of GCC, that aren't necessary to >>> work around for building glibc, is within scope for build-many-glibcs.py; >>> it's enough that the bug (cross compiler different from native) was fixed >>> in the logically correct place (in GCC, for future GCC releases). >> >> But this also does not have any really drawback, correct? > > It's one more thing to track when to remove when the minimum GCC version > for building glibc increases. (We have such a comment on the use of > --disable-libcilkrts. We ought to have one on the use of > --disable-libmpx. If we used --enable-initfini-array, that should have > such a comment as well.) > So I stumbled across this issues while testing powerpc64le with the build-many-glibcs built gcc with lld, which does not support .ctors (it just ignores the sections instead of converting it on .init_array). I agree with H.J that is unfortunate that gcc has the issue and although it does not prevent to work against ld.bfd, it might prevent glibc to be built properly with other linkers. So I think it would be good to have such patch upstream with.