mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Bernhard Walle <bernhard@bwalle.de>
To: ptxdist@pengutronix.de
Subject: [ptxdist] [PATCH] Fix usage of fakeroot on Darwin
Date: Mon, 16 Jan 2012 21:30:25 +0100	[thread overview]
Message-ID: <1326745825-61103-1-git-send-email-bernhard@bwalle.de> (raw)

The extension of shared libraries on Darwin is .dylib, not .so. While
the fakeroot script itself (which is part of the fakeroot distribution)
can handle Darwin, ptxdist calls 'fakeroot' with the '-l' parameter and
directly provides the full path to the shared library which is
pre-loaded.

This patch adds a simple check, explicitly checking for Darwin in the
'uname -s' output. Verified to fix the build on Mac OS 10.7 (Lion).

Signed-off-by: Bernhard Walle <bernhard@bwalle.de>
---
 rules/pre/Rules.make |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/rules/pre/Rules.make b/rules/pre/Rules.make
index c531a50..32c198b 100644
--- a/rules/pre/Rules.make
+++ b/rules/pre/Rules.make
@@ -13,7 +13,14 @@ GNU_BUILD	:= $(shell $(SCRIPTSDIR)/autoconf/config.guess)
 GNU_HOST	:= $(shell echo $(GNU_BUILD) | sed s/-[a-zA-Z0-9_]*-/-host-/)
 
 INSTALL		:= install
-FAKEROOT	:= $(PTXDIST_SYSROOT_HOST)/bin/fakeroot -l $(PTXDIST_SYSROOT_HOST)/lib/libfakeroot.so
+
+ifeq ($(shell uname -s),Darwin)
+SHLIB_SUFFIX	:= dylib
+else
+SHLIB_SUFFIX	:= so
+endif
+
+FAKEROOT	:= $(PTXDIST_SYSROOT_HOST)/bin/fakeroot -l $(PTXDIST_SYSROOT_HOST)/lib/libfakeroot.$(SHLIB_SUFFIX)
 
 CHECK_PIPE_STATUS := \
 	for i in  "$${PIPESTATUS[@]}"; do [ $$i -gt 0 ] && {			\
-- 
1.7.7.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de

             reply	other threads:[~2012-01-16 20:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-16 20:30 Bernhard Walle [this message]
2012-01-19 19:55 ` Michael Olbrich
2012-01-19 21:16   ` Bernhard Walle
2012-01-19 21:18     ` Bernhard Walle
2012-01-19 21:24     ` Michael Olbrich

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=1326745825-61103-1-git-send-email-bernhard@bwalle.de \
    --to=bernhard@bwalle.de \
    --cc=ptxdist@pengutronix.de \
    /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