This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PING][PATCH,dejagnu] Allow dg-skip-if to use compiler flags specified through set_board_info cflags
- From: Senthil Kumar Selvaraj <senthil_kumar dot selvaraj at atmel dot com>
- To: <gcc-patches at gcc dot gnu dot org>
- Cc: <janisjo at codesourcery dot com>
- Date: Sun, 19 Aug 2012 13:30:14 +0530
- Subject: Re: [PING][PATCH,dejagnu] Allow dg-skip-if to use compiler flags specified through set_board_info cflags
- References: <20120811173903.GB21432@atmel.com>
Hello
On Sat, Aug 11, 2012 at 11:09:03PM +0530, Senthil Kumar Selvaraj wrote:
> This patch allows cflags set in board config files using
> "set_board_info cflags" to be used in the selectors of
> dg-skip-if and other dejagnu commands that use the check-flags
> proc.
>
> The code merely adds cflags to compiler_flags in the check-flags proc,
> exactly the same way as multilib_flags is added.
>
> Regards
> Senthil
>
> * lib/target-supports-dg.exp (check-flags): Add cflags from board
> config to compiler_flags
>
>
> diff --git a/gcc/testsuite/lib/target-supports-dg.exp b/gcc/testsuite/lib/target-supports-dg.exp
> index 2f6c4c2..bdf7476 100644
> --- a/gcc/testsuite/lib/target-supports-dg.exp
> +++ b/gcc/testsuite/lib/target-supports-dg.exp
> @@ -304,6 +304,9 @@ proc check-flags { args } {
> # If running a subset of the test suite, $TEST_ALWAYS_FLAGS may not exist.
> catch {append compiler_flags " $TEST_ALWAYS_FLAGS "}
> set dest [target_info name]
> + if [board_info $dest exists cflags] {
> + append compiler_flags "[board_info $dest cflags] "
> + }
> if [board_info $dest exists multilib_flags] {
> append compiler_flags "[board_info $dest multilib_flags] "
> }
Does the patch look ok?
Regards
Senthil