From patchwork Sun Dec 22 00:04:38 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: 852889 Delivered-To: patch@linaro.org Received: by 2002:a5d:4888:0:b0:385:e875:8a9e with SMTP id g8csp2770009wrq; Sat, 21 Dec 2024 16:16:04 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXquX0+caMw6FzLz/mpPPurZ66ItSVL2uDxRMVW2eyMm2qzYA5GDnbVVSpeow3nw8mjeQTjqA==@linaro.org X-Google-Smtp-Source: AGHT+IEpR4sKbxBhlmeDgyJZnoTa2CDkPFu+fOFUOkUNtMvi0iJNBZlA8vYwE24RiK5J/YOH9pdd X-Received: by 2002:a05:622a:1a8d:b0:461:3834:b632 with SMTP id d75a77b69052e-46a4a8b2ae3mr139032941cf.1.1734826563978; Sat, 21 Dec 2024 16:16:03 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1734826563; cv=pass; d=google.com; s=arc-20240605; b=btKJjO460WN88pEKUaVuQLG0bnT+mkBj/4jPRwDV4OMbN0qfKFhc3eGIN3L4SDFEXE vRARvSFPJuyeudNbQLMPTOL+sAd2SM4rTOY3m4WLplOQExZwmR52f5I+3i8SR7/HaKzm AZ3/AgdVy5B55/DblWDpzO9V+xSQFqFWpYkOMQBc6k8zbtS1gcwydMhI+TiNJ2O4um/K fcaLvnacK5oCINQLtZesu1jQ9UHGtM9pMWW4ha5IdagiRKozl6p96DaIK28f2+2/J9E/ 7bFeE0wFzuJ7XFvvBKzxyCkYoUWHCi9rrn+d0cENTd9OsqCyEtngIVyG1L5Tx6wQRgIf bomg== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature:dkim-filter:arc-filter:dmarc-filter :delivered-to:dkim-filter; bh=vGYWUCHG2aq9VEGpS8ZHCD/54yiHzLku+RsbfW2CmB0=; fh=uKlFkH9AUukvL1xmvBA9M7Oe4ntiJIR8HCR4+3TPd4w=; b=Da8LpNkaTpTGRmBuywySRV2ZGUaMrAKm+yM2Ivybe2GVQVbu9i7st+FHqXM9xxEifQ OSnGGlVBmXzbjbyvh5v9Q+3syqzk/IVYjwOuWLU2Jc0LrQWDHol7sERAuxnuG83huzIX VgphUO9w0pE4T+tcYsMAG8gYBRjcfE1wiQfs1/qRJoyyB2l6+sHyMiJooC6eCGiT8LCL +lI3SUdwtJ0r8PfmBk2pWmKRCJUF5sAAdj53G+OoYrEolK+YBK698OsZUnWJmHNj7EI9 WKTVmOj+eHwHcVNn0TGoyfrxsYVW7+EB6LkUj9ThgZp11kFDvV8zUZwn66EmxQyKADVt WvwQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="I/J7nABR"; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 8.43.85.97 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. [8.43.85.97]) by mx.google.com with ESMTPS id af79cd13be357-7b9ac4ce864si852300585a.431.2024.12.21.16.16.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Dec 2024 16:16:03 -0800 (PST) Received-SPF: pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="I/J7nABR"; arc=pass (i=1); spf=pass (google.com: domain of libc-alpha-bounces~patch=linaro.org@sourceware.org designates 8.43.85.97 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 7B21C3858420 for ; Sun, 22 Dec 2024 00:15:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7B21C3858420 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=I/J7nABR X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-pl1-x629.google.com (mail-pl1-x629.google.com [IPv6:2607:f8b0:4864:20::629]) by sourceware.org (Postfix) with ESMTPS id 8F3A9385842C for ; Sun, 22 Dec 2024 00:05:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8F3A9385842C 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 8F3A9385842C Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::629 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1734825924; cv=none; b=ckPa/PDVf77vrBumwBg5CjaCDR4w9wtqQKseRFaTmOoQKzjXsZ5dQTcuSuW1Yu8flz7Ffrkes+Mg3zG05rwRhCxF0bOQnVJBQQBtssyIWvcvXwxANz+0HYRTt5jZ/OT/pylIZNbS1jyVr/Qo1qNWnEdxsA4bVmRnit1+ptI1ESc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1734825924; c=relaxed/simple; bh=ZGeQzaHRrStfFuraCgMLJb2xtsp7ku2iStYGmiaN7pM=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=EcX5xldY7vhzDKvQSwHK8i4axIWX/sydAJ4llctO5pei7ApeUOMKza1QtbxJWK+e3IyaedQMi881GL9ZfvK5h4q5HH9NnMWVHEMh6c/+DcYmVEv/9UwJ+926afdFg69NHBdsiX06NS/C3s7Hh92AMqCJBuF0MBRJnZP+b7qAMKg= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8F3A9385842C Received: by mail-pl1-x629.google.com with SMTP id d9443c01a7336-2166360285dso29243225ad.1 for ; Sat, 21 Dec 2024 16:05:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734825922; x=1735430722; darn=sourceware.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=vGYWUCHG2aq9VEGpS8ZHCD/54yiHzLku+RsbfW2CmB0=; b=I/J7nABR1EOVgPgW/rP1sqO5uIjQHfy1tC8WK3vB5mmcx3d7ODwNQsQK7YdFe99uC2 2TEgDtXtWVjAC8dyfyTh2wBEtbNZ7F12MYeICI/rJ1QZOYhJv9Os4zUcTz9AXH2Bh+7g CUD9HyZGI34xvwea+09vvnuMUgB1VyPHeOik8FW51LndEL5FNBwmYEdZjo8y7XKoZsqA wnPIeJ1OfBJ6OHnGA/7dEMdxPpKNmNfpmWFmCDVMGCBzhZxbk4N5YWyAS+xgCIoMZRFG AWsGaPnFQ9z9jpRkkZgX0bywkTkZz7ys+QduGbapYIjVUvWLkxljhiaP1JvF45V0iwIo Px0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734825922; x=1735430722; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vGYWUCHG2aq9VEGpS8ZHCD/54yiHzLku+RsbfW2CmB0=; b=FsxLTPPVGne8rTIpE0qSBBV20bG9A78em2+K1K+BG7nifKzGw7CiWJSBwjIgAXVlhq EWnl7/bMxogvIie7+9+hu2OOjD1Yeq8k0TzNBRqrfuUXQswcjvARMssqlGsiXYsIvHSp CehgLOxkf77gGQCuTRSgbq6IQonSHW1Nqqkjbbx4MEPizxIPypanMIZPJ0VbGtk2uNwW WVhqJAAwZBwOiqRT3Ior+ipxeGxPT7wKHGurCwT0TMmm46zSkZNlRKXTaIedBcTzfkdD rjohcLd+bZT8/4P8tsP1/ZSnipcjc20APT/K2cnV7eQJ7A1W79FaIwGjI9jYAgtirBeH KVXw== X-Gm-Message-State: AOJu0YxN0n/y0VEBXaEY1NUTw39ZzS8cs5ik06Z6G2gIz/WN3YKfwTtB YUMuQA3t2VVaYe4P/aKmsqMPoCzbb1K/Wdmk/CqhXGeedObQXPCk X-Gm-Gg: ASbGncucQbcGIIMnEmQLWRMNg9lbias++XCl28wmZUM0e25sGm8KmEYU8swmb9NPBpR a2/NCMdunJKsXbAfWtbzR1cHdINEZGQOiVvYHhpGb+XAjYuYn5tgN9N78tQr3qut5kkHcNu/bhc efYYopGW/p4UiJNafISdclZ6HT4XZyY8zpmT56wyLlFO+BdhZw8SXTl+1CjT7iN8HUUtIzElNg+ Yr6hp7wPogIzjdo4KXEqgOeR+NC1V/JJiK60TBLrFZ3nFzOGCaE7QCMB8efgsr8RxJHPpU= X-Received: by 2002:a17:902:f68b:b0:215:b18d:ef with SMTP id d9443c01a7336-219e6eb362amr92980395ad.25.1734825921673; Sat, 21 Dec 2024 16:05:21 -0800 (PST) Received: from gnu-tgl-3.localdomain ([120.204.185.181]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2f363dd7013sm7967844a91.47.2024.12.21.16.05.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Dec 2024 16:05:20 -0800 (PST) Received: from gnu-tgl-3.lan (localhost [IPv6:::1]) by gnu-tgl-3.localdomain (Postfix) with ESMTP id CC946C071F; Sun, 22 Dec 2024 08:05:14 +0800 (CST) From: "H.J. Lu" To: libc-alpha@sourceware.org Cc: sam@gentoo.org, Adhemerval Zanella Subject: [PATCH 15/39] Handle pragma GCC optimize for clang Date: Sun, 22 Dec 2024 08:04:38 +0800 Message-ID: <20241222000509.2205895-16-hjl.tools@gmail.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241222000509.2205895-1-hjl.tools@gmail.com> References: <20241222000509.2205895-1-hjl.tools@gmail.com> 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 Reviewed-by: Sam James --- 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