From patchwork Sat Dec 21 22:33:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 852748 Delivered-To: patch@linaro.org Received: by 2002:a5d:4888:0:b0:385:e875:8a9e with SMTP id g8csp2746539wrq; Sat, 21 Dec 2024 14:35:19 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXDoaQvyMeGgeLB6QQLYSzUsg8LeKTL/xyLzeUlIv7gTmGNMFgxt2Y9M3bZugWLJ3Mg6hZTog==@linaro.org X-Google-Smtp-Source: AGHT+IG9l7px8dNO/dJNcuWra+sKSXuZ4fgGITbYWw4swkykX67Z3VtFBIN8rbIWZVWRQ49xjdl4 X-Received: by 2002:a05:6214:20c1:b0:6d8:f005:b573 with SMTP id 6a1803df08f44-6dd15531556mr206421296d6.1.1734820519282; Sat, 21 Dec 2024 14:35:19 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1734820519; cv=pass; d=google.com; s=arc-20240605; b=QMlMZa9Iq6WDooNeVgJgSnkYm3hO3q0LbnvafZEtnHVRdp755Y7vQCbbSqHuQjou1f +uNHjo2sNLFjm9Wir8yggeEfoWclQrs2Tp7fL4opfmgir6b3SoNA3WUZ6Ikl097m9zg0 q4jU3IVQhL7/hY/ELpD2d81uZz+m2Qmw1M4DmPQxkaM2eYBtDUp33S0oGuX4wQp9AKwS 9hDGS5HWUCTxqrPEBwNmB793g/r48bSOZRzJLlRwL4hLMF5AmuiXCJFEgUIkzR2aj2Zk 5MEN0nt9qKJ7+0yJC3tRFZtfC43pAiPak7mlEPXc67i8dBDtWC+jNeGVVEIxt+Q5vaU3 qKPQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature :dkim-filter:arc-filter:dmarc-filter:delivered-to:dkim-filter; bh=X0hLazP+u4kjXReR6ot8MpbU3Axr79QLMMDoxM5RboQ=; fh=rJtIiWzkCr5V2GvQGQWdJX+wkLY3kEXmUtQZbZqt0f0=; b=SR03VXOmUOF81kiJWiG/242xy2eKGuIzJZ8wfxIU+H0n+TzQzFdRT1tlVJhEh5WOsR GCBkudYvTK5QIy/ALM9OUimTKkBlO58IA1adbTL924PZbfhlfwWmt8ZJmMWWzNT8nzWo hcnu8tliYauLLuhCVRXGHLeCdjxzNNgRXz7m1nFkUOVhbyhrYA5WDKRvsCoc4d2Dkhs6 xTd8RWEqKXYCGJakFs64L+3U1NOpCqGTxAYAiefRAMPOjXZ276D9UOTjMUxGT6uXrMO5 ns8hNlpAcjEp7Jx/SFLKB9cUc0o2viYf5sfj9w8f54U/SVhwR+AxpgUvAim2GW2DKT8C fwew==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=PHfLuKiU; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="libc-alpha-bounces~patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id 6a1803df08f44-6dd1825316esi74010656d6.307.2024.12.21.14.35.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Dec 2024 14:35:19 -0800 (PST) Received-SPF: pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=PHfLuKiU; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="libc-alpha-bounces~patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A5BEF385841F for ; Sat, 21 Dec 2024 22:35:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A5BEF385841F Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=PHfLuKiU X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pl1-x630.google.com (mail-pl1-x630.google.com [IPv6:2607:f8b0:4864:20::630]) by sourceware.org (Postfix) with ESMTPS id 01F0F3858D3C for ; Sat, 21 Dec 2024 22:34:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 01F0F3858D3C Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 01F0F3858D3C Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::630 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1734820441; cv=none; b=NeaSi/FjUCBfhQS0CWdGT2RMGWSzGMGLFgsVWqg/PhGdZOB6xmPB+lo4fLgq4Vl+rwiJnvj/KE5UXpyWFgPJvfeVNasxluFgq3ZeTPleFgmC3sgO94dloojW9v3SdQQJjZNGzzBdN3ITLwq4mTjb/KsXLBYq0/jq+eUR/sspyzU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1734820441; c=relaxed/simple; bh=Q+DxqOk2yuv0FqYU1a10d1oQtb/VaPCKBAlv4A1h/lU=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=oYXP6714TBBtp8Q299h8HdjIukO+PLHM2AWAVYJIu6vSJmYmcRaqrKsFcA4/SNSCNBcOBW8/eR250uyi96Kg6VekNYFKhMBiSPpbUAEe1bdssqzEggRH5BfzpWq52eApT507deEq77Jeo+d8k2lOfSm7jZr9t8KOF042CJYeLF0= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 01F0F3858D3C Received: by mail-pl1-x630.google.com with SMTP id d9443c01a7336-2167141dfa1so27849545ad.1 for ; Sat, 21 Dec 2024 14:34:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734820440; x=1735425240; darn=sourceware.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=X0hLazP+u4kjXReR6ot8MpbU3Axr79QLMMDoxM5RboQ=; b=PHfLuKiUcflJ6PiOepv0sN3PqcuNBqz0u9D6ckP4mezv8gvHLieDTv7RNUE6tmh9En cZthe/HOJfyTZXt4HvSbCJ8e3DjiodQd6rQoP2TCl3vkQ4wVeFiP7WYr+4rjYvhI0rcH IIQxh4i9vl6BCXk7jSzpPyE1qHYWo5dNjzfbMY+2TIgCGZMBIRxRCodD2xxbR+2Gza9y XUyz4U/drAJMK4HFBzO7ad9BvwyNfGBPjzwEdW/P+HNKlkQeMg+RKCMYzsTAd52etpQY wwaBU7sHnY/09hT7iuMn7mjUqbSJZeX+q00UYHXmUD5rSHIrp00yxWMOkAs9KLuU6Y7j ABiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734820440; x=1735425240; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=X0hLazP+u4kjXReR6ot8MpbU3Axr79QLMMDoxM5RboQ=; b=o2thV/6wNpZVpBVJRCr9SCrTSVOvHN+P+eRH8mnAngHp6tNonlTSH9hwvZW1GvdQFw LI9GYmnBDt6pIVh/0Z+dFF4TAaMKINHORUn2ZM3SiC0SJeBvCuZuz26GmoHuxM4RFMMU HzC64RnF+WjQXfRWdpNYZt8eDihe0ecjGu/pI2UKmhQfosLzveVCAASt24nKEODX9Dhn Y36bj1yHTEO78qzpWDkKCMsQAwb7TS4bx6t+YSxtSXhw9ZFvkFd7WkduC33RuUC1mQSj hB/GwZ0vT+txXC7Z1d3T0IUuPOnODOW7t+LPLf2WE7/YXhuzT7Qy6g3zXEdr45oJKQo2 tTWg== X-Gm-Message-State: AOJu0Yz8erdTsfASEl+F90DVt3teMeuSlbBDe8duYzjXpsU2GZH0Uksk ss1qznCsX869c7cNcGtYImoGlslt4kMfRuTFIMghBqFx/zwCd3Q+ugYfcXz5KQ/JmQ== X-Gm-Gg: ASbGncucihjq6okNfWR+8ATCtFl+hjPePHetfQzQqH5k6hlp1WGTzZJ2Emv2iPkiApP TUTlu5q0ulvIQAv4RGrBgiBZs9cSiXF/Myu3jrJqQRS3hGG/VzbCITMEIUspGdpN+z5Pdk9OBoN d1mPR9a5DsReA3gazyAAMvDjGjtQWJ3FjXVQzvVIQ9eNnWCI09TYkL3hQiOpj9+sB0KYFWI9GfN BtIoRnTMbVAj2x9SvysV/a0h+arSYws6UfxSC2AHCuLBAWPE/nureUCq1TP9fIgf3RjZqI= X-Received: by 2002:a17:902:f54e:b0:215:a808:61cf with SMTP id d9443c01a7336-219e6d6ac7fmr126352315ad.25.1734820439781; Sat, 21 Dec 2024 14:33:59 -0800 (PST) Received: from gnu-tgl-3.localdomain ([120.204.185.181]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-219dc972734sm48546495ad.88.2024.12.21.14.33.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Dec 2024 14:33:59 -0800 (PST) Received: from gnu-tgl-3.lan (localhost [IPv6:::1]) by gnu-tgl-3.localdomain (Postfix) with ESMTP id 05BBBC028A; Sun, 22 Dec 2024 06:33:58 +0800 (CST) From: "H.J. Lu" To: libc-alpha@sourceware.org Cc: Adhemerval Zanella Subject: [PATCH] Handle pragma GCC optimize for clang Date: Sun, 22 Dec 2024 06:33:55 +0800 Message-ID: <20241221223355.754081-1-hjl.tools@gmail.com> X-Mailer: git-send-email 2.47.1 MIME-Version: 1.0 X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces~patch=linaro.org@sourceware.org From: Adhemerval Zanella For Clang, use #pragma clang optimize off instead of #pragma GCC optimize("O0") --- libio/tst-bz24051.c | 6 +++++- libio/tst-bz24153.c | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/libio/tst-bz24051.c b/libio/tst-bz24051.c index a9903f20a3..2d32aae74a 100644 --- a/libio/tst-bz24051.c +++ b/libio/tst-bz24051.c @@ -19,7 +19,11 @@ /* Prevent putchar -> _IO_putc inline expansion. */ #define __NO_INLINE__ -#pragma GCC optimize("O0") +#ifdef __clang__ +# pragma clang optimize off +#else +# pragma GCC optimize("O0") +#endif #include #include diff --git a/libio/tst-bz24153.c b/libio/tst-bz24153.c index 023f07ca20..c379876fcc 100644 --- a/libio/tst-bz24153.c +++ b/libio/tst-bz24153.c @@ -18,7 +18,11 @@ /* Prevent getchar -> getc inline expansion. */ #define __NO_INLINE__ -#pragma GCC optimize ("O0") +#ifdef __clang__ +# pragma clang optimize off +#else +# pragma GCC optimize("O0") +#endif #include #include