From patchwork Wed Dec 6 15:43:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John David Anglin X-Patchwork-Id: 174644 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp4191752vqy; Wed, 6 Dec 2023 07:44:03 -0800 (PST) X-Google-Smtp-Source: AGHT+IFMfNZ6Kal0yfQeM6fGz9Cu9DsD0/EhXukeNE24UHSwPM4UeYa2Yg+53FEy5TYrwaIwwg1h X-Received: by 2002:a05:6214:2268:b0:67a:ad52:1f94 with SMTP id gs8-20020a056214226800b0067aad521f94mr1233133qvb.90.1701877442702; Wed, 06 Dec 2023 07:44:02 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1701877442; cv=pass; d=google.com; s=arc-20160816; b=BHnabnUaABJxDbn4AMBFXwyVJN5j/LUjfdgZbUCZ+pybdZYX3YiviDIClvd7Vhg0v9 utmWyR1GWtqtoJHrarr3Z/LY8g1En6D8TfAYn1glWTXA/rFsO/+Nm4RcNBH438LP7ERq 5TP1UwO4pSY8BO//8kmuOO3+qV+QkJSGeVo1cDK/3/SSjSXTZdc92KDL8Vy0jV9qO5dT nE3DMPCflO0Gj+ocoWLlgy9lhnPSBF1v7eHxA9ufpATLFfZ7LCBo/tRKNf1ciYb7EgjH h9gKoIhyiuUwDk5UZ52ul6pZnQY7fkL36Vl4q7zfTcF8k8tNHRRAGVbsRhOjx1aEHZ2d gFSw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-disposition :mime-version:message-id:subject:to:from:date:arc-filter :dmarc-filter:delivered-to; bh=gxo8KLF9ZSXy/mtWSVuJqgz89v8zv0tk34RceIeoXuI=; fh=1L2/IiukS00vgiXcKREcvt+pFBEM8GuYOng2C1a9k1k=; b=bZlbLDvy/Nv+rq4o/DJaRUgMiY+XIWs6VGcwh4Gh3EiXVdcsc+2rWVBKfxbtfzZS3B 3m0qqq6RREXLilhzTYfZHd2PLVP1aK5iMVQ4ULp2VIRR6mfbszHT0GKxpoyzA7t15Giz WFeJjT63nG4u23z9PrHYr7CJk7Oeg9YtouDjdXyUVlcpCeprjIeMEIdBAinGR6putWXc 6PQdDNI0pzrbIfAAo6imcYHKIGrjsD6HZ3Nac75ZD1lJSlewgXZZDIs5SnH4jN1rM43J mNxUkg0vUoMvvNxg6OG1GZOg70AFpI7BtAXi+KVc6hp0e5zXgtyY1krVezLV2PGHdE6X Di4w== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id z5-20020a0cfc05000000b0067a9344c834si187835qvo.129.2023.12.06.07.44.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Dec 2023 07:44:02 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org" Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 792D33858421 for ; Wed, 6 Dec 2023 15:44:02 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from dellerweb.de (unknown [IPv6:2a02:c207:3003:236::1]) by sourceware.org (Postfix) with ESMTPS id C5B873858C30 for ; Wed, 6 Dec 2023 15:43:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C5B873858C30 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=parisc-linux.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=parisc-linux.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org C5B873858C30 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a02:c207:3003:236::1 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701877420; cv=none; b=SVr4f0AjtzTNbtEmWudlW7kuvc6C3AGhSTZgzLoAymRVaG2JZROZ26LCB2E1YzjUIjVFj61yPDh6HxLpOcNjPnLyDgqZjp1SXqUrdg8b47xYg4HOT/XgBqdqOY7qVFbYg14g5Mj/zOHCENGPMYjWE4XjuFSZR3LHjvbP4yqKS3A= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701877420; c=relaxed/simple; bh=aPW4zVwOFTEiBggXsSmCfAuCoH5ovnm8cNpJV9dZ8P8=; h=Date:From:To:Subject:Message-ID:MIME-Version; b=f/TnHg/qTpAu8LrXYIXGAsnunhIIryXZ0nJNlHPGPgWCnhR37jZHa/VOPkB6bmhZh87k/EA5MElB0jJUiDeRoUBThL/CDf0VZ29VrtoPvgCL0wQNbrw7HlLd86xMVTiglHH4dhyxK6hGNr0WQNcD2KY5Q9evE9tU6BSdZ/8nFts= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from mx3210.localdomain (unknown [142.126.114.79]) by dellerweb.de (Postfix) with ESMTPSA id E638C160001B; Wed, 6 Dec 2023 16:43:33 +0100 (CET) Received: by mx3210.localdomain (Postfix, from userid 1000) id 0DDA122012C; Wed, 6 Dec 2023 15:43:31 +0000 (UTC) Date: Wed, 6 Dec 2023 15:43:31 +0000 From: John David Anglin To: GCC Patches Subject: [committed] Fix c-c++-common/fhardened-[12].c test fails on hppa Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-Spam-Status: No, score=-9.2 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784547841435592791 X-GMAIL-MSGID: 1784547841435592791 Tested on hppa-unknown-linux-gnu. Committed to trunk. Dave --- Fix c-c++-common/fhardened-[12].c test fails on hppa The -fstack-protector and -fstack-protector-strong options are not supported on hppa since the stack grows up. 2023-12-06 John David Anglin gcc/testsuite/ChangeLog: * c-c++-common/fhardened-1.c: Ignore __SSP_STRONG__ define if __hppa__ is defined. * c-c++-common/fhardened-2.c: Ignore __SSP__ define if __hppa__ is defined. diff --git a/gcc/testsuite/c-c++-common/fhardened-1.c b/gcc/testsuite/c-c++-common/fhardened-1.c index 7e6740655fe..23478be76b2 100644 --- a/gcc/testsuite/c-c++-common/fhardened-1.c +++ b/gcc/testsuite/c-c++-common/fhardened-1.c @@ -1,7 +1,7 @@ /* { dg-do compile { target *-*-linux* *-*-gnu* } } */ /* { dg-options "-fhardened -O" } */ -#ifndef __SSP_STRONG__ +#if !defined(__SSP_STRONG__) && !defined(__hppa__) # error "-fstack-protector-strong not enabled" #endif diff --git a/gcc/testsuite/c-c++-common/fhardened-2.c b/gcc/testsuite/c-c++-common/fhardened-2.c index 280ff96eb15..6ac66f9f6b7 100644 --- a/gcc/testsuite/c-c++-common/fhardened-2.c +++ b/gcc/testsuite/c-c++-common/fhardened-2.c @@ -4,7 +4,7 @@ #ifdef __SSP_STRONG__ # error "-fstack-protector-strong enabled when it should not be" #endif -#ifndef __SSP__ +#if !defined(__SSP__) && !defined(__hppa__) # error "-fstack-protector not enabled" #endif