From patchwork Tue Jan 7 02:30:53 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: DJ Delorie X-Patchwork-Id: 104207 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 22C733858C66 for ; Tue, 7 Jan 2025 02:31:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 22C733858C66 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=OSBamMX5 X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTP id 2BB263858D21 for ; Tue, 7 Jan 2025 02:30:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2BB263858D21 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 2BB263858D21 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1736217058; cv=none; b=E5+oB1/7JSdVds9yCTXWLqcHrLIkLhSnjrvy7O/lz7TCNhUm7+d2kjov/Tjek6uYA4c1Lsr0ApPVgOKDzBOxcgUIplpACPMbHPk9udL9CgkUZVMHEDGpWudrOO5uR4tsb5XUgnN0OZw3ZgpVWOncmmXHLywCW34iHbFHjHy6YFs= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1736217058; c=relaxed/simple; bh=lS7E2nQcarvOVWeDJOd5L2l/fV9anhwoNkgP9zsGRWk=; h=DKIM-Signature:Date:Message-Id:From:To:Subject; b=d77+gmrzQk4Fh3DvsVh7IOIHIp6U35WgWCVTAY59syzCpcuTep39MV0ZeccAHgojFfq0192Tbt/c4BwblclbNgdqB35z8b8lOKZaZqxn8eZ5216e1+PF6EifVA2exr8kOWq93FvElofQ3toIXVviuz8X8323r3aihrvoQaSawMs= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2BB263858D21 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1736217057; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:content-type:content-type; bh=P0sQuHsTVW4jqnZ/Pk1OFMxFG9tDuqzGkO8sJq5hUQY=; b=OSBamMX5pLRfMKWjWkxK+jN9oOzPk5c5Y0/dhV1Zuyh8Xj9e0NkeCHzzuic0mB0HCmXTTC 6QNBxyFpeWDgzj4B43V4Zx8xGC1i1+tqTYi4mEVo302Tw+3/ywnBAjGCwA/MxVpmlfpPR7 R4EFeJ7EGtzJiiZ7WV61kqpCC1iaMOs= Received: from mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-263-NeYc_ogZNNmQDRddS5RAdw-1; Mon, 06 Jan 2025 21:30:56 -0500 X-MC-Unique: NeYc_ogZNNmQDRddS5RAdw-1 X-Mimecast-MFC-AGG-ID: NeYc_ogZNNmQDRddS5RAdw Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 91CDD19560AB for ; Tue, 7 Jan 2025 02:30:55 +0000 (UTC) Received: from greed.delorie.com (unknown [10.22.88.99]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 4152519560A2 for ; Tue, 7 Jan 2025 02:30:55 +0000 (UTC) Received: from greed.delorie.com.redhat.com (localhost [127.0.0.1]) by greed.delorie.com (8.16.1/8.16.1) with ESMTP id 5072Urre141039 for ; Mon, 6 Jan 2025 21:30:53 -0500 Date: Mon, 06 Jan 2025 21:30:53 -0500 Message-Id: From: DJ Delorie To: libc-alpha@sourceware.org Subject: configure: make --prefix=/usr and '' identical X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: 7k8BSWZxlfOg61jbmVnC7gu5ygKqZDAnNPy-od3DJMs_1736217055 X-Mimecast-Originator: redhat.com content-type: text/plain; charset="US-ASCII"; x-default=true X-Spam-Status: No, score=-10.9 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_NONE, 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 X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patchwork=sourceware.org@sourceware.org Ensure that all code that looks for an explicit --prefix=/usr also checks for an implicit one. Follow up to 81439a116cf48583127ddf1f09809440aa40969a diff --git a/aclocal.m4 b/aclocal.m4 index e06366cdb2..61b328c21a 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -311,7 +311,7 @@ dnl LIBC_SLIBDIR_RTLDDIR([slibdir], [rtlddir]) AC_DEFUN([LIBC_SLIBDIR_RTLDDIR], [test -n "$libc_cv_slibdir" || case "$prefix" in -/usr | /usr/) +/usr | /usr/ | NONE) libc_cv_slibdir='/$1' libc_cv_rtlddir='/$2' if test "$libdir" = '${exec_prefix}/lib'; then diff --git a/configure b/configure index b410ee4bd9..335cb80160 100755 --- a/configure +++ b/configure @@ -608,6 +608,7 @@ PACKAGE_STRING='GNU C Library (see version.h)' PACKAGE_BUGREPORT='https://sourceware.org/bugzilla/' PACKAGE_URL='https://www.gnu.org/software/glibc/' +ac_default_prefix=/usr ac_unique_file="include/features.h" enable_option_checking=no ac_subst_vars='LTLIBOBJS @@ -2843,6 +2844,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu + ac_config_headers="$ac_config_headers config.h" diff --git a/configure.ac b/configure.ac index 9af8d541e5..4934b044ce 100644 --- a/configure.ac +++ b/configure.ac @@ -2,6 +2,7 @@ dnl Process this file with autoconf to produce a configure script. dnl Note we do not use AC_PREREQ here! See aclocal.m4 for what we use instead. AC_INIT([GNU C Library], [(see version.h)], [https://sourceware.org/bugzilla/], [glibc], [https://www.gnu.org/software/glibc/]) +AC_PREFIX_DEFAULT([/usr]) AC_CONFIG_SRCDIR([include/features.h]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_AUX_DIR([scripts]) diff --git a/sysdeps/gnu/configure b/sysdeps/gnu/configure index 18c9d7945a..d16766bc70 100644 --- a/sysdeps/gnu/configure +++ b/sysdeps/gnu/configure @@ -8,7 +8,7 @@ # in /lib and /etc. test -n "$libc_cv_slibdir" || case "$prefix" in -/usr | /usr/) +/usr | /usr/ | NONE) libc_cv_slibdir='/lib' libc_cv_rtlddir='/lib' if test "$libdir" = '${exec_prefix}/lib'; then @@ -19,7 +19,7 @@ case "$prefix" in ;; esac case "$prefix" in -/usr | /usr/) +/usr | /usr/ | NONE) # Allow the user to override the path with --sysconfdir. if test "$sysconfdir" = '${prefix}/etc'; then libc_cv_sysconfdir=/etc diff --git a/sysdeps/gnu/configure.ac b/sysdeps/gnu/configure.ac index 634fe4de2a..52bc35e223 100644 --- a/sysdeps/gnu/configure.ac +++ b/sysdeps/gnu/configure.ac @@ -8,7 +8,7 @@ GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory. # in /lib and /etc. LIBC_SLIBDIR_RTLDDIR([lib], [lib]) case "$prefix" in -/usr | /usr/) +/usr | /usr/ | NONE) # Allow the user to override the path with --sysconfdir. if test "$sysconfdir" = '${prefix}/etc'; then libc_cv_sysconfdir=/etc diff --git a/sysdeps/unix/sysv/linux/aarch64/configure b/sysdeps/unix/sysv/linux/aarch64/configure index b872b9870c..20669079ae 100644 --- a/sysdeps/unix/sysv/linux/aarch64/configure +++ b/sysdeps/unix/sysv/linux/aarch64/configure @@ -5,7 +5,7 @@ arch_minimum_kernel=3.7.0 test -n "$libc_cv_slibdir" || case "$prefix" in -/usr | /usr/) +/usr | /usr/ | NONE) libc_cv_slibdir='/lib64' libc_cv_rtlddir='/lib' if test "$libdir" = '${exec_prefix}/lib'; then diff --git a/sysdeps/unix/sysv/linux/configure b/sysdeps/unix/sysv/linux/configure index 8cda8e9451..a23b55e82b 100644 --- a/sysdeps/unix/sysv/linux/configure +++ b/sysdeps/unix/sysv/linux/configure @@ -1,4 +1,3 @@ -ac_default_prefix=/usr # This file is generated from configure.ac by Autoconf. DO NOT EDIT! # Local configure fragment for sysdeps/unix/sysv/linux. @@ -117,8 +116,6 @@ if test -n "$sysheaders"; then CPPFLAGS=$OLD_CPPFLAGS fi - - if test "$prefix" = "/usr/local" -o "$prefix" = "/usr/local/"; then if test $enable_sanity = yes; then echo "\ diff --git a/sysdeps/unix/sysv/linux/configure.ac b/sysdeps/unix/sysv/linux/configure.ac index 4c43cda877..6f224ed048 100644 --- a/sysdeps/unix/sysv/linux/configure.ac +++ b/sysdeps/unix/sysv/linux/configure.ac @@ -71,8 +71,6 @@ if test -n "$sysheaders"; then CPPFLAGS=$OLD_CPPFLAGS fi -AC_PREFIX_DEFAULT([/usr]) - if test "$prefix" = "/usr/local" -o "$prefix" = "/usr/local/"; then if test $enable_sanity = yes; then echo "\ diff --git a/sysdeps/unix/sysv/linux/loongarch/configure b/sysdeps/unix/sysv/linux/loongarch/configure index 914943f914..0c9f2660d0 100644 --- a/sysdeps/unix/sysv/linux/loongarch/configure +++ b/sysdeps/unix/sysv/linux/loongarch/configure @@ -196,7 +196,7 @@ case $libc_cv_loongarch_int_abi$libc_cv_loongarch_float_abi in lp64s) test -n "$libc_cv_slibdir" || case "$prefix" in -/usr | /usr/) +/usr | /usr/ | NONE) libc_cv_slibdir='/lib64/sf' libc_cv_rtlddir='/lib64' if test "$libdir" = '${exec_prefix}/lib'; then @@ -210,7 +210,7 @@ esac lp64d) test -n "$libc_cv_slibdir" || case "$prefix" in -/usr | /usr/) +/usr | /usr/ | NONE) libc_cv_slibdir='/lib64' libc_cv_rtlddir='/lib64' if test "$libdir" = '${exec_prefix}/lib'; then diff --git a/sysdeps/unix/sysv/linux/mips/configure b/sysdeps/unix/sysv/linux/mips/configure index 6e3402c111..93e0f5c8c6 100644 --- a/sysdeps/unix/sysv/linux/mips/configure +++ b/sysdeps/unix/sysv/linux/mips/configure @@ -473,7 +473,7 @@ case $machine in mips/mips64/n64/*) test -n "$libc_cv_slibdir" || case "$prefix" in -/usr | /usr/) +/usr | /usr/ | NONE) libc_cv_slibdir='/lib64' libc_cv_rtlddir='/lib64' if test "$libdir" = '${exec_prefix}/lib'; then @@ -487,7 +487,7 @@ esac mips/mips64/n32/*) test -n "$libc_cv_slibdir" || case "$prefix" in -/usr | /usr/) +/usr | /usr/ | NONE) libc_cv_slibdir='/lib32' libc_cv_rtlddir='/lib32' if test "$libdir" = '${exec_prefix}/lib'; then diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure index 5dd70689fc..42919b7880 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/configure @@ -3,7 +3,7 @@ test -n "$libc_cv_slibdir" || case "$prefix" in -/usr | /usr/) +/usr | /usr/ | NONE) libc_cv_slibdir='/lib64' libc_cv_rtlddir='/lib64' if test "$libdir" = '${exec_prefix}/lib'; then diff --git a/sysdeps/unix/sysv/linux/riscv/configure b/sysdeps/unix/sysv/linux/riscv/configure index 08aed0d805..3da51de84c 100755 --- a/sysdeps/unix/sysv/linux/riscv/configure +++ b/sysdeps/unix/sysv/linux/riscv/configure @@ -212,7 +212,7 @@ case $libc_cv_riscv_int_abi$libc_cv_riscv_float_abi-$machine in lp64-riscv/rv64/*) test -n "$libc_cv_slibdir" || case "$prefix" in -/usr | /usr/) +/usr | /usr/ | NONE) libc_cv_slibdir='/lib64/lp64' libc_cv_rtlddir='/lib' if test "$libdir" = '${exec_prefix}/lib'; then @@ -226,7 +226,7 @@ esac lp64d-riscv/rv64/*) test -n "$libc_cv_slibdir" || case "$prefix" in -/usr | /usr/) +/usr | /usr/ | NONE) libc_cv_slibdir='/lib64/lp64d' libc_cv_rtlddir='/lib' if test "$libdir" = '${exec_prefix}/lib'; then @@ -240,7 +240,7 @@ esac ilp32-riscv/rv32/*) test -n "$libc_cv_slibdir" || case "$prefix" in -/usr | /usr/) +/usr | /usr/ | NONE) libc_cv_slibdir='/lib32/ilp32' libc_cv_rtlddir='/lib' if test "$libdir" = '${exec_prefix}/lib'; then @@ -254,7 +254,7 @@ esac ilp32d-riscv/rv32/*) test -n "$libc_cv_slibdir" || case "$prefix" in -/usr | /usr/) +/usr | /usr/ | NONE) libc_cv_slibdir='/lib32/ilp32d' libc_cv_rtlddir='/lib' if test "$libdir" = '${exec_prefix}/lib'; then diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/configure b/sysdeps/unix/sysv/linux/s390/s390-64/configure index 5490bc669e..a858c8bc40 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-64/configure +++ b/sysdeps/unix/sysv/linux/s390/s390-64/configure @@ -3,7 +3,7 @@ test -n "$libc_cv_slibdir" || case "$prefix" in -/usr | /usr/) +/usr | /usr/ | NONE) libc_cv_slibdir='/lib64' libc_cv_rtlddir='/lib' if test "$libdir" = '${exec_prefix}/lib'; then diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/configure b/sysdeps/unix/sysv/linux/sparc/sparc64/configure index f09553588c..46c6c20256 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc64/configure +++ b/sysdeps/unix/sysv/linux/sparc/sparc64/configure @@ -3,7 +3,7 @@ test -n "$libc_cv_slibdir" || case "$prefix" in -/usr | /usr/) +/usr | /usr/ | NONE) libc_cv_slibdir='/lib64' libc_cv_rtlddir='/lib64' if test "$libdir" = '${exec_prefix}/lib'; then diff --git a/sysdeps/unix/sysv/linux/x86_64/64/configure b/sysdeps/unix/sysv/linux/x86_64/64/configure index 2613d3af4f..73c8eb74de 100644 --- a/sysdeps/unix/sysv/linux/x86_64/64/configure +++ b/sysdeps/unix/sysv/linux/x86_64/64/configure @@ -3,7 +3,7 @@ test -n "$libc_cv_slibdir" || case "$prefix" in -/usr | /usr/) +/usr | /usr/ | NONE) libc_cv_slibdir='/lib64' libc_cv_rtlddir='/lib64' if test "$libdir" = '${exec_prefix}/lib'; then diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/configure b/sysdeps/unix/sysv/linux/x86_64/x32/configure index bf64c333e1..29073b569e 100644 --- a/sysdeps/unix/sysv/linux/x86_64/x32/configure +++ b/sysdeps/unix/sysv/linux/x86_64/x32/configure @@ -5,7 +5,7 @@ arch_minimum_kernel=3.4.0 test -n "$libc_cv_slibdir" || case "$prefix" in -/usr | /usr/) +/usr | /usr/ | NONE) libc_cv_slibdir='/libx32' libc_cv_rtlddir='/libx32' if test "$libdir" = '${exec_prefix}/lib'; then