diff options
author | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2010-10-08 23:37:12 +0200 |
---|---|---|
committer | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2010-10-08 23:37:12 +0200 |
commit | 644f08a974d3432bb0b38d7607a6c467c1988fa0 (patch) | |
tree | 4b6b2685befecff73f655944e8a66737ac239117 | |
parent | 817c166a0424d473ca7e7e3ad56d9a947c11558c (diff) | |
download | crosstool-ng-644f08a974d3432bb0b38d7607a6c467c1988fa0.tar.gz crosstool-ng-644f08a974d3432bb0b38d7607a6c467c1988fa0.tar.bz2 crosstool-ng-644f08a974d3432bb0b38d7607a6c467c1988fa0.zip |
cc/gcc: fix C++ headers location
In case we build the C++ compiler, we have to tell gcc where to put the C++
headers, or else it will try to # put it in prefix/tuple/include, which we
make a symlink to sysroot/usr/include during the build, and that we delete
(the symlink!) after the build, but gcc will not look in sysroot/usr/inlcude
for C++ headers by default.
Implements a fix suggested by: Bryan Hundven <bryanhundven@gmail.com>
Reported-by: Anthony Foiani <anthony.foiani@gmail.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
(transplanted from a0924619112015bdaa81a0a2313d21ef38607bc2)
-rw-r--r-- | scripts/build/cc/gcc.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/build/cc/gcc.sh b/scripts/build/cc/gcc.sh index e4d75e7e..9be3b511 100644 --- a/scripts/build/cc/gcc.sh +++ b/scripts/build/cc/gcc.sh @@ -317,6 +317,15 @@ do_cc() { CT_Test "Building ${CT_CC_LANG_OTHERS//,/ } language(s) is not yet supported. Will try..." -n "${CT_CC_LANG_OTHERS}" lang_opt=$(echo "${lang_opt},${CT_CC_LANG_OTHERS}" |sed -r -e 's/,+/,/g; s/,*$//;') + # In case we build the C++ compiler, we have to tell gcc where to put the + # C++ headers, or else it will try to put it in prefix/tuple/include, + # which we make a symlink to sysroot/usr/include during the build, and + # that we delete (the symlink!) after the build, but gcc will not look + # in sysroot/usr/inlcude for C++ headers by default + if [ "${CT_CC_LANG_CXX}" = "y" ]; then + extra_config+=("--with-gxx-include-dir=${CT_SYSROOT_DIR}/usr/include") + fi + extra_config+=("--enable-languages=${lang_opt}") extra_config+=("--disable-multilib") for tmp in ARCH ABI CPU TUNE FPU FLOAT; do |