aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2015-07-03 13:49:24 +0000
committerJo-Philipp Wich <jow@openwrt.org>2015-07-03 13:49:24 +0000
commit3ba9a533100d6883043e759d6978db0b75f61bc1 (patch)
tree2af76e02b9fc5feda91681eaa9f7d277f1c9a520
parent698315c238b850dcb58c41d63392059d98472ad3 (diff)
downloadupstream-3ba9a533100d6883043e759d6978db0b75f61bc1.tar.gz
upstream-3ba9a533100d6883043e759d6978db0b75f61bc1.tar.bz2
upstream-3ba9a533100d6883043e759d6978db0b75f61bc1.zip
BB: uclibc++: make g++-uc* wrappers relocatable
The g++-uc wrapper hardcodes $(STAGING_DIR) and $(TOOLCHAIN_DIR) paths which will not work outside of the original build environment. Replace the hardcoded staging_dir occurences with paths relative to the $STAGING_DIR environment variable to make the g++-uc* wrappers usable in an SDK environment. Fixes the libdb47 build failure reported at https://lists.openwrt.org/pipermail/openwrt-devel/2015-April/032455.html Signed-off-by: Jo-Philipp Wich <jow@openwrt.org> Backport of r46162 git-svn-id: svn://svn.openwrt.org/openwrt/branches/barrier_breaker@46164 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--package/libs/uclibc++/Makefile5
1 files changed, 3 insertions, 2 deletions
diff --git a/package/libs/uclibc++/Makefile b/package/libs/uclibc++/Makefile
index 38e8a99f9f..f855cd216f 100644
--- a/package/libs/uclibc++/Makefile
+++ b/package/libs/uclibc++/Makefile
@@ -74,8 +74,9 @@ define Build/InstallDev
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/bin/g++-uc $(TOOLCHAIN_DIR)/bin/
$(CP) $(PKG_INSTALL_DIR)/include/* $(1)/usr/include/uClibc++/
$(CP) $(PKG_INSTALL_DIR)/lib/libuClibc++*.{a,so}* $(1)/usr/lib/
- $(SED) 's|-I/include/|-I$(STAGING_DIR)/usr/include/uClibc++/|g' $(TOOLCHAIN_DIR)/bin/g++-uc
- $(SED) 's|-L/lib/|-L$(STAGING_DIR)/usr/lib/|g' $(TOOLCHAIN_DIR)/bin/g++-uc
+ $(SED) 's!\(^\|[[:space:]]\)-[IL]$(TOOLCHAIN_DIR)/[^[:space:]]*!!g' $(TOOLCHAIN_DIR)/bin/g++-uc
+ $(SED) 's|-I/include/|-I$$$${STAGING_DIR:-$(STAGING_DIR)}/usr/include/uClibc++/|g' $(TOOLCHAIN_DIR)/bin/g++-uc
+ $(SED) 's|-L/lib/|-L$$$${STAGING_DIR:-$(STAGING_DIR)}/lib/|g' $(TOOLCHAIN_DIR)/bin/g++-uc
# add another wrapper which links against both uClibc++ and libstdc++
$(INSTALL_BIN) $(TOOLCHAIN_DIR)/bin/g++-uc $(TOOLCHAIN_DIR)/bin/g++-uc+std
$(SED) 's|^WRAPPER_INCLUDEDIR=.*||g' $(TOOLCHAIN_DIR)/bin/g++-uc+std