> On Sep 16, 2021, at 10:47 AM, Jakub Jelinek <ja...@redhat.com> wrote:
>
> On Thu, Sep 16, 2021 at 03:39:46PM +0000, Qing Zhao wrote:
>>> Even -mtune= is needed if you want to stay safe, otherwise people testing
>>> with --target_board=unix/-mtune=cascadelake (or whatever else) might get
>>> failures.
>>
>> Okay. Will try this.
>>>
>>>>> and ideally also -fno-stack-protector
>>>>> -fno-stack-clash-protection etc.
>>>>
>>>> Could you explain a little bit on this why?
>>>
>>> In case people test e.g. with --target_board=unix/\{,-fstack-protector-all\}
>>> etc. (e.g. in Fedora/RHEL we do).
>>> For the RTL scanning checks if they are done fairly early, those options
>>> might not change anything, but with the ones scanning in the assembly,
>>> one needs to watch if those options don't add e.g. in the prologue or
>>> epilogue further copies of the instructions you scan for.
>>
>> I see.
>>
>> Thank you.
>
> Basically, try to test with a bunch of semi-randomly chosen option sets and
> see what breaks and what works and then for the cases you think are common
> enough and worth adjusting testcases adjust them, otherwise add dg-options
> to make sure the expected arch/tune/etc. are in effect.
> make check-gcc
> RUNTESTFLAGS='--target_board=unix\{-m64,-m64/-march=skylake-avx512,-m64/-fstack-protector-all,-m64/-fstack-clash-protection,-m32/-mno-sse,-m32/-mtune=bonnell,-m32/-march=bonnell,-m32/-fstack-protector-all/-fstack-clash-protection\}
> i386.exp=auto-init*'
Thanks a lot for the suggestions and help, I will try this.
Qing
> etc.
>
> Jakub
>