From c90908e7b007a294cf227f2843205f605948c015 Mon Sep 17 00:00:00 2001 From: jow Date: Mon, 6 Feb 2012 10:21:49 +0000 Subject: [PATCH] [packages] re, rem, baresip, restund: use another approach to find the "sysroot", the current way still fails on Backfire - sigh git-svn-id: svn://svn.openwrt.org/openwrt/packages@30325 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- libs/re/Makefile | 2 +- libs/rem/Makefile | 2 +- net/baresip/Makefile | 2 +- net/restund/Makefile | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libs/re/Makefile b/libs/re/Makefile index e6f9ed4ce..86d308874 100644 --- a/libs/re/Makefile +++ b/libs/re/Makefile @@ -35,7 +35,7 @@ define Build/Compile EXTRA_CFLAGS="$(TARGET_CFLAGS) -DOPENWRT" \ EXTRA_LFLAGS="-lm" \ DESTDIR="$(PKG_INSTALL_DIR)" \ - SYSROOT="$$$$(echo '#include ' | $(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)" \ diff --git a/libs/rem/Makefile b/libs/rem/Makefile index fc2d9c0a5..c145912b1 100644 --- a/libs/rem/Makefile +++ b/libs/rem/Makefile @@ -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)" \ diff --git a/net/baresip/Makefile b/net/baresip/Makefile index 02f6885ee..d3ec1c61a 100644 --- a/net/baresip/Makefile +++ b/net/baresip/Makefile @@ -79,7 +79,7 @@ define Build/Compile CC="$(TARGET_CC)" \ DESTDIR="$(PKG_INSTALL_DIR)" \ EXTRA_CFLAGS="$(TARGET_CFLAGS) -DOPENWRT" \ - SYSROOT="$$$$(echo '#include ' | $(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)" \ diff --git a/net/restund/Makefile b/net/restund/Makefile index 551eac0ff..0f343ecce 100644 --- a/net/restund/Makefile +++ b/net/restund/Makefile @@ -51,7 +51,7 @@ define Build/Compile CC="$(TARGET_CC)" \ EXTRA_CFLAGS="$(TARGET_CFLAGS)" \ DESTDIR="$(PKG_INSTALL_DIR)" \ - SYSROOT="$$$$(echo '#include ' | $(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)" \