From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26553 invoked by alias); 11 Nov 2004 15:54:12 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 25996 invoked from network); 11 Nov 2004 15:53:47 -0000 Received: from unknown (HELO relay3.mail.uk.clara.net) (80.168.70.143) by sourceware.org with SMTP; 11 Nov 2004 15:53:47 -0000 Received: from adsl-2-solo-173-195.claranet.co.uk ([80.168.173.195] helo=[172.31.0.98]) by relay3.mail.uk.clara.net with esmtp (Exim 4.34) id 1CSHGX-000G75-F8; Thu, 11 Nov 2004 15:53:42 +0000 Message-ID: <41938BDF.7040104@redhat.com> Date: Thu, 11 Nov 2004 15:54:00 -0000 From: Nick Clifton User-Agent: Mozilla Thunderbird 0.7.3 (X11/20040803) MIME-Version: 1.0 To: Daniel Jacobowitz CC: binutils@sources.redhat.com, gdb-patches@sources.redhat.com, newlib@sources.redhat.com Subject: Re: Dejagnu: use -isystem to include system header files. References: <20041111142237.GA25841@nevyn.them.org> In-Reply-To: <20041111142237.GA25841@nevyn.them.org> Content-Type: multipart/mixed; boundary="------------050902090405060408010403" X-SW-Source: 2004-11/txt/msg00226.txt.bz2 This is a multi-part message in MIME format. --------------050902090405060408010403 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-length: 1356 Hi Daniel, > This patch will break in-tree testing for yet other targets. I believe > arm-elf was affected - anything which does not set > NO_IMPLICIT_EXTERN_C. I discussed this with H-P on the dejagnu list > but never figured out a solution, but... >> * lib/libgloss.exp (newlib_include_flags): Use -isystem, not -I. >> (libio_include_flags, g++_include_flags, libstdc++_include_flags, >> winsup_include_flags): Ditto. > ... I strongly suspect that g++ and winsup should be left out. Ok - what about this revision to the patched sources based upon Rob Savoye's suggestion that -isystem is only needed for newlib includes ? It appears to work for the xstormy16 port and I did not detect any regression for the arm-elf port, so I think that it should be OK. Assuming that you like this patch, shall I submit it to Rob for inclusion in the official sources as well ? Cheers Nick dejagnu/ChangeLog 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. --------------050902090405060408010403 Content-Type: text/plain; name="libgloss.exp.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="libgloss.exp.patch" Content-length: 4167 Index: dejagnu/lib/libgloss.exp =================================================================== RCS file: /cvs/src/src/dejagnu/lib/libgloss.exp,v retrieving revision 1.11 diff -c -3 -p -r1.11 libgloss.exp *** dejagnu/lib/libgloss.exp 11 Nov 2004 11:55:11 -0000 1.11 --- dejagnu/lib/libgloss.exp 11 Nov 2004 15:46:03 -0000 *************** proc libio_include_flags { args } { *** 191,197 **** if { $libio_bin_dir != "" && $libio_src_dir != "" } { set libio_src_dir [file dirname ${libio_src_dir}] set libio_bin_dir [file dirname ${libio_bin_dir}]; ! return " -isystem ${libio_src_dir} -isystem ${libio_bin_dir}" } else { return "" } --- 191,197 ---- if { $libio_bin_dir != "" && $libio_src_dir != "" } { set libio_src_dir [file dirname ${libio_src_dir}] set libio_bin_dir [file dirname ${libio_bin_dir}]; ! return " -I${libio_src_dir} -I${libio_bin_dir}" } else { return "" } *************** proc g++_include_flags { args } { *** 226,247 **** set dir [lookfor_file ${srcdir} libg++] if { ${dir} != "" } { ! append flags " -isystem ${dir} -isystem ${dir}/src" } set dir [lookfor_file ${srcdir} libstdc++-v3] if { ${dir} != "" } { ! append flags " -isystem ${dir}/include -isystem ${dir}/include/std -isystem ${dir}/include/c_std -isystem ${dir}/libsupc++" } set dir [lookfor_file ${gccpath} libstdc++-v3] if { ${dir} != "" } { ! append flags " -isystem ${dir}/include -isystem ${dir}/include/${target_alias}" } set dir [lookfor_file ${srcdir} libstdc++] if { ${dir} != "" } { ! append flags " -isystem ${dir} -isystem ${dir}/stl" } return "$flags" --- 226,247 ---- set dir [lookfor_file ${srcdir} libg++] if { ${dir} != "" } { ! append flags " -I${dir} I${dir}/src" } set dir [lookfor_file ${srcdir} libstdc++-v3] if { ${dir} != "" } { ! append flags " -I${dir}/include -I${dir}/include/std -I${dir}/include/c_std -I${dir}/libsupc++" } set dir [lookfor_file ${gccpath} libstdc++-v3] if { ${dir} != "" } { ! append flags " -I${dir}/include -I${dir}/include/${target_alias}" } set dir [lookfor_file ${srcdir} libstdc++] if { ${dir} != "" } { ! append flags " -I${dir} -I${dir}/stl" } return "$flags" *************** proc libstdc++_include_flags { args } { *** 317,335 **** set dir [lookfor_file ${srcdir} libstdc++-v3] if { ${dir} != "" } { ! append flags " -isystem ${dir}/include -isystem ${dir}/include/std -isystem ${dir}/include/c_std -isystem ${dir}/libsupc++" } set gccpath [get_multilibs] set dir [lookfor_file ${gccpath} libstdc++-v3] if { ${dir} != "" } { ! append flags " -isystem ${dir}/include -isystem ${dir}/include/${target_alias}" } set dir [lookfor_file ${srcdir} libstdc++] if { ${dir} != "" } { ! append flags " -isystem ${dir} -isystem ${dir}/stl" } return "$flags" --- 317,335 ---- set dir [lookfor_file ${srcdir} libstdc++-v3] if { ${dir} != "" } { ! append flags " -I${dir}/include -I${dir}/include/std -I${dir}/include/c_std -I${dir}/libsupc++" } set gccpath [get_multilibs] set dir [lookfor_file ${gccpath} libstdc++-v3] if { ${dir} != "" } { ! append flags " -I${dir}/include -I${dir}/include/${target_alias}" } set dir [lookfor_file ${srcdir} libstdc++] if { ${dir} != "" } { ! append flags " -I${dir} -I${dir}/stl" } return "$flags" *************** proc winsup_include_flags { args } { *** 867,873 **** set winsup_dir [lookfor_file ${srcdir} winsup/include/windows.h] if { ${winsup_dir} != "" } { set winsup_dir [file dirname ${winsup_dir}] ! return " -isystem ${winsup_dir}" } } verbose "No winsup support for this target" --- 867,873 ---- set winsup_dir [lookfor_file ${srcdir} winsup/include/windows.h] if { ${winsup_dir} != "" } { set winsup_dir [file dirname ${winsup_dir}] ! return " -I${winsup_dir}" } } verbose "No winsup support for this target" --------------050902090405060408010403--