]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
support: Add support_hardcoded_paths_in_test
authorFlorian Weimer <fweimer@redhat.com>
Sat, 24 Jan 2026 09:29:22 +0000 (10:29 +0100)
committerFlorian Weimer <fweimer@redhat.com>
Sat, 24 Jan 2026 09:29:22 +0000 (10:29 +0100)
It indicates whether glibc was configured with
--enable-hardcoded-path-in-tests.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
support/Makefile
support/support.h
support/support_paths.c

index 6cef390d5caddb72546911913a298a884d8bc7e2..3a948c7f7e0ad0b25ffefa0ae8b33e5a637d76fd 100644 (file)
@@ -253,6 +253,12 @@ CFLAGS-support_paths.c = \
                -DCOMPLOCALEDIR_PATH=\"$(complocaledir)\" \
                -DSYSCONFDIR_PATH=\"$(sysconfdir)\"
 
+ifeq ($(build-hardcoded-path-in-tests),yes)
+CFLAGS-support_paths.c += -DHARDCODED_PATHS_IN_TEST=true
+else
+CFLAGS-support_paths.c += -DHARDCODED_PATHS_IN_TEST=false
+endif
+
 # Build with exception handling and asynchronous unwind table support.
 CFLAGS-.oS += -fexceptions -fasynchronous-unwind-tables
 
index 40a2bf878b267671ecc984ee08919db925520686..3060ff8941d0adce08972102a89919b1a0df7f44 100644 (file)
@@ -147,6 +147,9 @@ extern const char support_complocaledir_prefix[];
 /* Corresponds to the install's etc/ directory.  */
 extern const char support_sysconfdir_prefix[];
 
+/* If true, glibc was configured with --enable-hardcoded-path-in-tests.  */
+extern const bool support_hardcoded_paths_in_test;
+
 /* Copies the file at the path FROM to TO.  If TO does not exist, it
    is created.  If TO is a regular file, it is truncated before
    copying.  The file mode is copied, but the permissions are not.  */
index fe4e7034f1bd9a09dc7f5c7dbb624a6937634000..30df0c750cdae5b7c0d6d947b0caacfa6c5d6b57 100644 (file)
@@ -99,3 +99,5 @@ const char support_sysconfdir_prefix[] = SYSCONFDIR_PATH;
 #else
 # error please -DSYSCONFDIR_PATH=something in the Makefile
 #endif
+
+const bool support_hardcoded_paths_in_test = HARDCODED_PATHS_IN_TEST;