From patchwork Mon May 13 16:59:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 32662 Received: (qmail 8070 invoked by alias); 13 May 2019 17:00:01 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 8002 invoked by uid 89); 13 May 2019 17:00:00 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-20.5 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy=1798, HX-Languages-Length:1939 X-HELO: mail-ua1-f41.google.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=5iLP8DsMf82r/N+1r2UMIJuS+uNpF92U7mg974ivwUg=; b=uecL1jxjpmeehvgeKhY7asETQUUDGVbO9tVeUDJrL2mal4/yGFOHjCaHYpykEEtjiP d5JnAFuQyfhB5elSk7AkQvPxS1+CHIHZHMe/SOJhIcrtKxRw9QBsTt6ak02dtfnXs2vv G+aQwFFWfKGp3knP/0z8GnQjlS0Dw8s6/vWHjLivJyiFGwjY5rLD3171HZDx+bnBWXGY UOk2LGnYIZmDL9o29CRoLdb3p/NsAwqigJxLqbThS1yGAQQLBV9kB4pcu2DS4j3mNam7 i1NNUjcAcr54EuWQgB4gAYSII6uHUeCUiLHI8GzycXogSEtxzAuC5ULwYcU5O7cxt68D 5l+g== Return-Path: From: Adhemerval Zanella To: libc-alpha@sourceware.org Cc: Carlos O'Donell Subject: [PATCH 2/3] support: Export bindir path on support_path Date: Mon, 13 May 2019 13:59:51 -0300 Message-Id: <20190513165952.28972-2-adhemerval.zanella@linaro.org> In-Reply-To: <20190513165952.28972-1-adhemerval.zanella@linaro.org> References: <20190513165952.28972-1-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): --- support/Makefile | 3 ++- support/support.h | 2 ++ support/support_paths.c | 7 +++++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/support/Makefile b/support/Makefile index 64044f6f5c..fe416cdc5f 100644 --- a/support/Makefile +++ b/support/Makefile @@ -179,7 +179,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 97fef2cd23..b162491be6 100644 --- a/support/support.h +++ b/support/support.h @@ -105,6 +105,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