@@ -44,6 +44,8 @@ store_path() {
44
44
NATIVE_GCC=" $( store_path gcc-toolchain) "
45
45
export LIBRARY_PATH=" ${NATIVE_GCC} /lib:${NATIVE_GCC} /lib64"
46
46
export CPATH=" ${NATIVE_GCC} /include"
47
+ unset C_INCLUDE_PATH
48
+ unset CPLUS_INCLUDE_PATH
47
49
case " $HOST " in
48
50
* darwin* )
49
51
# When targeting darwin, some native tools built by depends require
@@ -66,7 +68,8 @@ case "$HOST" in
66
68
# Determine output paths to use in CROSS_* environment variables
67
69
CROSS_GLIBC=" $( store_path " mingw-w64-x86_64-winpthreads" ) "
68
70
CROSS_GCC=" $( store_path " gcc-cross-${HOST} " ) "
69
- CROSS_GCC_LIBS=( " ${CROSS_GCC} /lib/gcc/${HOST} " /* ) # This expands to an array of directories...
71
+ CROSS_GCC_LIB_STORE=" $( store_path " gcc-cross-${HOST} " lib) "
72
+ CROSS_GCC_LIBS=( " ${CROSS_GCC_LIB_STORE} /lib/gcc/${HOST} " /* ) # This expands to an array of directories...
70
73
CROSS_GCC_LIB=" ${CROSS_GCC_LIBS[0]} " # ...we just want the first one (there should only be one)
71
74
72
75
# The search path ordering is generally:
@@ -75,7 +78,7 @@ case "$HOST" in
75
78
# 2. kernel-header-related search paths (not applicable to mingw-w64 hosts)
76
79
export CROSS_C_INCLUDE_PATH=" ${CROSS_GCC_LIB} /include:${CROSS_GCC_LIB} /include-fixed:${CROSS_GLIBC} /include"
77
80
export CROSS_CPLUS_INCLUDE_PATH=" ${CROSS_GCC} /include/c++:${CROSS_GCC} /include/c++/${HOST} :${CROSS_GCC} /include/c++/backward:${CROSS_C_INCLUDE_PATH} "
78
- export CROSS_LIBRARY_PATH=" ${CROSS_GCC } /lib:${CROSS_GCC} /${HOST} /lib:${CROSS_GCC_LIB} :${CROSS_GLIBC} /lib"
81
+ export CROSS_LIBRARY_PATH=" ${CROSS_GCC_LIB_STORE } /lib:${CROSS_GCC} /${HOST} /lib:${CROSS_GCC_LIB} :${CROSS_GLIBC} /lib"
79
82
;;
80
83
* darwin* )
81
84
# The CROSS toolchain for darwin uses the SDK and ignores environment variables.
@@ -86,12 +89,13 @@ case "$HOST" in
86
89
CROSS_GLIBC_STATIC=" $( store_path " glibc-cross-${HOST} " static) "
87
90
CROSS_KERNEL=" $( store_path " linux-libre-headers-cross-${HOST} " ) "
88
91
CROSS_GCC=" $( store_path " gcc-cross-${HOST} " ) "
89
- CROSS_GCC_LIBS=( " ${CROSS_GCC} /lib/gcc/${HOST} " /* ) # This expands to an array of directories...
92
+ CROSS_GCC_LIB_STORE=" $( store_path " gcc-cross-${HOST} " lib) "
93
+ CROSS_GCC_LIBS=( " ${CROSS_GCC_LIB_STORE} /lib/gcc/${HOST} " /* ) # This expands to an array of directories...
90
94
CROSS_GCC_LIB=" ${CROSS_GCC_LIBS[0]} " # ...we just want the first one (there should only be one)
91
95
92
96
export CROSS_C_INCLUDE_PATH=" ${CROSS_GCC_LIB} /include:${CROSS_GCC_LIB} /include-fixed:${CROSS_GLIBC} /include:${CROSS_KERNEL} /include"
93
97
export CROSS_CPLUS_INCLUDE_PATH=" ${CROSS_GCC} /include/c++:${CROSS_GCC} /include/c++/${HOST} :${CROSS_GCC} /include/c++/backward:${CROSS_C_INCLUDE_PATH} "
94
- export CROSS_LIBRARY_PATH=" ${CROSS_GCC } /lib:${CROSS_GCC} /${HOST} /lib:${CROSS_GCC_LIB} :${CROSS_GLIBC} /lib:${CROSS_GLIBC_STATIC} /lib"
98
+ export CROSS_LIBRARY_PATH=" ${CROSS_GCC_LIB_STORE } /lib:${CROSS_GCC} /${HOST} /lib:${CROSS_GCC_LIB} :${CROSS_GLIBC} /lib:${CROSS_GLIBC_STATIC} /lib"
95
99
;;
96
100
* )
97
101
exit 1 ;;
0 commit comments