baresip: infer SYSROOT from cross cpp, same fix as for "re"
authorJo-Philipp Wich <jow@openwrt.org>
Thu, 19 Jan 2012 13:20:05 +0000 (13:20 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Thu, 19 Jan 2012 13:20:05 +0000 (13:20 +0000)
SVN-Revision: 29801

net/baresip/Makefile

index 3ec702bb1b76ac14e4214b089c6d791214bbe5ba..02f6885eef3847e7df8c667a273723c9f24b24c6 100644 (file)
@@ -79,7 +79,7 @@ define Build/Compile
                CC="$(TARGET_CC)" \
                DESTDIR="$(PKG_INSTALL_DIR)" \
                EXTRA_CFLAGS="$(TARGET_CFLAGS) -DOPENWRT" \
-               SYSROOT="$(TOOLCHAIN_DIR)" \
+               SYSROOT="$$$$(echo '#include <pthread.h>' | $(TARGET_CROSS)cpp -x c | sed -ne 's,^# [0-9]* \"\(.*\)/include/pthread\.h\".*,\1,p' | head -n1)" \
                SYSROOT_ALT="$(STAGING_DIR)/usr" \
                RELEASE=1 \
                CROSS_COMPILE="$(TARGET_CROSS)" \