mirror of
https://git.yoctoproject.org/poky
synced 2026-05-02 00:32:12 +02:00
So far c++ include path is not relative to "--sysroot", which brings trouble if we want to use the toolchain in a new environment where the original build directory generating that toolchain is not available. It's firstly exposed in multiple SDK sysroots support, and then in the case when sstate packages are used, where c++ standard headers are missing because gcc tries to search original build dir. This patch makes c++ include path now relative to "--sysroot", and then once "--sysroot" is assigned correctly in new environment, c++ include paths can be searched as expected. Signed-off-by: Kevin Tian <kevin.tian@intel.com>
25 lines
842 B
PHP
25 lines
842 B
PHP
require gcc-configure-common.inc
|
|
|
|
USE_NLS = '${@base_conditional( "TARGET_OS", "linux-uclibc", "no", "", d )}'
|
|
|
|
EXTRA_OECONF += " --enable-poison-system-directories "
|
|
|
|
EXTRA_OECONF_PATHS = "--with-local-prefix=${STAGING_DIR_TARGET}${target_exec_prefix} \
|
|
--with-gxx-include-dir=${target_includedir}/c++ \
|
|
--with-sysroot=${STAGING_DIR_TARGET} \
|
|
--with-build-sysroot=${STAGING_DIR_TARGET}"
|
|
|
|
do_compile_prepend () {
|
|
export CC="${BUILD_CC}"
|
|
export AR_FOR_TARGET="${TARGET_SYS}-ar"
|
|
export RANLIB_FOR_TARGET="${TARGET_SYS}-ranlib"
|
|
export LD_FOR_TARGET="${TARGET_SYS}-ld"
|
|
export NM_FOR_TARGET="${TARGET_SYS}-nm"
|
|
export CC_FOR_TARGET="${CCACHE} ${TARGET_SYS}-gcc ${TARGET_CC_ARCH}"
|
|
}
|
|
|
|
LIBGCCS_VAR = "-lgcc_s"
|
|
LIBGCCS_VAR_avr32 = ""
|
|
|
|
do_package_write_ipk[depends] += "virtual/libc:do_package"
|