2021-02-02 00:13:38 +01:00
|
|
|
diff --git a/elf/Makefile b/elf/Makefile
|
|
|
|
index 5d666b1b..a5017e9c 100644
|
|
|
|
--- a/elf/Makefile
|
|
|
|
+++ b/elf/Makefile
|
|
|
|
@@ -669,14 +669,14 @@ $(objpfx)sln: $(sln-modules:%=$(objpfx)%.o)
|
2012-09-18 18:38:43 +02:00
|
|
|
|
2015-03-02 21:24:55 +01:00
|
|
|
$(objpfx)ldconfig: $(ldconfig-modules:%=$(objpfx)%.o)
|
2012-09-18 18:38:43 +02:00
|
|
|
|
|
|
|
-SYSCONF-FLAGS := -D'SYSCONFDIR="$(sysconfdir)"'
|
2018-02-18 22:52:44 +01:00
|
|
|
-CFLAGS-ldconfig.c += $(SYSCONF-FLAGS) -D'LIBDIR="$(libdir)"' \
|
2012-09-18 18:38:43 +02:00
|
|
|
+PREFIX-FLAGS := -D'PREFIX="$(prefix)"'
|
2018-02-18 22:52:44 +01:00
|
|
|
+CFLAGS-ldconfig.c += $(PREFIX-FLAGS) -D'LIBDIR="$(libdir)"' \
|
2015-03-02 21:24:55 +01:00
|
|
|
-D'SLIBDIR="$(slibdir)"'
|
|
|
|
libof-ldconfig = ldconfig
|
2018-02-18 22:52:44 +01:00
|
|
|
-CFLAGS-dl-cache.c += $(SYSCONF-FLAGS)
|
|
|
|
-CFLAGS-cache.c += $(SYSCONF-FLAGS)
|
|
|
|
-CFLAGS-rtld.c += $(SYSCONF-FLAGS)
|
2021-02-02 00:13:38 +01:00
|
|
|
-CFLAGS-dl-usage.c += $(SYSCONF-FLAGS) \
|
2018-02-18 22:52:44 +01:00
|
|
|
+CFLAGS-dl-cache.c += $(PREFIX-FLAGS)
|
|
|
|
+CFLAGS-cache.c += $(PREFIX-FLAGS)
|
|
|
|
+CFLAGS-rtld.c += $(PREFIX-FLAGS)
|
2021-02-02 00:13:38 +01:00
|
|
|
+CFLAGS-dl-usage.c += $(PREFIX-FLAGS) \
|
|
|
|
-D'RTLD="$(rtlddir)/$(rtld-installed-name)"'
|
2012-09-18 18:38:43 +02:00
|
|
|
|
2015-03-02 21:24:55 +01:00
|
|
|
cpp-srcs-left := $(all-rtld-routines:=.os)
|
2021-02-02 00:13:38 +01:00
|
|
|
diff --git a/elf/dl-diagnostics.c b/elf/dl-diagnostics.c
|
|
|
|
index bef224b3..8e166b12 100644
|
|
|
|
--- a/elf/dl-diagnostics.c
|
|
|
|
+++ b/elf/dl-diagnostics.c
|
|
|
|
@@ -205,7 +205,7 @@ print_paths (void)
|
|
|
|
{
|
|
|
|
_dl_diagnostics_print_labeled_string ("path.prefix", PREFIX);
|
|
|
|
_dl_diagnostics_print_labeled_string ("path.rtld", RTLD);
|
|
|
|
- _dl_diagnostics_print_labeled_string ("path.sysconfdir", SYSCONFDIR);
|
|
|
|
+ _dl_diagnostics_print_labeled_string ("path.sysconfdir", PREFIX "/etc");
|
|
|
|
|
|
|
|
unsigned int index = 0;
|
|
|
|
static const char *system_dirs = SYSTEM_DIRS "\0";
|
|
|
|
diff --git a/elf/ldconfig.c b/elf/ldconfig.c
|
|
|
|
index 28ed637a..6f07b79a 100644
|
|
|
|
--- a/elf/ldconfig.c
|
|
|
|
+++ b/elf/ldconfig.c
|
|
|
|
@@ -57,7 +57,7 @@
|
|
|
|
#define TLS_HWCAP_BIT 63
|
|
|
|
|
|
|
|
#ifndef LD_SO_CONF
|
|
|
|
-# define LD_SO_CONF SYSCONFDIR "/ld.so.conf"
|
|
|
|
+# define LD_SO_CONF PREFIX "/etc/ld.so.conf"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Get libc version number. */
|
|
|
|
diff --git a/sysdeps/generic/dl-cache.h b/sysdeps/generic/dl-cache.h
|
|
|
|
index 964d50a4..2224d651 100644
|
|
|
|
--- a/sysdeps/generic/dl-cache.h
|
|
|
|
+++ b/sysdeps/generic/dl-cache.h
|
|
|
|
@@ -35,7 +35,7 @@
|
2012-09-18 18:38:43 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef LD_SO_CACHE
|
|
|
|
-# define LD_SO_CACHE SYSCONFDIR "/ld.so.cache"
|
|
|
|
+# define LD_SO_CACHE PREFIX "/etc/ld.so.cache"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef add_system_dir
|