From 9ba8e472a817d08501d9db44dd2e60ff85c2baba Mon Sep 17 00:00:00 2001 From: Ben Elliston Date: Wed, 6 Jul 2005 06:29:16 +0000 Subject: Import some missing hunks from this patch on sourceware: 2004-11-11 Nick Clifton * lib/libgloss.exp (libio_include_flags, g++_include_flags, winsup_include_flags): Revert previous patch, restoring the use of -I, for all libraries except newlib. Newlib needs -isystem to avoid the problems with but the C++ and winsup libraries need -I because -isystem generates an implicit 'extern "C"' which may not be appropriate for certain targets. --- lib/libgloss.exp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'lib') diff --git a/lib/libgloss.exp b/lib/libgloss.exp index ec4e694..fc4be54 100644 --- a/lib/libgloss.exp +++ b/lib/libgloss.exp @@ -242,8 +242,7 @@ proc g++_include_flags { args } { set dir [lookfor_file ${srcdir} libstdc++-v3] if { ${dir} != "" } { - append flags " -I${dir}/include -I${dir}/include/std" - append flags " -I${dir}/include/c_std -I${dir}/libsupc++" + append flags " -I${dir}/include -I${dir}/include/std -I${dir}/include/c_std -I${dir}/libsupc++" } set dir [lookfor_file ${gccpath} libstdc++-v3] @@ -330,8 +329,7 @@ proc libstdc++_include_flags { args } { set dir [lookfor_file ${srcdir} libstdc++-v3] if { ${dir} != "" } { # See comment in libio_include_flags about using -I. - append flags " -I${dir}/include -I${dir}/include/std" - append flags " -I${dir}/include/c_std -I${dir}/libsupc++" + append flags " -I${dir}/include -I${dir}/include/std -I${dir}/include/c_std -I${dir}/libsupc++" } set gccpath [get_multilibs] @@ -906,7 +904,8 @@ proc winsup_include_flags { args } { set winsup_dir [lookfor_file ${srcdir} winsup/include/windows.h] if { ${winsup_dir} != "" } { set winsup_dir [file dirname ${winsup_dir}] - return " -isystem ${winsup_dir}" + # See comment in libio_include_flags about using -I. + return " -I${winsup_dir}" } } verbose "No winsup support for this target" -- cgit v1.1