Changeset 46163


Ignore:
Timestamp:
2015-07-03T15:38:12+02:00 (3 years ago)
Author:
jow
Message:

CC: 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@…>

Backport of r46162

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/chaos_calmer/package/libs/uclibc++/Makefile

    r44965 r46163  
    7575        $(CP) $(PKG_INSTALL_DIR)/include/* $(1)/usr/include/uClibc++/ 
    7676        $(CP) $(PKG_INSTALL_DIR)/lib/libuClibc++*.{a,so}* $(1)/usr/lib/ 
    77         $(SED) 's|-I/include/|-I$(STAGING_DIR)/usr/include/uClibc++/|g' $(TOOLCHAIN_DIR)/bin/g++-uc 
    78         $(SED) 's|-L/lib/|-L$(STAGING_DIR)/usr/lib/|g' $(TOOLCHAIN_DIR)/bin/g++-uc 
     77        $(SED) 's!\(^\|[[:space:]]\)-[IL]$(TOOLCHAIN_DIR)/[^[:space:]]*!!g' $(TOOLCHAIN_DIR)/bin/g++-uc 
     78        $(SED) 's|-I/include/|-I$$$${STAGING_DIR:-$(STAGING_DIR)}/usr/include/uClibc++/|g' $(TOOLCHAIN_DIR)/bin/g++-uc 
     79        $(SED) 's|-L/lib/|-L$$$${STAGING_DIR:-$(STAGING_DIR)}/lib/|g' $(TOOLCHAIN_DIR)/bin/g++-uc 
    7980# add another wrapper which links against both uClibc++ and libstdc++  
    8081        $(INSTALL_BIN) $(TOOLCHAIN_DIR)/bin/g++-uc $(TOOLCHAIN_DIR)/bin/g++-uc+std 
Note: See TracChangeset for help on using the changeset viewer.