aboutsummaryrefslogtreecommitdiff
path: root/package/Makefile.in
diff options
context:
space:
mode:
authorGravatar Peter Korsgaard <jacmet@sunsite.dk>2010-05-08 00:09:11 +0200
committerGravatar Peter Korsgaard <jacmet@sunsite.dk>2010-05-08 00:09:11 +0200
commit0d6068ae017afc2474b37533ea80a5deebef8415 (patch)
treef992dcd71c86aa5f2b98df18532879b7ff013e9f /package/Makefile.in
parent84278848f433876d05a5318fea77a3b361173329 (diff)
parent803967499fb362d2fe394647d4a4a59932f6a708 (diff)
downloadbuildroot-0d6068ae017afc2474b37533ea80a5deebef8415.tar.gz
buildroot-0d6068ae017afc2474b37533ea80a5deebef8415.tar.bz2
Merge branch 'misc-fixes2' of git://git.busybox.net/~tpetazzoni/git/buildroot
Diffstat (limited to 'package/Makefile.in')
-rw-r--r--package/Makefile.in6
1 files changed, 6 insertions, 0 deletions
diff --git a/package/Makefile.in b/package/Makefile.in
index cd492f1fd5..7ac429c81e 100644
--- a/package/Makefile.in
+++ b/package/Makefile.in
@@ -77,6 +77,11 @@ ifeq ($(BR2_LARGEFILE),y)
TARGET_CFLAGS+=-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
endif
+# Host packages are sometimes linked against host libraries installed
+# in $(HOST_DIR)/usr/lib. As we cannot add $(HOST_DIR)/usr/lib to
+# LD_LIBRARY_PATH when building target packages because it causes
+# libtool breakage, we force a rpath to be added to host binaries.
+HOST_CFLAGS+=-Wl,-rpath -Wl,$(HOST_DIR)/usr/lib
#########################################################################
ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y)
@@ -93,6 +98,7 @@ else ifeq ($(BR2_TOOLCHAIN_EXTERNAL),y)
TARGET_CFLAGS+=--sysroot $(STAGING_DIR)/
TARGET_CXXFLAGS=$(TARGET_CFLAGS)
TARGET_LDFLAGS=--sysroot $(STAGING_DIR)/
+TARGET_LDFLAGS+=-L$(STAGING_DIR)/lib -L$(STAGING_DIR)/usr/lib
endif
#########################################################################