configure: make --prefix=/usr and '' identical
Andreas K. Huettel
andreas.huettel@ur.de
Wed Jan 8 13:05:44 GMT 2025
Hi DJ,
given that the original patch was not really a user-visible feature, just a "convenience
help" (that I fully agree with, I'd also happily omit --prefix=/usr), how about we revert
it now and put the full fix in after the release?
That automatically also gives the build code more "developer testing" then...
Cheers -a
Am Dienstag, 7. Januar 2025, 03:30:53 Mitteleuropäische Normalzeit schrieb DJ Delorie:
>
> 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
>
>
--
PD Dr. Andreas K. Huettel
Institute for Experimental and Applied Physics
University of Regensburg
93040 Regensburg
Germany
tel. +49 151 241 67748 (mobile)
tel. +49 941 943 1618 (office)
e-mail andreas.huettel@ur.de
https://www.akhuettel.de/
https://www.akhuettel.de/group/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 981 bytes
Desc: This is a digitally signed message part.
URL: <https://sourceware.org/pipermail/libc-alpha/attachments/20250108/f75c0bee/attachment-0001.sig>
More information about the Libc-alpha
mailing list