infer SYSROOT from the cross cpp's idea of pthread.h location Until now, SYSROOT was always assumed to be $(TOOLCHAIN_DIR), but neither backfire nor external toolchains put their core headers into $(TOOLCHAIN_DIR)/include, therfore feature detection failed badly.
This commit is contained in:
parent
26bd66f7b3
commit
2de303bcd7
2 changed files with 1 additions and 11 deletions
|
@ -35,7 +35,7 @@ define Build/Compile
|
||||||
EXTRA_CFLAGS="$(TARGET_CFLAGS) -DOPENWRT" \
|
EXTRA_CFLAGS="$(TARGET_CFLAGS) -DOPENWRT" \
|
||||||
EXTRA_LFLAGS="-lm" \
|
EXTRA_LFLAGS="-lm" \
|
||||||
DESTDIR="$(PKG_INSTALL_DIR)" \
|
DESTDIR="$(PKG_INSTALL_DIR)" \
|
||||||
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" \
|
SYSROOT_ALT="$(STAGING_DIR)/usr" \
|
||||||
RELEASE=1 \
|
RELEASE=1 \
|
||||||
CROSS_COMPILE="$(TARGET_CROSS)" \
|
CROSS_COMPILE="$(TARGET_CROSS)" \
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
--- a/include/re_types.h
|
|
||||||
+++ b/include/re_types.h
|
|
||||||
@@ -5,6 +5,7 @@
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <sys/types.h>
|
|
||||||
+#include <stdint.h>
|
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
|
||||||
#include <stdlib.h>
|
|
Loading…
Reference in a new issue