d8307d
commit d50f09181eca10a91fd9035bb90711b265770dc9
d8307d
Author: Alexandra Hájková <ahajkova@redhat.com>
d8307d
Date:   Mon May 13 19:31:53 2019 +0200
d8307d
d8307d
    support: Add support_install_rootsbindir
d8307d
    
d8307d
    Reviewed by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
d8307d
d8307d
diff --git a/support/Makefile b/support/Makefile
d8307d
index fe416cd..18d39f5 100644
d8307d
--- a/support/Makefile
d8307d
+++ b/support/Makefile
d8307d
@@ -180,7 +180,8 @@ CFLAGS-support_paths.c = \
d8307d
 		-DOBJDIR_ELF_LDSO_PATH=\"`cd $(objpfx)/..; pwd`/elf/$(rtld-installed-name)\" \
d8307d
 		-DINSTDIR_PATH=\"$(prefix)\" \
d8307d
 		-DLIBDIR_PATH=\"$(libdir)\" \
d8307d
-		-DBINDIR_PATH=\"$(bindir)\"
d8307d
+		-DBINDIR_PATH=\"$(bindir)\" \
d8307d
+		-DROOTSBINDIR_PATH=\"$(rootsbindir)\"
d8307d
 
d8307d
 ifeq (,$(CXX))
d8307d
 LINKS_DSO_PROGRAM = links-dso-program-c
d8307d
diff --git a/support/support.h b/support/support.h
d8307d
index b162491..13076b7 100644
d8307d
--- a/support/support.h
d8307d
+++ b/support/support.h
d8307d
@@ -107,6 +107,8 @@ extern const char support_install_prefix[];
d8307d
 extern const char support_libdir_prefix[];
d8307d
 /* Corresponds to the install's bin/ directory.  */
d8307d
 extern const char support_bindir_prefix[];
d8307d
+/* Corresponds to the install's sbin/ directory.  */
d8307d
+extern const char support_install_rootsbindir[];
d8307d
 
d8307d
 extern ssize_t support_copy_file_range (int, off64_t *, int, off64_t *,
d8307d
 					size_t, unsigned int);
d8307d
diff --git a/support/support_paths.c b/support/support_paths.c
d8307d
index 75634aa..1fe3283 100644
d8307d
--- a/support/support_paths.c
d8307d
+++ b/support/support_paths.c
d8307d
@@ -64,3 +64,10 @@ const char support_bindir_prefix[] = BINDIR_PATH;
d8307d
 #else
d8307d
 # error please -DBINDIR_PATH=something in the Makefile
d8307d
 #endif
d8307d
+
d8307d
+#ifdef ROOTSBINDIR_PATH
d8307d
+/* Corresponds to the install's sbin/ directory.  */
d8307d
+const char support_install_rootsbindir[] = ROOTSBINDIR_PATH;
d8307d
+#else
d8307d
+# error please -DROOTSBINDIR_PATH=something in the Makefile
d8307d
+#endif