[packages] re, rem, baresip, restund: use another approach to find the "sysroot"...
authorJo-Philipp Wich <jow@openwrt.org>
Mon, 6 Feb 2012 10:21:49 +0000 (10:21 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Mon, 6 Feb 2012 10:21:49 +0000 (10:21 +0000)
SVN-Revision: 30325

libs/re/Makefile
libs/rem/Makefile
net/baresip/Makefile
net/restund/Makefile

index e6f9ed4ce51add3d1c770a4e4ecb8e201d0c9c7b..86d3088744f61987351343f751e388f746fae5ab 100644 (file)
@@ -35,7 +35,7 @@ define Build/Compile
                EXTRA_CFLAGS="$(TARGET_CFLAGS) -DOPENWRT" \
                EXTRA_LFLAGS="-lm" \
                DESTDIR="$(PKG_INSTALL_DIR)" \
-               SYSROOT="$$$$(echo '#include <pthread.h>' | $(TARGET_CROSS)cpp -x c | sed -ne 's,^# [0-9]* \"\(.*\)/include/pthread\.h\".*,\1,p' | head -n1)" \
+               SYSROOT="$$$$($(FIND) $(TOOLCHAIN_DIR) -path '*/include/pthread.h' | sed -ne '1s#/include/pthread.h##p')" \
                SYSROOT_ALT="$(STAGING_DIR)/usr" \
                RELEASE=1 \
                CROSS_COMPILE="$(TARGET_CROSS)" \
index fc2d9c0a5335f50ecac9229a129b1c9118101dcb..c145912b1b0e4575cccf7556a38b4db2ef2b82d2 100644 (file)
@@ -37,7 +37,7 @@ define Build/Compile
                EXTRA_CFLAGS="$(TARGET_CFLAGS) -DOPENWRT" \
                EXTRA_LFLAGS="-lm" \
                DESTDIR="$(PKG_INSTALL_DIR)" \
-               SYSROOT="$(TOOLCHAIN_DIR)" \
+               SYSROOT="$$$$($(FIND) $(TOOLCHAIN_DIR) -path '*/include/pthread.h' | sed -ne '1s#/include/pthread.h##p')" \
                SYSROOT_ALT="$(STAGING_DIR)/usr" \
                RELEASE=1 \
                CROSS_COMPILE="$(TARGET_CROSS)" \
index 02f6885eef3847e7df8c667a273723c9f24b24c6..d3ec1c61a01bfd6f9fc9d5494c6da6b5ea003e14 100644 (file)
@@ -79,7 +79,7 @@ define Build/Compile
                CC="$(TARGET_CC)" \
                DESTDIR="$(PKG_INSTALL_DIR)" \
                EXTRA_CFLAGS="$(TARGET_CFLAGS) -DOPENWRT" \
-               SYSROOT="$$$$(echo '#include <pthread.h>' | $(TARGET_CROSS)cpp -x c | sed -ne 's,^# [0-9]* \"\(.*\)/include/pthread\.h\".*,\1,p' | head -n1)" \
+               SYSROOT="$$$$($(FIND) $(TOOLCHAIN_DIR) -path '*/include/pthread.h' | sed -ne '1s#/include/pthread.h##p')" \
                SYSROOT_ALT="$(STAGING_DIR)/usr" \
                RELEASE=1 \
                CROSS_COMPILE="$(TARGET_CROSS)" \
index 551eac0ff36cc77fab6bd5ba9bd47706bdfc5486..0f343ecce6d3b513d49485dfef5f858a833ae96e 100644 (file)
@@ -51,7 +51,7 @@ define Build/Compile
                CC="$(TARGET_CC)" \
                EXTRA_CFLAGS="$(TARGET_CFLAGS)" \
                DESTDIR="$(PKG_INSTALL_DIR)" \
-               SYSROOT="$$$$(echo '#include <pthread.h>' | $(TARGET_CROSS)cpp -x c | sed -ne 's,^# [0-9]* \"\(.*\)/include/pthread\.h\".*,\1,p' | head -n1)" \
+               SYSROOT="$$$$($(FIND) $(TOOLCHAIN_DIR) -path '*/include/pthread.h' | sed -ne '1s#/include/pthread.h##p')" \
                SYSROOT_ALT="$(STAGING_DIR)/usr" \
                RELEASE=1 \
                CROSS_COMPILE="$(TARGET_CROSS)" \