This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch, testsuite] refers PR42348
- From: IainS <developer at sandoe-acoustics dot co dot uk>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Cc: Mike Stump <mrs at apple dot com>, Janis Johnson <janis187 at us dot ibm dot com>
- Date: Thu, 17 Dec 2009 21:22:56 +0000
- Subject: [patch, testsuite] refers PR42348
Hi,
The problem reported in PR42348 revealed several underlying problems:
1/ that target supports are non-functional for ObjC/C++ when the
runtime flags are used (e.g. -fgnu-runtime).
This is because those flags cause a warning from cc1 or cc1plus.
This patch resolves this by changing the file suffix to .m or .mm when
the tool under test is ObjC or ObjC++ respectively.
2/ there is no support for detection of whether a target can support
OBJC2 or NeXT runtime.,
The patch adds support for detection of __OBJC2__ and next_runtime
which are needed if we are to tidy up the number of failing ObjC/C++
tests.
3/ The tests for the gnu-runtime library usage are failing in
testsuite/lib/objc.exp and obj-c++.exp.
[they only detect if -fgnu-runtime is placed in the dg-options,
rather than also checking the multilib options].
the patch modifies gcc/testsuite/lib/objc.exp and gcc/testsuite/lib/
obj-c++.exp to detect the runtime in force after all the options are
processed.
with these patches a more controlled skip-if can be applied [example
in the PR]
(which should enable a lot of cleaning up of spurious fails for
darwin9/10).
cheers,
Iain
2009-12-17 Iain Sandoe <iain.sandoe@sandoe-acoustics.co.uk>
PR testsuite/42348
*gcc/testsuite/lib/target-supports.exp: Add support for ObjC and ObjC+
+ tools in standard tests,
(check_effective_target_objc2) New proc.
(check_effective_target_next_runtime) New proc.
*gcc/testsuite/lib/objc.exp: Walk through the gnu/next runtime flags
to determine which is actually in force, attach the appropriate
includes accordingly.
*gcc/testsuite/lib/obj-c++.exp: Ditto
===
Attachment:
objc-c++-targetsupports+runtime.diff.txt
Description: Text document