Re: [PATCH] Add new wa_noexecstack testsuite effective target.
Seems to me obvious, installed as ecf2b69a629d4f79efe3c103fe54040437ea18a6. Martin
Re: [PATCH] Add new wa_noexecstack testsuite effective target.
On 3/16/20 11:07 AM, Rainer Orth wrote: Minus the quoting, it's only 59 chars long... Ah ok. I will make better next time ;) Martin
Re: [PATCH] Add new wa_noexecstack testsuite effective target.
Hi Martin, >>> gcc/testsuite/ChangeLog: >>> >>> 2020-03-16 Martin Liska >>> >>> PR lto/94157 >>> * gcc.dg/lto/pr94157_0.c: Add wa_noexecstack effective >>> target filter. >>> * lib/target-supports.exp: Add >>> check_effective_target_wa_noexecstack. >> One question (because I noticed it in several of your patch submissions >> lately): do you have a particularly short line length configure for >> ChangeLogs or in general? > > I use contrib/vimrc with line length limit 80 chars. > >> Many of the lines are way below a 75 >> character limit, which doesn't improve readablity... > > Thanks for the notice. Do you really suffer from lines slighly > longer than 80 chars? I would (at least a bit), but here I see quite the opposite: lines way way shorter than 80 (or even 75) chars for no appararent reason. Maybe it's your mailer mangling them? See e.g. the first line of your ChangeLog snippet above: >>> * gcc.dg/lto/pr94157_0.c: Add wa_noexecstack effective >>> target filter. Minus the quoting, it's only 59 chars long... Rainer -- - Rainer Orth, Center for Biotechnology, Bielefeld University
Re: [PATCH] Add new wa_noexecstack testsuite effective target.
On 3/16/20 9:48 AM, Rainer Orth wrote: Hi Martin, It's fix for Darwin target and similar others which do not support the asembler directive. Ready for master? I'm usually all for using effective-target keywords instead of ad-hoc tests or target lists, but this seems like a single-use case and thus a bit too much. Maybe restrict to gas instead? Yes, good idea! Or is it possible to change the test in a way that doesn't depend on special unportable target assembler options? I haven't looked admittedly. If none of this works out: * Please change the keyword to as_execstack (assuming that an assembler supports the positive form support the negative one, too). "wa" doesn't tell me anything... * This needs documenting in sourcebuild.texi, as always. So, if there's really no other option: ok with those changes. gcc/testsuite/ChangeLog: 2020-03-16 Martin Liska PR lto/94157 * gcc.dg/lto/pr94157_0.c: Add wa_noexecstack effective target filter. * lib/target-supports.exp: Add check_effective_target_wa_noexecstack. One question (because I noticed it in several of your patch submissions lately): do you have a particularly short line length configure for ChangeLogs or in general? I use contrib/vimrc with line length limit 80 chars. Many of the lines are way below a 75 character limit, which doesn't improve readablity... Thanks for the notice. Do you really suffer from lines slighly longer than 80 chars? Martin Rainer >From 023c3b3e8c530b98fdc6bae91e2dc58aa2336c2f Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Mon, 16 Mar 2020 09:24:44 +0100 Subject: [PATCH] Filter a test-case with gas. gcc/testsuite/ChangeLog: 2020-03-16 Martin Liska PR lto/94157 * gcc.dg/lto/pr94157_0.c: Add gas effective target filter. --- gcc/testsuite/gcc.dg/lto/pr94157_0.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/testsuite/gcc.dg/lto/pr94157_0.c b/gcc/testsuite/gcc.dg/lto/pr94157_0.c index 3bca677c4fb..a6e308b855b 100644 --- a/gcc/testsuite/gcc.dg/lto/pr94157_0.c +++ b/gcc/testsuite/gcc.dg/lto/pr94157_0.c @@ -1,4 +1,5 @@ /* { dg-lto-do link } */ +/* { dg-require-effective-target gas } */ /* { dg-lto-options { { -O0 -fipa-vrp -flto -Wa,--noexecstack -Wa,--noexecstack -Wa,--execstack -Wa,--execstack -Wa,--execstack -Wa,--execstack -Wa,--execstack -Wa,--execstack -Wa,--execstack -Wa,--execstack -Wa,--execstack -Wa,--execstack -Wa,--execstack -Wa,--execstack -Wa,--execstack -Wa,--execstack } } } */ int main() { -- 2.25.1
Re: [PATCH] Add new wa_noexecstack testsuite effective target.
Hi Martin, > It's fix for Darwin target and similar others which do > not support the asembler directive. > > Ready for master? I'm usually all for using effective-target keywords instead of ad-hoc tests or target lists, but this seems like a single-use case and thus a bit too much. Maybe restrict to gas instead? Or is it possible to change the test in a way that doesn't depend on special unportable target assembler options? I haven't looked admittedly. If none of this works out: * Please change the keyword to as_execstack (assuming that an assembler supports the positive form support the negative one, too). "wa" doesn't tell me anything... * This needs documenting in sourcebuild.texi, as always. So, if there's really no other option: ok with those changes. > gcc/testsuite/ChangeLog: > > 2020-03-16 Martin Liska > > PR lto/94157 > * gcc.dg/lto/pr94157_0.c: Add wa_noexecstack effective > target filter. > * lib/target-supports.exp: Add > check_effective_target_wa_noexecstack. One question (because I noticed it in several of your patch submissions lately): do you have a particularly short line length configure for ChangeLogs or in general? Many of the lines are way below a 75 character limit, which doesn't improve readablity... Rainer -- - Rainer Orth, Center for Biotechnology, Bielefeld University
[PATCH] Add new wa_noexecstack testsuite effective target.
Hi. It's fix for Darwin target and similar others which do not support the asembler directive. Ready for master? Thanks, Martin gcc/testsuite/ChangeLog: 2020-03-16 Martin Liska PR lto/94157 * gcc.dg/lto/pr94157_0.c: Add wa_noexecstack effective target filter. * lib/target-supports.exp: Add check_effective_target_wa_noexecstack. --- gcc/testsuite/gcc.dg/lto/pr94157_0.c | 1 + gcc/testsuite/lib/target-supports.exp | 10 ++ 2 files changed, 11 insertions(+) diff --git a/gcc/testsuite/gcc.dg/lto/pr94157_0.c b/gcc/testsuite/gcc.dg/lto/pr94157_0.c index 3bca677c4fb..3745fee217f 100644 --- a/gcc/testsuite/gcc.dg/lto/pr94157_0.c +++ b/gcc/testsuite/gcc.dg/lto/pr94157_0.c @@ -1,4 +1,5 @@ /* { dg-lto-do link } */ +/* { dg-require-effective-target wa_noexecstack } */ /* { dg-lto-options { { -O0 -fipa-vrp -flto -Wa,--noexecstack -Wa,--noexecstack -Wa,--execstack -Wa,--execstack -Wa,--execstack -Wa,--execstack -Wa,--execstack -Wa,--execstack -Wa,--execstack -Wa,--execstack -Wa,--execstack -Wa,--execstack -Wa,--execstack -Wa,--execstack -Wa,--execstack -Wa,--execstack } } } */ int main() { diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index ca3895c2269..589192d9edb 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -1022,6 +1022,16 @@ proc check_effective_target_fgnu_tm {} { } "-fgnu-tm"] } +# Return 1 if compilation with -Wa,--noexecstack is error-free for trivial +# code, 0 otherwise. + +proc check_effective_target_wa_noexecstack {} { +return [check_no_compiler_messages wa_noexecstack object { + void foo (void) { } +} "-Wa,--noexecstack"] +} + + # Return 1 if the target supports mmap, 0 otherwise. proc check_effective_target_mmap {} {