From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oi1-x22c.google.com (mail-oi1-x22c.google.com [IPv6:2607:f8b0:4864:20::22c]) by sourceware.org (Postfix) with ESMTPS id 72C9B3858D37 for ; Thu, 6 Oct 2022 19:41:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 72C9B3858D37 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-oi1-x22c.google.com with SMTP id w70so3225707oie.2 for ; Thu, 06 Oct 2022 12:41:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:organization:from:references :to:content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=j+0RBeOtBfSwY9mHSUEAzxsWIxBR21fZzDjm5L+hdPs=; b=XHL/phUrJ9qricUxp3UWmNAKf+Dd3TWTajhLN8mvj0niP6AgJpqQxPs/OKQy8vf0qF qNMX2aTu140gPki/SQBcFNouyf1hNSubDZB+8FzatimZUUyneAbezTxjUJT8XGE6Vhc+ iO+uZ2wFKLo8Ft/HzMDfkUyqbvuSObysrcHMiTzP1gpNB7rs5s1SVavHQUGxSxPhIukd IlfLJAhh7FQqBmgp0hpieka57xpnlpNuv4kBP7WS0VP4UD6Bif/q5lpp5oRY3cg0zU/X i33N5l8Y5u7EZeK8EgtOG6frUpJhvBaT+Du7N1E2CUqPzHq3lcR1+CV15ppwh1nnjm57 HVmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:organization:from:references :to:content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=j+0RBeOtBfSwY9mHSUEAzxsWIxBR21fZzDjm5L+hdPs=; b=tECfPPl/iXzmvx7days2Y0u/bkOFpG0RqswgJKnK1Olk9KT/gjoNJDL+t922R3bFWO glruzLdsy8L4qWmUppg97PcP9lc1229r5ZEeyuXn1phtLsLGVK/M32Tr4UQHCC2qb0vv /Ha6tGxhX9CQ8d03YEDm/bEFeKIwwfp5om+lSC14uHVIIjEXo5foQ9t+KLd7aOSVm5Fh Jm6oyQ0WzqeBX05QaNvALyyOvTp3YEVLXh7y3rDoJ3IuoBK/3qxV5tOoarg4BzgGD5Eb wmip+BmYYlE+qo4zx5Uce7tk4fDupZML+fzJXkegQzERqMCQWNxJg9SDkMh8I6QeKag0 XPJQ== X-Gm-Message-State: ACrzQf0tL1sMWsbBcTiALUKQ2dQgDzoiiXHus/nDqOnoLCk4twJw0Oi1 NnYBM7gtJjteejNt8tNE1WOLedSlATjYJ/Jr X-Google-Smtp-Source: AMsMyM69vAnr2RDfYXPSdbSb52NZIdPtqTVEFl8w6ad/ujd7sjaHkE5JwL1b4ZG+NuqK0CFeNfbkzw== X-Received: by 2002:a05:6808:238d:b0:34f:bb02:c91a with SMTP id bp13-20020a056808238d00b0034fbb02c91amr5617539oib.43.1665085307753; Thu, 06 Oct 2022 12:41:47 -0700 (PDT) Received: from ?IPV6:2804:1b3:a7c2:b87d:70b2:7867:2da9:30d3? ([2804:1b3:a7c2:b87d:70b2:7867:2da9:30d3]) by smtp.gmail.com with ESMTPSA id r11-20020acaf30b000000b0034d9042758fsm23531oih.24.2022.10.06.12.41.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 06 Oct 2022 12:41:47 -0700 (PDT) Message-ID: Date: Thu, 6 Oct 2022 16:41:44 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.3.1 Subject: Re: [PATCH] csu: Fix static when PIE is enabled but static PIE is not supported (BZ #29575) Content-Language: en-US To: Siddhesh Poyarekar , libc-alpha@sourceware.org, John Paul Adrian Glaubitz References: <20221005170851.2350343-1-adhemerval.zanella@linaro.org> <83026992-a7dc-61a5-b684-c1b7ea76107c@sourceware.org> <05cc7966-d9fe-3241-d48b-35457ea094a4@sourceware.org> From: Adhemerval Zanella Netto Organization: Linaro In-Reply-To: <05cc7966-d9fe-3241-d48b-35457ea094a4@sourceware.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.4 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.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 06/10/22 15:21, Siddhesh Poyarekar wrote: > On 2022-10-06 14:09, Adhemerval Zanella Netto wrote: >> >> >> On 05/10/22 16:04, Siddhesh Poyarekar wrote: >>> >>> >>> On 2022-10-05 13:08, Adhemerval Zanella wrote: >>>> On architectures where static PIE is not supported, both libc and >>>> static binaries are built still with -fPIE and -DPIC.  It leads to >>>> wrong code for some architectures (for instance sparc). >>>> >>>> This patch only enables -DPIC for .o files iff static-pie is also >>>> supported.  Since the same rule is used for both libc.a objects and >>>> installed binaries, the -fno-pie is added if static-pie is not >>>> supported (with a strategy similar to how stack protector is >>>> disabled for some architectures). >>>> >>>> Checked on x86_64-linux-gnu (with and without --disable-static-pie) >>>> and I also checked on sparc64-linux-gnu to verify that static binaries >>>> are not broken and both binaries and tests continue to be built >>>> for PIE. >>>> --- >>> >>> It should be --disable-default-pie.  Can you please check again and confirm? >> >> My mistake, I did use --disable-default-pie (the config.make files on >> sparc64 build differs for build-pie-default). > > OK then it looks good with the typo fixed. > > Thanks, > Sid Sigh... it is not correct if gcc has --enable-default-pie.