public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH, testsuite, c-compat] Handle another c/l option not recognised by older GCC or clang.
@ 2018-10-29 21:29 Iain Sandoe
  2018-10-30 17:31 ` Mike Stump
  2018-10-30 19:44 ` Jeff Law
  0 siblings, 2 replies; 3+ messages in thread
From: Iain Sandoe @ 2018-10-29 21:29 UTC (permalink / raw)
  To: GCC Patches; +Cc: Mike Stump

Hi

When using ALT_CC/CXX_UNDER_TEST in the compat/struct-layout-1 tests, the c/l options provided to the “alt” compiler need to avoid latest and greatest GCC capability.  The patch tests to see if the ‘alt’ compiler can handle -fno-diagnostics-show-line-numbers.

OK for trunk?
thanks
Iain

gcc/testsuite/

	* lib/c-compat.exp (compat-use-alt-compiler): handle -fno-diagnostics-show-line-numbers.
	(compat_setup_dfp): Likewise.

diff --git a/gcc/testsuite/lib/c-compat.exp b/gcc/testsuite/lib/c-compat.exp
index f021890..45aa80a 100644
--- a/gcc/testsuite/lib/c-compat.exp
+++ b/gcc/testsuite/lib/c-compat.exp
@@ -35,7 +35,7 @@ load_lib target-libpath.exp
 # 
 proc compat-use-alt-compiler { } {
     global GCC_UNDER_TEST ALT_CC_UNDER_TEST
-    global compat_same_alt compat_alt_caret compat_alt_color
+    global compat_same_alt compat_alt_caret compat_alt_color compat_no_line_no
     global TEST_ALWAYS_FLAGS
 
     # We don't need to do this if the alternate compiler is actually
@@ -48,6 +48,9 @@ proc compat-use-alt-compiler { } {
 	if { $compat_alt_color == 0 } then {
 	    regsub -- "-fdiagnostics-color=never" $TEST_ALWAYS_FLAGS "" TEST_ALWAYS_FLAGS
 	}
+	if { $compat_no_line_no == 0 } then {
+	    regsub -- "-fno-diagnostics-show-line-numbers" $TEST_ALWAYS_FLAGS "" TEST_ALWAYS_FLAGS
+	}
 	restore_gcc_exec_prefix_env_var
     }
 }
@@ -77,10 +80,12 @@ proc compat_setup_dfp { } {
     global compat_have_dfp
     global compat_alt_caret
     global compat_alt_color
+    global compat_no_line_no
     global TEST_ALWAYS_FLAGS compat_save_TEST_ALWAYS_FLAGS
 
     set compat_alt_caret 0
     set compat_alt_color 0
+    set compat_no_line_no 0
     set compat_save_TEST_ALWAYS_FLAGS $TEST_ALWAYS_FLAGS
 
     verbose "compat_setup_dfp: $compat_use_alt $compat_same_alt" 2
@@ -100,6 +105,11 @@ proc compat_setup_dfp { } {
 		int dummy; } "-fdiagnostics-color=never"] != 0 } {
 	    set compat_alt_color 1
 	}
+	if { [check_no_compiler_messages_nocache compat_alt_has_no_line_no object {
+		int dummy; } "-fno-diagnostics-show-line-numbers"] != 0 } {
+	    set compat_no_line_no 1
+	}
+	
 	compat-use-tst-compiler
     }
 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH, testsuite, c-compat] Handle another c/l option not recognised by older GCC or clang.
  2018-10-29 21:29 [PATCH, testsuite, c-compat] Handle another c/l option not recognised by older GCC or clang Iain Sandoe
@ 2018-10-30 17:31 ` Mike Stump
  2018-10-30 19:44 ` Jeff Law
  1 sibling, 0 replies; 3+ messages in thread
From: Mike Stump @ 2018-10-30 17:31 UTC (permalink / raw)
  To: Iain Sandoe; +Cc: GCC Patches

On Oct 29, 2018, at 12:53 PM, Iain Sandoe <iain@sandoe.co.uk> wrote:
> 
> When using ALT_CC/CXX_UNDER_TEST in the compat/struct-layout-1 tests, the c/l options provided to the “alt” compiler need to avoid latest and greatest GCC capability.  The patch tests to see if the ‘alt’ compiler can handle -fno-diagnostics-show-line-numbers.
> 
> OK for trunk?

Ok.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH, testsuite, c-compat] Handle another c/l option not recognised by older GCC or clang.
  2018-10-29 21:29 [PATCH, testsuite, c-compat] Handle another c/l option not recognised by older GCC or clang Iain Sandoe
  2018-10-30 17:31 ` Mike Stump
@ 2018-10-30 19:44 ` Jeff Law
  1 sibling, 0 replies; 3+ messages in thread
From: Jeff Law @ 2018-10-30 19:44 UTC (permalink / raw)
  To: Iain Sandoe, GCC Patches; +Cc: Mike Stump

On 10/29/18 1:53 PM, Iain Sandoe wrote:
> Hi
> 
> When using ALT_CC/CXX_UNDER_TEST in the compat/struct-layout-1 tests, the c/l options provided to the “alt” compiler need to avoid latest and greatest GCC capability.  The patch tests to see if the ‘alt’ compiler can handle -fno-diagnostics-show-line-numbers.
> 
> OK for trunk?
> thanks
> Iain
> 
> gcc/testsuite/
> 
> 	* lib/c-compat.exp (compat-use-alt-compiler): handle -fno-diagnostics-show-line-numbers.
> 	(compat_setup_dfp): Likewise.
OK
jeff

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-10-30 19:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-29 21:29 [PATCH, testsuite, c-compat] Handle another c/l option not recognised by older GCC or clang Iain Sandoe
2018-10-30 17:31 ` Mike Stump
2018-10-30 19:44 ` Jeff Law

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).