From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) by sourceware.org (Postfix) with ESMTPS id E76623857830 for ; Thu, 16 Sep 2021 17:39:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E76623857830 Received: by mail-wr1-x42c.google.com with SMTP id t8so10775513wrq.4 for ; Thu, 16 Sep 2021 10:39:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=C+PmjBczwmTvD3Xji+5Jzk2oO8e+vv2pDzbkkKjQ30I=; b=wnB3Tlh6jdKaDXjT4OdCJ1soEl1aujn+gJ4ZryM3gPUAFAu0ucvH/Jwfeu6clgIh20 Wugh9yhF1a6Ca+8QptFExQlNJoaWGvebJt+zU5YKTN83RPpMdFTLQopKobN/A5SSZ6Jc PxqlmNRPHDXj0QKs4wzadCkrWS2x0AGcnFRRBmwQy1Z3zOVGA7HsML9XGx7gyBRDOKZ/ wrSKpiAG2N9pLLUxCG8VaKPenAARC7QG/1C93ffEqexzzqVNLGM8dWUUXEyb9lKjfmBR rw+jWMfthWjJXaQ67a0IVZ4EmdYGg60bMFFkQT6cnScGR+kNANjZpZCfbocaYis3cze0 QHYg== X-Gm-Message-State: AOAM532Bh8iGVN/cX3Th64ppETU/Shkp5DlhqANGnhNUZRvuyP033V1M LKhYtM59iWsTLEiRWNJ3HSA= X-Google-Smtp-Source: ABdhPJw2BU8JzTTRqLb46VGM+5PmxPB8mDrgL4NOU2kwRuJC0n0C+cVOAoUwpYfXj4QPJ7vOwSZhbg== X-Received: by 2002:adf:e806:: with SMTP id o6mr7218010wrm.239.1631813962076; Thu, 16 Sep 2021 10:39:22 -0700 (PDT) Received: from [192.168.1.214] (host81-138-1-83.in-addr.btopenworld.com. [81.138.1.83]) by smtp.googlemail.com with ESMTPSA id u16sm4475242wmc.41.2021.09.16.10.39.21 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 Sep 2021 10:39:21 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.21\)) Subject: Re: [PATCH] testsuite: Fix c-c++-common/auto-init-* tests From: Iain Sandoe In-Reply-To: <8B2A5603-0212-49CF-9CB9-6FA75104662C@oracle.com> Date: Thu, 16 Sep 2021 18:39:14 +0100 Cc: Jakub Jelinek , Richard Sandiford , Richard Biener , Nick Alcock via Gcc-patches , kees Cook Content-Transfer-Encoding: quoted-printable Message-Id: References: <1F37A36D-A681-4EA8-B96B-0195AE707C91@oracle.com> <20210911080320.GA304296@tucnak> <9C40E343-B36F-46DC-8A41-383B8EF97A48@oracle.com> <20210916091917.GF304296@tucnak> <902D3C35-8E78-4A91-99A3-AD644A7A1F53@oracle.com> <20210916145640.GI304296@tucnak> <20210916154733.GJ304296@tucnak> <8B2A5603-0212-49CF-9CB9-6FA75104662C@oracle.com> To: Qing Zhao X-Mailer: Apple Mail (2.3445.104.21) X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2021 17:39:24 -0000 > On 16 Sep 2021, at 18:11, Qing Zhao via Gcc-patches = wrote: >=20 >=20 >=20 >> On Sep 16, 2021, at 10:47 AM, Jakub Jelinek wrote: >>=20 >> On Thu, Sep 16, 2021 at 03:39:46PM +0000, Qing Zhao wrote: >>>> Even -mtune=3D is needed if you want to stay safe, otherwise people = testing >>>> with --target_board=3Dunix/-mtune=3Dcascadelake (or whatever else) = might get >>>> failures. >>>=20 >>> Okay. Will try this. >>>>=20 >>>>>> and ideally also -fno-stack-protector >>>>>> -fno-stack-clash-protection etc. >>>>>=20 >>>>> Could you explain a little bit on this why? >>>>=20 >>>> In case people test e.g. with = --target_board=3Dunix/\{,-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. >>>=20 >>> I see.=20 >>>=20 >>> Thank you. >>=20 >> 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=3D'--target_board=3Dunix\{-m64,-m64/-march=3Dskylake-avx512,-= m64/-fstack-protector-all,-m64/-fstack-clash-protection,-m32/-mno-sse,-m32= /-mtune=3Dbonnell,-m32/-march=3Dbonnell,-m32/-fstack-protector-all/-fstack= -clash-protection\} i386.exp=3Dauto-init*' >=20 > Thanks a lot for the suggestions and help, I will try this. I might suggest adding -fPIC or -fpic to the mix too (if it=E2=80=99s = relevant to the tests) there are quite a few testcases that fail when = run on Darwin (or HJ=E2=80=99s pic tester versions) because of the = difference in code-gen. Iain >=20 > Qing >> etc. >>=20 >> Jakub