public inbox for libc-stable@sourceware.org
 help / color / mirror / Atom feed
From: DJ Delorie <dj@redhat.com>
To: libc-stable@sourceware.org
Subject: [2.29 COMMITTED] support: Export bindir path on support_path
Date: Tue, 01 Jan 2019 00:00:00 -0000	[thread overview]
Message-ID: <xnd0ececb2.fsf@greed.delorie.com> (raw)


From: Adhemerval Zanella <adhemerval.zanella@linaro.org>

Checked on x86_64-linux-gnu.

	* support/Makefile (CFLAGS-support_paths.c): Add -DBINDIR_PATH.
	* support/support.h (support_bindir_prefix): New variable.
	* support/support_paths.c [BINDIR_PATH] (support_bindir_prefix):

Reviewed-by: DJ Delorie <dj@redhat.com>
(cherry picked from commit c7ac9caaae6f8d02d4e0c7618d4991324a084c66)

diff --git a/ChangeLog b/ChangeLog
index 86eedc7416..582ba45c79 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2019-05-14  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
+
+	* support/Makefile (CFLAGS-support_paths.c): Add -DBINDIR_PATH.
+	* support/support.h (support_bindir_prefix): New variable.
+	* support/support_paths.c [BINDIR_PATH] (support_bindir_prefix):
+
+	* config.make.in (bindir): New variable.
+
 2019-07-01  H.J. Lu  <hongjiu.lu@intel.com>
 
 	[BZ #24259]
diff --git a/support/Makefile b/support/Makefile
index 8d61de6c57..5542de3fa1 100644
--- a/support/Makefile
+++ b/support/Makefile
@@ -172,7 +172,8 @@ CFLAGS-support_paths.c = \
 		-DOBJDIR_PATH=\"`cd $(objpfx)/..; pwd`\" \
 		-DOBJDIR_ELF_LDSO_PATH=\"`cd $(objpfx)/..; pwd`/elf/$(rtld-installed-name)\" \
 		-DINSTDIR_PATH=\"$(prefix)\" \
-		-DLIBDIR_PATH=\"$(libdir)\"
+		-DLIBDIR_PATH=\"$(libdir)\" \
+		-DBINDIR_PATH=\"$(bindir)\"
 
 ifeq (,$(CXX))
 LINKS_DSO_PROGRAM = links-dso-program-c
diff --git a/support/support.h b/support/support.h
index 119495e5a9..1a45ecbb14 100644
--- a/support/support.h
+++ b/support/support.h
@@ -104,6 +104,8 @@ extern const char support_objdir_elf_ldso[];
 extern const char support_install_prefix[];
 /* Corresponds to the install's lib/ or lib64/ directory.  */
 extern const char support_libdir_prefix[];
+/* Corresponds to the install's bin/ directory.  */
+extern const char support_bindir_prefix[];
 
 extern ssize_t support_copy_file_range (int, off64_t *, int, off64_t *,
 					size_t, unsigned int);
diff --git a/support/support_paths.c b/support/support_paths.c
index 937e6e1012..75634aab9a 100644
--- a/support/support_paths.c
+++ b/support/support_paths.c
@@ -57,3 +57,10 @@ const char support_libdir_prefix[] = LIBDIR_PATH;
 #else
 # error please -DLIBDIR_PATH=something in the Makefile
 #endif
+
+#ifdef BINDIR_PATH
+/* Corresponds to the install's bin/ directory.  */
+const char support_bindir_prefix[] = BINDIR_PATH;
+#else
+# error please -DBINDIR_PATH=something in the Makefile
+#endif

                 reply	other threads:[~2019-10-31 23:16 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xnd0ececb2.fsf@greed.delorie.com \
    --to=dj@redhat.com \
    --cc=libc-stable@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).