diff options
author | Andrew McDermott <andrew.mcdermott@linaro.org> | 2013-06-24 10:50:27 +0100 |
---|---|---|
committer | Andrew McDermott <andrew.mcdermott@linaro.org> | 2013-06-24 11:01:36 +0100 |
commit | 219ec6fe57273d24ff673d292a26e8fc6050398f (patch) | |
tree | 6d10ec5c3f9934e97227c139af2c98f6434b17ca /meta-linaro-toolchain | |
parent | c383e63617469dce76411249dba384aad21a3d9c (diff) |
gcc: use fix-g++-sysroot.patch from gcc-4.7 for gcc-4.8
The c++ include paths for the configured g++ on the target are missing
a leading '/' which means various headers files are not found when
compiling c++ programs.
This commit carries forward the existing patch from gcc-4.7 which
ensures that the gcc-runtime configure stage will not drop the leading
'/' when --with-sysroot is specified.
Fixes https://bugs.launchpad.net/linaro-oe/+bug/1192953.
Signed-off-by: Andrew McDermott <andrew.mcdermott@linaro.org>
Diffstat (limited to 'meta-linaro-toolchain')
-rw-r--r-- | meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8.inc | 1 | ||||
-rw-r--r-- | meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/fix-g++-sysroot.patch | 78 |
2 files changed, 79 insertions, 0 deletions
diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8.inc b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8.inc index c789aba8..1ad93f65 100644 --- a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8.inc +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8.inc @@ -47,6 +47,7 @@ SRC_URI = "http://cbuild.validation.linaro.org/snapshots/gcc-${PV}-${RELEASE}.ta file://0035-wcast-qual-PR-55383.patch \ file://gcc-4.8-PR56797.patch \ file://use-lib-for-aarch64.patch \ + file://fix-g++-sysroot.patch \ " SRC_URI[md5sum] = "3d95781ac0608639884f8f51e58ccc77" diff --git a/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/fix-g++-sysroot.patch b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/fix-g++-sysroot.patch new file mode 100644 index 00000000..e6028d55 --- /dev/null +++ b/meta-linaro-toolchain/recipes-devtools/gcc/gcc-linaro-4.8/fix-g++-sysroot.patch @@ -0,0 +1,78 @@ +backport + +http://www.mail-archive.com/gcc-patches@gcc.gnu.org/msg26013.html + +Upstream-Status: Pending + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +Refreshed for meta-linaro by Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org> + +--- + gcc/configure | 8 +++++++- + gcc/configure.ac | 8 +++++++- + 2 files changed, 14 insertions(+), 2 deletions(-) + +--- gcc-linaro-4.7-2013.02.orig/gcc/configure ++++ gcc-linaro-4.7-2013.02/gcc/configure +@@ -3322,11 +3322,13 @@ fi + + gcc_gxx_include_dir_add_sysroot=0 + if test "${with_sysroot+set}" = set; then + gcc_gxx_without_sysroot=`expr "${gcc_gxx_include_dir}" : "${with_sysroot}"'\(.*\)'` + if test "${gcc_gxx_without_sysroot}"; then +- gcc_gxx_include_dir="${gcc_gxx_without_sysroot}" ++ if test x${with_sysroot} != x/; then ++ gcc_gxx_include_dir="${gcc_gxx_without_sysroot}" ++ fi + gcc_gxx_include_dir_add_sysroot=1 + fi + fi + + +@@ -7284,10 +7286,14 @@ fi + + # Check whether --with-sysroot was given. + if test "${with_sysroot+set}" = set; then : + withval=$with_sysroot; + case ${with_sysroot} in ++ /) ;; ++ */) with_sysroot=`echo $with_sysroot | sed 's,/$,,'` ;; ++ esac ++ case ${with_sysroot} in + yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_noncanonical}/sys-root' ;; + *) TARGET_SYSTEM_ROOT=$with_sysroot ;; + esac + + TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"' +--- gcc-linaro-4.7-2013.02.orig/gcc/configure.ac ++++ gcc-linaro-4.7-2013.02/gcc/configure.ac +@@ -147,11 +147,13 @@ fi + + gcc_gxx_include_dir_add_sysroot=0 + if test "${with_sysroot+set}" = set; then + gcc_gxx_without_sysroot=`expr "${gcc_gxx_include_dir}" : "${with_sysroot}"'\(.*\)'` + if test "${gcc_gxx_without_sysroot}"; then +- gcc_gxx_include_dir="${gcc_gxx_without_sysroot}" ++ if test x${with_sysroot} != x/; then ++ gcc_gxx_include_dir="${gcc_gxx_without_sysroot}" ++ fi + gcc_gxx_include_dir_add_sysroot=1 + fi + fi + + AC_ARG_WITH(cpp_install_dir, +@@ -784,10 +786,14 @@ AC_SUBST(SYSROOT_CFLAGS_FOR_TARGET) + AC_ARG_WITH(sysroot, + [AS_HELP_STRING([[--with-sysroot[=DIR]]], + [search for usr/lib, usr/include, et al, within DIR])], + [ + case ${with_sysroot} in ++ /) ;; ++ */) with_sysroot=`echo $with_sysroot | sed 's,/$,,'` ;; ++ esac ++ case ${with_sysroot} in + yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_noncanonical}/sys-root' ;; + *) TARGET_SYSTEM_ROOT=$with_sysroot ;; + esac + + TARGET_SYSTEM_ROOT_DEFINE='-DTARGET_SYSTEM_ROOT=\"$(TARGET_SYSTEM_ROOT)\"' |