linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: linux-trace-devel@vger.kernel.org
Subject: [PATCH 08/13] trace-cmd: Install libtracecmd in the proper lib directory
Date: Fri, 11 Dec 2020 12:08:50 -0500	[thread overview]
Message-ID: <20201211171014.219970193@goodmis.org> (raw)
In-Reply-To: 20201211170842.611554918@goodmis.org

From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>

Instead of installing libtracecmd library into its own directory under lib/,
where the dynamic linker ld has trouble finding it, use the appropriate lib
path (lib or lib64) to place libtracecmd.*

Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
 Makefile | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 0c5da92b54b6..041bd79b5aec 100644
--- a/Makefile
+++ b/Makefile
@@ -48,6 +48,14 @@ INSTALL = install
 DESTDIR ?=
 DESTDIR_SQ = '$(subst ','\'',$(DESTDIR))'
 
+LP64 := $(shell echo __LP64__ | ${CC} ${CFLAGS} -E -x c - | tail -n 1)
+ifeq ($(LP64), 1)
+  libdir_relative_temp = lib64
+else
+  libdir_relative_temp = lib
+endif
+
+libdir_relative ?= $(libdir_relative_temp)
 prefix ?= /usr/local
 bindir_relative = bin
 bindir = $(prefix)/$(bindir_relative)
@@ -57,7 +65,7 @@ html_install = $(prefix)/share/kernelshark/html
 html_install_SQ = '$(subst ','\'',$(html_install))'
 img_install = $(prefix)/share/kernelshark/html/images
 img_install_SQ = '$(subst ','\'',$(img_install))'
-libdir ?= $(prefix)/lib
+libdir = $(prefix)/$(libdir_relative)
 libdir_SQ = '$(subst ','\'',$(libdir))'
 includedir = $(prefix)/include
 includedir_SQ = '$(subst ','\'',$(includedir))'
@@ -473,7 +481,7 @@ install_tracefs: $(LIBTRACEFS_STATIC_BUILD)
 	$(Q)$(call do_install,$(src)/include/tracefs/tracefs.h,$(includedir_SQ)/tracefs)
 
 install_libs: libs $(INSTALL_TRACEEVENT) $(INSTALL_TRACEFS)
-	$(Q)$(call do_install,$(LIBTRACECMD_SHARED),$(libdir_SQ)/trace-cmd)
+	$(Q)$(call do_install,$(LIBTRACECMD_SHARED),$(libdir_SQ))
 	$(Q)$(call do_install,$(src)/include/trace-cmd/trace-cmd.h,$(includedir_SQ)/trace-cmd)
 
 doc:
-- 
2.29.2



  parent reply	other threads:[~2020-12-11 18:59 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-11 17:08 [PATCH 00/13] trace-cmd: Clean ups to the Makefile for using external libraries Steven Rostedt
2020-12-11 17:08 ` [PATCH 01/13] trace-cmd: Add missing SPDX headers Steven Rostedt
2020-12-11 17:08 ` [PATCH 02/13] trace-cmd: Allow overriding of pkg-config Steven Rostedt
2020-12-11 17:08 ` [PATCH 03/13] trace-cmd: Use $(LIBTRACECMD_STATIC) instead of open coding in Makefile Steven Rostedt
2020-12-11 17:08 ` [PATCH 04/13] trace-cmd: Add versioning to libtracecmd.so Steven Rostedt
2020-12-11 17:08 ` [PATCH 05/13] trace-cmd: Add pkg-config configuration for libtracecmd.so Steven Rostedt
2020-12-11 17:08 ` [PATCH 06/13] trace-cmd: Clean up the Makefiles a little Steven Rostedt
2020-12-11 17:08 ` [PATCH 07/13] trace-cmd: Remove making of ld.so.conf.d/trace.conf Steven Rostedt
2020-12-11 17:08 ` Steven Rostedt [this message]
2020-12-11 17:08 ` [PATCH 09/13] trace-cmd: Move the installing of libtracecmd to the lib/trace-cmd Makefile Steven Rostedt
2020-12-11 17:08 ` [PATCH 10/13] trace-cmd: Install the soft links for libtracecmd.so Steven Rostedt
2020-12-11 17:08 ` [PATCH 11/13] trace-cmd: Do not install libtracefs nor libtraceevent libraries Steven Rostedt
2020-12-11 17:08 ` [PATCH 12/13] trace-cmd: Do not build shared libraries for libtracefs and libtraceevent Steven Rostedt
2020-12-11 17:08 ` [PATCH 13/13] trace-cmd: Add warning if libtracefs or libtraceevent are not found Steven Rostedt

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=20201211171014.219970193@goodmis.org \
    --to=rostedt@goodmis.org \
    --cc=linux-trace-devel@vger.kernel.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 NNTP newsgroup(s).