From patchwork Mon Feb 7 22:11:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 50890 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 38B0A3858415 for ; Mon, 7 Feb 2022 22:12:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 38B0A3858415 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1644271930; bh=INJyHCnD6uMT/SPam7iAqthgpd39BTfkuuYhPUAG/Uo=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=VVPj2rdFtozFDbyAhKRr+RoYUYxZosFZjdVgpIBQhcBWcLIP5RNfcQqKMLgpmtndL O+0ESm633Van9CAbI/3SNlT/KsTY0Qv7bQavYyOiVmDdNvaSjX9pswXjiRoxprc/a6 vmm92lGljQthzpXtCE/w0CBOLjfUKJqB1KmsimqA= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pj1-x1034.google.com (mail-pj1-x1034.google.com [IPv6:2607:f8b0:4864:20::1034]) by sourceware.org (Postfix) with ESMTPS id 0ADB23858C83 for ; Mon, 7 Feb 2022 22:11:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 0ADB23858C83 Received: by mail-pj1-x1034.google.com with SMTP id v15-20020a17090a4ecf00b001b82db48754so614061pjl.2 for ; Mon, 07 Feb 2022 14:11:45 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=INJyHCnD6uMT/SPam7iAqthgpd39BTfkuuYhPUAG/Uo=; b=Ah9Z52BR3371TTfnZM/7ZrnWg/ZcX5Q1BZ0guTySRHWESg8Z7gToew/DOUj5Dr9kX3 fHJAsyDVdpS0RVlVRhgo3q6aE1ZHg7HS9FWatvcw+R7LOdLgYFigP0Z9RI009kHo0c+5 jOX8KIWJiBAvFuOcmbLI6LhVLq9JpJddTLfN2nSHR1ad1nWrY7PTFCiFWmorZ+FeudHo 5WDx13LVODkqZjBmIOzg5iOf1GGtTbJ1e9OeYpERLc4RpW9l9pXW/1y12WpxzbLkvMUs zDFlbTe+ZIPcbqhuXxhgH+854Wkn/XoAX2mCAUUboFrHG0FvysutWS3UxwAjrJEFnbqs IY9Q== X-Gm-Message-State: AOAM530uBzUkoavqzU+QEVy+2GQNu2Bh0kdbjfCionzdBApzyq4glNZt GXdXTjp81ZNTX5xpP2HmZyP2LYgC0IU= X-Google-Smtp-Source: ABdhPJygutVdeJ/KYMFIeDdavnQ5R0H8C/w/SWkjoGSXR/ghs6Wg4K5ucv1zql44FlO871Pp/zOogw== X-Received: by 2002:a17:902:9308:: with SMTP id bc8mr1698582plb.147.1644271904766; Mon, 07 Feb 2022 14:11:44 -0800 (PST) Received: from gnu-tgl-2.localdomain ([172.58.38.240]) by smtp.gmail.com with ESMTPSA id s4sm9077623pgg.80.2022.02.07.14.11.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Feb 2022 14:11:44 -0800 (PST) Received: from gnu-tgl-2.. (localhost [IPv6:::1]) by gnu-tgl-2.localdomain (Postfix) with ESMTP id E985D30044A for ; Mon, 7 Feb 2022 14:11:42 -0800 (PST) To: libc-alpha@sourceware.org Subject: [PATCH] x86/configure.ac: Define PI_STATIC_AND_HIDDEN/SUPPORT_STATIC_PIE Date: Mon, 7 Feb 2022 14:11:42 -0800 Message-Id: <20220207221142.165641-1-hjl.tools@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Spam-Status: No, score=-3029.5 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, T_SCC_BODY_TEXT_LINE 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-Patchwork-Original-From: "H.J. Lu via Libc-alpha" From: "H.J. Lu" Reply-To: "H.J. Lu" Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" Move PI_STATIC_AND_HIDDEN and SUPPORT_STATIC_PIE to sysdeps/x86/configure.ac. --- sysdeps/i386/configure | 6 ------ sysdeps/i386/configure.ac | 7 ------- sysdeps/x86/configure | 6 ++++++ sysdeps/x86/configure.ac | 7 +++++++ sysdeps/x86_64/configure | 6 ------ sysdeps/x86_64/configure.ac | 7 ------- 6 files changed, 13 insertions(+), 26 deletions(-) diff --git a/sysdeps/i386/configure b/sysdeps/i386/configure index ed46d53314..af50c5bfab 100644 --- a/sysdeps/i386/configure +++ b/sysdeps/i386/configure @@ -83,13 +83,7 @@ $as_echo "$libc_cv_ld_static_pie" >&6; } fi fi -$as_echo "#define PI_STATIC_AND_HIDDEN 1" >>confdefs.h - - if test x"$multi_arch" != xno; then $as_echo "#define NO_HIDDEN_EXTERN_FUNC_IN_PIE 1" >>confdefs.h fi - -$as_echo "#define SUPPORT_STATIC_PIE 1" >>confdefs.h - diff --git a/sysdeps/i386/configure.ac b/sysdeps/i386/configure.ac index a6a0672835..234ef2454a 100644 --- a/sysdeps/i386/configure.ac +++ b/sysdeps/i386/configure.ac @@ -53,15 +53,8 @@ rm -f conftest*]) fi fi -dnl It is always possible to access static and hidden symbols in an -dnl position independent way. -AC_DEFINE(PI_STATIC_AND_HIDDEN) - dnl When multi-arch is enabled, all external functions must be called dnl via PIC PLT in PIE, which requires setting up EBX register. if test x"$multi_arch" != xno; then AC_DEFINE(NO_HIDDEN_EXTERN_FUNC_IN_PIE) fi - -dnl Static PIE is supported. -AC_DEFINE(SUPPORT_STATIC_PIE) diff --git a/sysdeps/x86/configure b/sysdeps/x86/configure index 7bdbfdc6dc..46d436fddf 100644 --- a/sysdeps/x86/configure +++ b/sysdeps/x86/configure @@ -189,3 +189,9 @@ $as_echo "$libc_cv_have_x86_movbe" >&6; } fi config_vars="$config_vars enable-x86-isa-level = $libc_cv_include_x86_isa_level" + +$as_echo "#define PI_STATIC_AND_HIDDEN 1" >>confdefs.h + + +$as_echo "#define SUPPORT_STATIC_PIE 1" >>confdefs.h + diff --git a/sysdeps/x86/configure.ac b/sysdeps/x86/configure.ac index 10d5c2e0e5..918b636891 100644 --- a/sysdeps/x86/configure.ac +++ b/sysdeps/x86/configure.ac @@ -127,3 +127,10 @@ if test $libc_cv_include_x86_isa_level = yes; then fi fi LIBC_CONFIG_VAR([enable-x86-isa-level], [$libc_cv_include_x86_isa_level]) + +dnl It is always possible to access static and hidden symbols in an +dnl position independent way. +AC_DEFINE(PI_STATIC_AND_HIDDEN) + +dnl Static PIE is supported. +AC_DEFINE(SUPPORT_STATIC_PIE) diff --git a/sysdeps/x86_64/configure b/sysdeps/x86_64/configure index d4dd0aa7df..44b6055e55 100755 --- a/sysdeps/x86_64/configure +++ b/sysdeps/x86_64/configure @@ -27,11 +27,5 @@ if test x"$build_mathvec" = xnotset; then build_mathvec=yes fi -$as_echo "#define PI_STATIC_AND_HIDDEN 1" >>confdefs.h - - -$as_echo "#define SUPPORT_STATIC_PIE 1" >>confdefs.h - - test -n "$critic_missing" && as_fn_error $? " *** $critic_missing" "$LINENO" 5 diff --git a/sysdeps/x86_64/configure.ac b/sysdeps/x86_64/configure.ac index c4c748c1d0..1215dcb1e4 100644 --- a/sysdeps/x86_64/configure.ac +++ b/sysdeps/x86_64/configure.ac @@ -14,12 +14,5 @@ if test x"$build_mathvec" = xnotset; then build_mathvec=yes fi -dnl It is always possible to access static and hidden symbols in an -dnl position independent way. -AC_DEFINE(PI_STATIC_AND_HIDDEN) - -dnl Static PIE is supported. -AC_DEFINE(SUPPORT_STATIC_PIE) - test -n "$critic_missing" && AC_MSG_ERROR([ *** $critic_missing])