From patchwork Fri Dec 13 07:13:07 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 102960 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id DDD853858C32 for ; Fri, 13 Dec 2024 07:17:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DDD853858C32 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=TCR7wV7C X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-oi1-x229.google.com (mail-oi1-x229.google.com [IPv6:2607:f8b0:4864:20::229]) by sourceware.org (Postfix) with ESMTPS id E4A7C3858403 for ; Fri, 13 Dec 2024 07:13:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E4A7C3858403 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 E4A7C3858403 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::229 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1734074000; cv=none; b=xAxVseOPfv6AxYpqOPtR0FC+NOp0uZTJSbzoyYZC26g6NQ5RoqErEHMxt1pazqokx9Qc3K5cNBAP/4RqMZOj4WmMMcdeydwMAXyI/2di67X5mSVPVYbfu9/DFAmIGbvS8AAPnBpCfoOJsRvhm/xBY9Gwf35/KIBJuKPQmh7uqsA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1734074000; c=relaxed/simple; bh=eOdMEb+wzRf47V1d9ABJntsTcmF5zS6vfU4oYJEcLyE=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=TN2wmRVoYNl9i8xm/Yq+3sYe+RpCIckcM19vKXUZSDIlg7Li5ERpUyLtwwYrV5sujwOAqbVtWovVHV6jbgzYU3cRe2LK/S9ZUyBaFqq9qUeekdF0haIoE+Po3Q3HtVfPIWB2ci1eZSKXqOe5FhRNe4MR8kWmqFleXlfOUNsf06Q= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E4A7C3858403 Received: by mail-oi1-x229.google.com with SMTP id 5614622812f47-3eb880e5ac2so728183b6e.2 for ; Thu, 12 Dec 2024 23:13:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734073999; x=1734678799; 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=hNrLuZ/vHF06fnWMKYnjJDYlUc3CpKYbwP8vQTfrlTU=; b=TCR7wV7ChgNcbDm1ZbKzNll9RI1Nd6nMdBtWLgyBqVVJSe2CjLrt/w/+gEg486Htd1 MUfWAxWxieHDLS+M7ockAEsYRBZUCaVnTQwMASfa/5CBzFs8IQjVCLqQ8ZPwsC0zxsui TE4/DXOj2XMdJG/nCQ8VkdR2r6VrnwHMyg4qU8wVDolas4FXcnC9U7LnXEArVSn9jiW0 32chjNrbm0Ut9v199srAb0KkwdPbOuWrChVYzjnXOZrBzwM2MWGi7xaWBDavb6PwCAYs cLbcVQ+Cjir7MGNV5jfZpzVTkMEjhecMu8hjwYNHdRtfiAcutZBUf0ke2KpgXTNHPwfa m6KA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734073999; x=1734678799; 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=hNrLuZ/vHF06fnWMKYnjJDYlUc3CpKYbwP8vQTfrlTU=; b=GoFtYsgB+a3NS0MkdAkZCyFHw0uSrXewGgYH3p+EQT8U6bWyRJ1AvZKrJJmAiI7+r3 I6DchB4+JpGKz+K3axi/wxvX19+uQWxrvpOEFkWlpzyMzcz2qRVjrN1WsQXpzY9Pf1Q8 biqOKLedRDAhfhDHbGKwC/LQkhVhHJFGutg57BkHC2WErNoYg5vMCnfvBDzeyqEdZE2V 7OQVoUH+ufHkqERRHUgD968bqztGDBkdm6hD24/kPMwLJ2zPup6dQeg3jCGVBK1n1QGC qPXjJoC0RUz7qdQ3kAyNMg8CGJjBNk3yvYgtV763sLZXwC0nESXtuqH2ujY9A010R8lk uRRQ== X-Gm-Message-State: AOJu0Yy5wBoHnzxky37rdwJ+R6pLryIR9fTtGY2KfFBL6P0GmfolTYdm xTiTxokQUU0jNUiLq0m4BMODQjBOPBgw2Ler7bjwbYigHgX8ScNVPWJB7Ib/NmJ6b3Dj X-Gm-Gg: ASbGncvuAr+KOJUZW1i38Xu1xoa7q7Bv6aT3jx6THRp/CQm2zsSU+TZSqtK/VrwtbHM 0x/uvW21EcU4KvAwiKhU2oet1Wi1ssKifYRfPOxIUMqoVDpw1kwX9jCAAky6R6Iqx5WjMWNPri7 /kamr4TFAeBDAaGas0t/CqOOFN93/MBySK4PRQLK9P7HFaLHnqyUMJcQo07rNORXnfNLscZzZxn a+xxdYWsgjy4iZZXSTumQrIzetWCS2pqiUFd55SS+6SfzS3riumi5nAHrfiByaywr/nME/HnZCK zCkk0FV9ugUfkjGzYTOuqhVlUufYi2mya/OhEXBzfjuA X-Google-Smtp-Source: AGHT+IHbPYr5B049CAvr6OFJvPPlUFPitTZUbz/+0otd5qGXA0x6F7/+hhSv+5VN0Y53zfLLCfMF1Q== X-Received: by 2002:a05:6808:14c5:b0:3e6:5f3:f0d8 with SMTP id 5614622812f47-3eba6891db3mr816114b6e.24.1734073999210; Thu, 12 Dec 2024 23:13:19 -0800 (PST) Received: from gnu-tgl-3.localdomain ([172.58.27.218]) by smtp.gmail.com with ESMTPSA id 5614622812f47-3eb92a7b0c0sm895998b6e.19.2024.12.12.23.13.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 12 Dec 2024 23:13:18 -0800 (PST) Received: from gnu-tgl-3.. (localhost [IPv6:::1]) by gnu-tgl-3.localdomain (Postfix) with ESMTP id 1B37EC055E; Fri, 13 Dec 2024 15:13:11 +0800 (CST) From: "H.J. Lu" To: libc-alpha@sourceware.org Cc: sam@gentoo.org Subject: [PATCH 07/10] Return EXIT_UNSUPPORTED if __builtin_mul_overflow unavailable Date: Fri, 13 Dec 2024 15:13:07 +0800 Message-ID: <20241213071310.2054769-8-hjl.tools@gmail.com> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241213071310.2054769-1-hjl.tools@gmail.com> References: <20241213071310.2054769-1-hjl.tools@gmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-3019.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP 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: 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~patchwork=sourceware.org@sourceware.org Since GCC 4.9 doesn't support __builtin_mul_overflow: tst-fd_to_filename.c: In function ‘check_ranges’: tst-fd_to_filename.c:51:3: error: implicit declaration of function ‘__builtin_mul_overflow’ [-Werror=implicit-function-declaration] while (!__builtin_mul_overflow (power, base, &power)); ^ cc1: all warnings being treated as errors return EXIT_UNSUPPORTED for GCC 4.9 or older. Signed-off-by: H.J. Lu Reviewed-by: Sam James --- misc/tst-fd_to_filename.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/misc/tst-fd_to_filename.c b/misc/tst-fd_to_filename.c index acbba69d69..37b31034ed 100644 --- a/misc/tst-fd_to_filename.c +++ b/misc/tst-fd_to_filename.c @@ -17,6 +17,7 @@ . */ #include +#if __GNUC_PREREQ (5, 0) #include #include #include @@ -99,3 +100,12 @@ do_test (void) } #include +#else +#include + +int +main (void) +{ + return EXIT_UNSUPPORTED; +} +#endif