1995-02-18 09:27:10 +08:00
|
|
|
GLIBC_PROVIDES dnl See aclocal.m4 in the top level source directory.
|
|
|
|
|
2015-11-25 09:48:22 +08:00
|
|
|
dnl We need this setting because of the need for PLT calls in ld.so.
|
2016-05-31 04:13:47 +08:00
|
|
|
dnl See Roland's comment in
|
|
|
|
dnl https://sourceware.org/bugzilla/show_bug.cgi?id=15605
|
Introduce NO_RTLD_HIDDEN, make hurd use it instead of NO_HIDDEN
On the Hurd, the rtld needs to see its own dumb versions of a few functions
(defined in sysdeps/mach/hurd/dl-sysdep.c) overridden by libc's versions once
loaded. rtld should thus not have hidden attribute for these. To achieve this,
the Hurd port used to just define NO_HIDDEN, which disables it completely. For
now, this changes that to disabling it for all rtld functions, for simplicity.
See Roland's comment on https://sourceware.org/bugzilla/show_bug.cgi?id=15605#c5
The ld.so numbers remain at
8 .rel.plt 000000c8 00000c24 00000c24 00000c24 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
9 .plt 000001a0 00000cf0 00000cf0 00000cf0 2**4
CONTENTS, ALLOC, LOAD, READONLY, CODE
10 .plt.got 00000010 00000e90 00000e90 00000e90 2**3
CONTENTS, ALLOC, LOAD, READONLY, CODE
18 .got.plt 00000070 0002d000 0002d000 0002c000 2**2
CONTENTS, ALLOC, LOAD, DATA
which is about 3 times as much as on Linux.
The libc.so numbers get divided by 3 (the remainings are mostly RPC stub calls)
* include/libc-symbols.h [NO_RTLD_HIDDEN] (rtld_hidden_proto,
rtld_hidden_tls_proto, rtld_hidden_def, rtld_hidden_weak,
rtld_hidden_rtld_hidden_ver, data_def, rtld_hidden_data_weak,
rtld_hidden_data_ver): Define to empty.
* include/assert.h [IS_IN(rtld) && NO_RTLD_HIDDEN] (__assert_fail,
__assert_perror_fail): Likewise.
* include/dirent.h [IS_IN(rtld) && NO_RTLD_HIDDEN]
(__rewinddir): Likewise.
* include/libc-internal.h [IS_IN(rtld) && NO_RTLD_HIDDEN]
(__profile_frequency): Likewise.
* include/setjmp.h (__sigsetjmp): Likewise.
* include/signal.h [IS_IN(rtld) && NO_RTLD_HIDDEN] (__sigaction,
__libc_sigaction): Likewise.
* include/stdlib.h [NO_RTLD_HIDDEN] (unsetenv, __strtoul_internal): Do
not set hidden attribute.
* include/string.h [IS_IN(rtld) && NO_RTLD_HIDDEN] (__stpcpy, __strdup,
__strerror_t, __strsep_g, memchr, memcmp, memcpy, memmove, memset,
rawmemchr, stpcpy, strchr, strcmp, strlen, strnlen, strsep): Likewise.
* include/sys/stat.h [IS_IN(rtld) && NO_RTLD_HIDDEN] (__fxstat,
__fxstat64, __lxstat, __lxstat64, __xstat, __xstat64,
__fxstatat64): Likewise.
* include/sys/utsname.h [IS_IN(rtld) && NO_RTLD_HIDDEN]
(__uname): Likewise.
* include/sysdeps/generic/_itoa.h [IS_IN(rtld) && NO_RTLD_HIDDEN]
(_itoa_upper_digits, _itoa_lower_digits): Likewise.
* sysdeps/mach/hurd/configure.ac (NO_HIDDEN): Do not set.
(NO_RTLD_HIDDEN): Set.
* sysdeps/mach/hurd/configure: Refresh.
* config.h.in: Refresh.
2017-10-03 07:26:58 +08:00
|
|
|
AC_DEFINE([NO_RTLD_HIDDEN])
|
2015-11-25 09:48:22 +08:00
|
|
|
|
2015-08-27 05:48:33 +08:00
|
|
|
if test -n "$sysheaders"; then
|
|
|
|
OLD_CPPFLAGS=$CPPFLAGS
|
|
|
|
CPPFLAGS="$CPPFLAGS $SYSINCLUDES"
|
|
|
|
fi
|
|
|
|
|
2002-06-12 07:04:51 +08:00
|
|
|
AC_CACHE_CHECK(Hurd header version, libc_cv_hurd_version, [dnl
|
2021-05-22 10:42:48 +08:00
|
|
|
AC_PREPROC_IFELSE([AC_LANG_PROGRAM(dnl
|
|
|
|
[[#include <hurd/version.h>]], [[
|
2002-06-12 07:04:51 +08:00
|
|
|
#define NEED_VERSION 20020609
|
|
|
|
#if HURD_INTERFACE_VERSION < NEED_VERSION
|
|
|
|
# error Hurd version too old: HURD_INTERFACE_VERSION < NEED_VERSION
|
2021-05-22 10:42:48 +08:00
|
|
|
#endif]])],
|
|
|
|
[libc_cv_hurd_version=ok],
|
|
|
|
[libc_cv_hurd_version=bad])])
|
2002-06-12 07:04:51 +08:00
|
|
|
if test "x$libc_cv_hurd_version" != xok; then
|
|
|
|
AC_MSG_ERROR(Hurd headers not installed or too old)
|
|
|
|
fi
|
2015-08-27 05:48:33 +08:00
|
|
|
|
2024-02-18 00:48:46 +08:00
|
|
|
dnl
|
|
|
|
dnl hurd_RPC_CHECK(interface.defs, rpc_method, define)
|
|
|
|
dnl
|
|
|
|
dnl Check if rpc_method RPC is defined by interface.defs
|
|
|
|
dnl and define `define`.
|
|
|
|
dnl
|
|
|
|
AC_DEFUN([hurd_RPC_CHECK], [dnl
|
|
|
|
AC_CACHE_CHECK(for $2 in $1, libc_cv_hurd_rpc_$2, [dnl
|
|
|
|
AC_EGREP_HEADER($2, hurd/$1,
|
|
|
|
libc_cv_hurd_rpc_$2=yes,
|
|
|
|
libc_cv_hurd_rpc_$2=no)])
|
|
|
|
if test $libc_cv_hurd_rpc_$2 = yes; then
|
|
|
|
AC_DEFINE([$3])
|
|
|
|
fi
|
|
|
|
])
|
|
|
|
|
|
|
|
hurd_RPC_CHECK(process.defs, proc_getchildren_rusage,
|
|
|
|
HAVE_HURD_PROC_GETCHILDREN_RUSAGE)
|
|
|
|
|
2015-08-27 05:48:33 +08:00
|
|
|
if test -n "$sysheaders"; then
|
|
|
|
CPPFLAGS=$OLD_CPPFLAGS
|
|
|
|
fi
|
2021-05-03 14:12:11 +08:00
|
|
|
|
|
|
|
# Hurd has libpthread as a separate library.
|
|
|
|
pthread_in_libc=no
|