From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x62f.google.com (mail-pl1-x62f.google.com [IPv6:2607:f8b0:4864:20::62f]) by sourceware.org (Postfix) with ESMTPS id C00CC3858D28 for ; Tue, 20 Feb 2024 14:49:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C00CC3858D28 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org C00CC3858D28 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::62f ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1708440580; cv=none; b=jV0KbFJxv+oB5mh5jHOV/+Jit5YxHNOK7sNScUvdOSJpJYJulA7lw7uUZp/RRBxoiALLbxYjtL9xzj5W3HQ+AU/zUSyjYjgrtnxEcELk3tmshAoIId3mY/GHhLDo1VG/nv2Cs86RmdziCidrzkHtYa0fJizuexerQPbNWdF3KY8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1708440580; c=relaxed/simple; bh=PwQm8DpzZdK4w3oriz0W0gwyZHVJviUJnqOD7Xejvug=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=Lf37mTOX1UnIGOpkGqSG2NJzYcLUio0hO5iX9PjNQ+SSoROTjLd3AAaG3Nhf8YEX2+cRIuJwOj2J7rhE63HN/W/+gZaxDdxtiFiRdFPwaUfhm1k4VOtrl22U/DGgFjDBVoydWgKX8jDWoXP93Srw3NDIQYJ4HeYVT2uRZ82CQCI= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pl1-x62f.google.com with SMTP id d9443c01a7336-1d71cb97937so53537535ad.3 for ; Tue, 20 Feb 2024 06:49:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708440577; x=1709045377; darn=sourceware.org; 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=d3o5w/CAz+ieMAKORqHG5yYpo841U91YcDZAEe9A/dU=; b=srJAfPfCuR45szToQzo6s0zS5AbFunvQ4Kv8Qk+CdLZ/0JhINlVy0UDgwKReOT38Pk VdhK72E1hhCGYkwdlRUGKmpa+1nLpjOiGpgeQVoGDlok1th9ruDVSxaqwesl8FzOPzru NOEwNKnth4HUtR88nIvmJT2Mk2VorzzZK+gWdqe7dCUlYsK+pnXe7XFB/V1iScMaJU9U 7YeEnRz7+ceBIMevDpuEyCyCqI62Uf9PZhjrKTBGKahn+9u5rp1YyEvODjObw24YlCT4 8f8pN6PkVnkQglFuKaAEGRun8iV2742zpJIYJSCeWy/2n7dIwfB0UBWPE6NI0RnEXWJK 7zhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708440577; x=1709045377; 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=d3o5w/CAz+ieMAKORqHG5yYpo841U91YcDZAEe9A/dU=; b=UmmnOL5pW+kT8FCSRtfhoQL3qyKEQYGBMBmdKBzAOuIydyIa1LNTB0e5hVNX1dVuO3 JbSdkAUaCad6Hj7FdgX9rx78xP01cZG17tbUaWj2tO6TjAa2g3zqZFPc/ubj8Sl9k/W2 /v7L7T2n7UBhDa8Wf3lGxNUVsvdv8yqEPkQ2WZblLl1xkcKsUw3vTact7bz35SYrhUB+ 6bJKxiMtMgJO8RsBHSi7Vy8sG6TjSFxpP6oxHm0URz4IjNGqnAk1Sq/VPIjySnYh7omD QRUfEM0wpisaLjvPKgKI2yZv++Bhy6+JUImir8X898bnhsy9rAG+HSHBmlt8m7L9mYK9 WH7Q== X-Forwarded-Encrypted: i=1; AJvYcCV6DLrR6tcNWn6sTPrBoL/MiQuk6uGEqyd/KOo3rPkwz/d4uYcYQuijxn7z+YAA/2+82nOxaA8XyAJEFA/tEJxzFpEAT8nu1QQJ X-Gm-Message-State: AOJu0YzsBgUX7AZkZrLR1OigqmCdTU/+AzNIzEysYLr+Uulvg7VLj8P8 7mmDT8g8dxokgFQKsiJO9HKYsY0rR7SyyNb/5PDiXUzjgL5Ed+ax/C/z37OHHqTqswvE9gpO8ks f X-Google-Smtp-Source: AGHT+IHZkqaAXmuk4wIKaKImjRNsgSvwGabfCccrm3qMDngE+3c/wsxwiaLuyGxqkDuWOQt4ujXdcg== X-Received: by 2002:a17:902:b686:b0:1d9:8f6e:86e8 with SMTP id c6-20020a170902b68600b001d98f6e86e8mr13391977pls.69.1708440576610; Tue, 20 Feb 2024 06:49:36 -0800 (PST) Received: from ?IPV6:2804:1b3:a7c0:8177:94f3:b846:f4ad:67a9? ([2804:1b3:a7c0:8177:94f3:b846:f4ad:67a9]) by smtp.gmail.com with ESMTPSA id d8-20020a170902654800b001da15580ca8sm6521599pln.52.2024.02.20.06.49.35 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 20 Feb 2024 06:49:36 -0800 (PST) Message-ID: <6ceaf811-a69f-49bb-9f7e-a0794f769993@linaro.org> Date: Tue, 20 Feb 2024 11:49:35 -0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] S390: Always enable static PIE if build with lld. Content-Language: en-US To: Stefan Liebler , libc-alpha@sourceware.org References: <20240219154931.653686-1-stli@linux.ibm.com> From: Adhemerval Zanella Netto Organization: Linaro In-Reply-To: <20240219154931.653686-1-stli@linux.ibm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE 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 19/02/24 12:49, Stefan Liebler wrote: > LLVM ld.lld now also supports s390x and avoids unnecessary TPOFF > relocations for position independent executables. Both recent > commits were also cherry-picked to LLVM 18. What about old lld that does not have the cherry-picked commits? Should we follow other practice and check this with a proper test instead? > > This patch just enables static PIE if build with lld. > --- > sysdeps/s390/s390-64/configure | 10 ++++++++-- > sysdeps/s390/s390-64/configure.ac | 10 ++++++++-- > 2 files changed, 16 insertions(+), 4 deletions(-) > > diff --git a/sysdeps/s390/s390-64/configure b/sysdeps/s390/s390-64/configure > index 824ae9c129..c26785f32f 100644 > --- a/sysdeps/s390/s390-64/configure > +++ b/sysdeps/s390/s390-64/configure > @@ -12,8 +12,14 @@ case $($LD --version) in > libc_cv_s390x_staticpie_req_version=no > ;; > "LLD"*) > - # As of 2023-08-07, there is no lld which supports s390x. > - libc_cv_s390x_staticpie_req_version=no > + # The required lld patches are available with LLVM 18: > + # - [lld] Add target support for SystemZ (s390x) #75643 > + # https://github.com/llvm/llvm-project/pull/75643 > + # 2024-02-13: https://github.com/llvm/llvm-project/commit/fe3406e349884e4ef61480dd0607f1e237102c74 > + # - [lld/ELF] Avoid unnecessary TPOFF relocations in GOT for -pie #81739 > + # https://github.com/llvm/llvm-project/pull/81739 > + # 2024-02-14: https://github.com/llvm/llvm-project/commit/6f907733e65d24edad65f763fb14402464bd578b > + libc_cv_s390x_staticpie_req_version=yes > ;; > *) > # The required binutils patches are available with bintuils 2.39 > diff --git a/sysdeps/s390/s390-64/configure.ac b/sysdeps/s390/s390-64/configure.ac > index 4657de0d37..2b5bffc107 100644 > --- a/sysdeps/s390/s390-64/configure.ac > +++ b/sysdeps/s390/s390-64/configure.ac > @@ -12,8 +12,14 @@ case $($LD --version) in > libc_cv_s390x_staticpie_req_version=no > ;; > "LLD"*) > - # As of 2023-08-07, there is no lld which supports s390x. > - libc_cv_s390x_staticpie_req_version=no > + # The required lld patches are available with LLVM 18: > + # - [lld] Add target support for SystemZ (s390x) #75643 > + # https://github.com/llvm/llvm-project/pull/75643 > + # 2024-02-13: https://github.com/llvm/llvm-project/commit/fe3406e349884e4ef61480dd0607f1e237102c74 > + # - [lld/ELF] Avoid unnecessary TPOFF relocations in GOT for -pie #81739 > + # https://github.com/llvm/llvm-project/pull/81739 > + # 2024-02-14: https://github.com/llvm/llvm-project/commit/6f907733e65d24edad65f763fb14402464bd578b > + libc_cv_s390x_staticpie_req_version=yes > ;; > *) > # The required binutils patches are available with bintuils 2.39