diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2015-07-03 13:33:05 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2015-07-03 13:33:05 +0000 |
commit | 27b9bf44938a16e4a0f2764b0017a480bb473db4 (patch) | |
tree | e0b9eaf2969c58cf4bca3b6c589c2df4feeb5d10 /package/libs/uclibc++ | |
parent | fa401693d986997c9761116d32826dacadad816a (diff) | |
download | mtk-20170518-27b9bf44938a16e4a0f2764b0017a480bb473db4.zip mtk-20170518-27b9bf44938a16e4a0f2764b0017a480bb473db4.tar.gz mtk-20170518-27b9bf44938a16e4a0f2764b0017a480bb473db4.tar.bz2 |
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>
SVN-Revision: 46162
Diffstat (limited to 'package/libs/uclibc++')
-rw-r--r-- | package/libs/uclibc++/Makefile | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/package/libs/uclibc++/Makefile b/package/libs/uclibc++/Makefile index 3e9fd73..bad6d6d 100644 --- a/package/libs/uclibc++/Makefile +++ b/package/libs/uclibc++/Makefile @@ -75,8 +75,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 |