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: 164040 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp1580533ili; Mon, 13 May 2019 10:00:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqzlnXWbS9xlHagUu3v5bqVp8d/XO4gq5QqkRITkPganrWlGVNn1fLgvP5IkBPOZ7rhuIW69 X-Received: by 2002:a63:8dc9:: with SMTP id z192mr32088187pgd.6.1557766824109; Mon, 13 May 2019 10:00:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557766824; cv=none; d=google.com; s=arc-20160816; b=GEI7UJLErtx9Em3V7Lyi6IQdJxaze8LYbLY10N8mwEwk0S6lUyJppUzITrIrHdU0Ik 77t3qADaaooczUyjX/SqfFaarEhr3pPteMy+IxtMbAhtbVITPQgeh+zQjBpFwDuGAgNr PLVicISuIVyLpuH75brOSJ+NYjbNsIeufjbrfF/ePMEjlxLotgxwpKGU7kA9nGR/sBhe VnXqPrG+fJJ3ftyuQ8lF9lzTk32eWL3CtKqcQ6Njb0oqLafDCEBI/LJyhc2y7DSAA7wt +8qm+HUMaNTPxJRTEnh9vERwArtT5l6hvANI+VVp/7VG3zXop36IAaF1EOb9In2n/b9d k9kw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:delivered-to:sender:list-help:list-post:list-archive :list-subscribe:list-unsubscribe:list-id:precedence:mailing-list :dkim-signature:domainkey-signature; bh=5iLP8DsMf82r/N+1r2UMIJuS+uNpF92U7mg974ivwUg=; b=O5Z84/0aflRhECkE0GJUhmBR5eMkGXCyQ1f1Ac4pdB0ASQ+Xapg1Hd3T5pgG6dPZ7j bEvssi2DmFITcccwy3eLpr950OB72XGzrZO4ZI6NDuGhzhi0Wfl0VaChrJvaV0W+EkoY TGZsFaM3oX8DwsUQrq/PS8WxTWodKBOVnNZZlRvuNjnw/Yh0rD4K547BZ7QsLAzqe2Ti +yOTNyRdMGaIKdKsBYan1gZT4TqhqJeObCw+qQ3v9tQjDQqb1BnkoqUCva4DLh1U0qTw IlS8h/7fo3RxmsIh7/OFeMOq7jGjSDzalg8YSsJr8LPKDT1JYcuX19qwjGpLPVfYw0Lg a4aw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=LKzv0dbN; dkim=pass header.i=@linaro.org header.s=google header.b=uecL1jxj; spf=pass (google.com: domain of libc-alpha-return-101957-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="libc-alpha-return-101957-patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id q23si17744579pfh.28.2019.05.13.10.00.23 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 13 May 2019 10:00:24 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-return-101957-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=LKzv0dbN; dkim=pass header.i=@linaro.org header.s=google header.b=uecL1jxj; spf=pass (google.com: domain of libc-alpha-return-101957-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="libc-alpha-return-101957-patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id:in-reply-to :references; q=dns; s=default; b=VHuuGH7HG9yPr9gSLV8S24VFgunSUvS POerHQ5zfk9iwrCwBkxhlw1nmvRk3eSWWyUjW/RsfiJClBuaYTjqG27W/uzckg1T Qy32s/Om3895Ik6CwKRE8aDHwDMqJUUqQKiCH4+6w7sw5WkoYaIModvEKWfpyfQp pE2SBzhKd/ZY= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id:in-reply-to :references; s=default; bh=BAgUF1bn1AgHu4uvdep7NU/x9oQ=; b=LKzv0 dbNIYLvChiQTL1BI+zbLVbX2w42DWZkq70TDybQYagSVIfho6PRaWpmwqFZF28DH R6JHd0ZDy0ELBMnNVod98YNzvrbnmfxQtrzuqJC9CKF8UoBPBC029nRScNsqOx+y yBjvWViMd/NcPAbhcuWU9SDoDtsSa5Vw89kfzw= 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(-) -- 2.17.1 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