aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Elliston <bje@gnu.org>2005-07-06 06:36:45 +0000
committerBen Elliston <bje@gnu.org>2005-07-06 06:36:45 +0000
commit958eb95c1d09f3e5f538f5f7d716fbefe5f74b99 (patch)
treee529328ff41435830c96b88d616d69c826f18c15
parentee7a94b3ea3c498eba8a6f8fe8a9c0ff7cb55450 (diff)
Backport from sourceware:
2004-11-11 Nick Clifton <nickc@redhat.com> * 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 <limits.h> but the C++ and winsup libraries need -I because -isystem generates an implicit 'extern "C"' which may not be appropriate for certain targets.
-rw-r--r--ChangeLog17
-rw-r--r--lib/libgloss.exp34
2 files changed, 40 insertions, 11 deletions
diff --git a/ChangeLog b/ChangeLog
index bafc598..4857df4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,20 @@
+2005-07-06 Ben Elliston <bje@gnu.org>
+
+ * The src/dejagnu tree on sourceware.org is now defunct.
+
+2005-07-06 Ben Elliston <bje@gnu.org>
+
+ Backport from sourceware:
+
+ 2004-11-11 Nick Clifton <nickc@redhat.com>
+
+ * 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 <limits.h> but the C++ and winsup
+ libraries need -I because -isystem generates an implicit 'extern
+ "C"' which may not be appropriate for certain targets.
+
2005-07-06 Aldy Hernandez <aldyh@redhat.com>
* baseboards/ms1-sid.exp: New.
diff --git a/lib/libgloss.exp b/lib/libgloss.exp
index 8fb6f09..36eaee0 100644
--- a/lib/libgloss.exp
+++ b/lib/libgloss.exp
@@ -158,6 +158,12 @@ proc newlib_include_flags { args } {
if { ${newlib_dir} != "" } {
set newlib_dir [file dirname ${newlib_dir}]
}
+ # Note - we use -isystem rather than -I because newlib contains
+ # system header files. This is especially important for the
+ # limits.h header which makes use of the #include_next directive.
+ # #include_next will generate error messages from GCC if compiling
+ # in strict ANSI mode or if another limits.h header cannot be found.
+ # When it is included via -isystem these things do not happen.
return " -isystem $gccpath/newlib/targ-include -isystem ${newlib_dir}"
} else {
verbose "No newlib support for this target"
@@ -190,7 +196,12 @@ proc libio_include_flags { args } {
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}"
+ # Note - unlike the newlib_include_flags proc above we use the -I
+ # switch to specify the include paths. This is because these headers
+ # are not system headers, and if -isystem were to be used GCC would
+ # generate an implicit extern "C" { ... } surrounding them. This
+ # will break targets which do not define NO_IMPLICIT_EXTERN_C.
+ return " -I${libio_src_dir} -I${libio_bin_dir}"
} else {
return ""
}
@@ -225,23 +236,23 @@ proc g++_include_flags { args } {
set dir [lookfor_file ${srcdir} libg++]
if { ${dir} != "" } {
- append flags " -isystem ${dir} -isystem ${dir}/src"
+ # See comment in libio_include_flags about using -I.
+ append flags " -I${dir} -I${dir}/src"
}
set dir [lookfor_file ${srcdir} libstdc++-v3]
if { ${dir} != "" } {
- append flags " -isystem ${dir}/include -isystem ${dir}/include/std"
- append flags " -isystem ${dir}/include/c_std -isystem ${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]
if { ${dir} != "" } {
- append flags " -isystem ${dir}/include -isystem ${dir}/include/${target_alias}"
+ append flags " -I${dir}/include -I${dir}/include/${target_alias}"
}
set dir [lookfor_file ${srcdir} libstdc++]
if { ${dir} != "" } {
- append flags " -isystem ${dir} -isystem ${dir}/stl"
+ append flags " -I${dir} -I${dir}/stl"
}
return "$flags"
@@ -317,20 +328,20 @@ proc libstdc++_include_flags { args } {
set dir [lookfor_file ${srcdir} libstdc++-v3]
if { ${dir} != "" } {
- append flags " -isystem ${dir}/include -isystem ${dir}/include/std"
- append flags " -isystem ${dir}/include/c_std -isystem ${dir}/libsupc++"
+ # See comment in libio_include_flags about using -I.
+ 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 " -isystem ${dir}/include -isystem ${dir}/include/${target_alias}"
+ append flags " -I${dir}/include -I${dir}/include/${target_alias}"
}
set dir [lookfor_file ${srcdir} libstdc++]
if { ${dir} != "" } {
- append flags " -isystem ${dir} -isystem ${dir}/stl"
+ append flags " -I${dir} -I${dir}/stl"
}
return "$flags"
@@ -873,7 +884,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"