From: Bernhard Walle <bernhard@bwalle.de>
To: ptxdist@pengutronix.de
Subject: [ptxdist] [PATCH 2/4] rules/pre/Rules.make: Add DYLD_FALLBACK_LIBRARY_PATH for Darwin
Date: Mon, 7 May 2012 22:03:33 +0200 [thread overview]
Message-ID: <1336421015-1614-3-git-send-email-bernhard@bwalle.de> (raw)
In-Reply-To: <1336421015-1614-1-git-send-email-bernhard@bwalle.de>
On Darwin (with Mach-O), rpath works different compared to ELF systems.
It's not only sufficient to add -rpath to the linker (ld(1)) when
compiling an application that requires a library (.dylib), but it's also
necessary to add '@rpath' to the so-called "install path" when compiling
a library.
When compiling host-glib, the compiled programs are linked against
libintl from the ptxdist sysroot-host. The compiled programs cannot be
executed in that case. Setting DYLD_FALLBACK_LIBRARY_PATH fixed the
problem. This environment variable is something like LD_LIBRARY_PATH on
Linux.
Signed-off-by: Bernhard Walle <bernhard@bwalle.de>
---
rules/pre/Rules.make | 7 ++++++-
1 Datei geändert, 6 Zeilen hinzugefügt(+), 1 Zeile entfernt(-)
diff --git a/rules/pre/Rules.make b/rules/pre/Rules.make
index 1d09a18..522c90e 100644
--- a/rules/pre/Rules.make
+++ b/rules/pre/Rules.make
@@ -321,6 +321,10 @@ HOST_ENV_CXX := CXX="$(HOSTCXX)"
HOST_ENV_CPPFLAGS := CPPFLAGS="$(HOST_CPPFLAGS)"
HOST_ENV_LDFLAGS := LDFLAGS="$(HOST_LDFLAGS)"
+ifeq ($(shell uname -s),Darwin)
+HOST_ENV_LIBRARY_PATH := DYLD_FALLBACK_LIBRARY_PATH=$(PTXDIST_SYSROOT_HOST)/lib
+endif
+
HOST_ENV_PKG_CONFIG := \
PKG_CONFIG_PATH="" \
PKG_CONFIG_LIBDIR="$(PTXDIST_SYSROOT_HOST)/lib/pkgconfig:$(PTXDIST_SYSROOT_HOST)/share/pkgconfig"
@@ -335,7 +339,8 @@ HOST_ENV := \
$(HOST_ENV_CPPFLAGS) \
$(HOST_ENV_LDFLAGS) \
$(HOST_ENV_PKG_CONFIG) \
- $(HOST_ENV_PYTHONPATH)
+ $(HOST_ENV_PYTHONPATH) \
+ $(HOST_ENV_LIBRARY_PATH)
HOST_AUTOCONF := --prefix=
--
1.7.10.1
--
ptxdist mailing list
ptxdist@pengutronix.de
next prev parent reply other threads:[~2012-05-07 20:04 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-07 20:03 [ptxdist] Some more Mac OS fixes Bernhard Walle
2012-05-07 20:03 ` [ptxdist] [PATCH 1/4] host-gettext: Add host-iconv dependency Bernhard Walle
2012-05-07 20:03 ` Bernhard Walle [this message]
2012-05-07 20:03 ` [ptxdist] [PATCH 3/4] host-glib: Add host-gettext dependency Bernhard Walle
2012-05-30 7:19 ` Michael Olbrich
2012-06-10 9:30 ` [ptxdist] [PATCH 1/3] host-gettext: Fix build on Darwin Bernhard Walle
2012-06-10 9:30 ` [ptxdist] [PATCH 2/3] Add host-gettext-dummy package Bernhard Walle
2012-06-10 9:30 ` [ptxdist] [PATCH 3/3] host-glib: Add host-gettext dependency Bernhard Walle
2012-06-13 22:50 ` Michael Olbrich
2012-06-13 22:50 ` [ptxdist] [PATCH 1/3] host-gettext: Fix build on Darwin Michael Olbrich
2012-05-07 20:03 ` [ptxdist] [PATCH 4/4] " Bernhard Walle
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=1336421015-1614-3-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