From patchwork Tue Mar 23 22:48:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 42762 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 C090C3850416; Tue, 23 Mar 2021 22:49:00 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from hera.aquilenet.fr (hera.aquilenet.fr [185.233.100.1]) by sourceware.org (Postfix) with ESMTPS id 69312385BF9E for ; Tue, 23 Mar 2021 22:48:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 69312385BF9E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=ens-lyon.org Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=samuel.thibault@ens-lyon.org Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 56A20721; Tue, 23 Mar 2021 23:48:56 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id beqMLf4vFlLw; Tue, 23 Mar 2021 23:48:55 +0100 (CET) Received: from begin (unknown [IPv6:2a01:cb19:956:1b00:de41:a9ff:fe47:ec49]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 6C2AA66C; Tue, 23 Mar 2021 23:48:55 +0100 (CET) Received: from samy by begin with local (Exim 4.94) (envelope-from ) id 1lOppW-001Lxb-Do; Tue, 23 Mar 2021 23:48:54 +0100 From: Samuel Thibault To: libc-alpha@sourceware.org Subject: [PATCH] x86: Fix tst-ifunc-isa-* build when gcc ifunc support is not enabled Date: Tue, 23 Mar 2021 23:48:53 +0100 Message-Id: <20210323224853.322700-1-samuel.thibault@ens-lyon.org> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-Spamd-Bar: ++ X-Rspamd-Server: hera Authentication-Results: hera.aquilenet.fr X-Rspamd-Queue-Id: 56A20721 X-Spamd-Result: default: False [2.00 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; R_MISSING_CHARSET(2.50)[]; BROKEN_CONTENT_TYPE(1.50)[]; RCVD_COUNT_THREE(0.00)[3]; MID_CONTAINS_FROM(1.00)[]; RCVD_NO_TLS_LAST(0.10)[]; FROM_EQ_ENVFROM(0.00)[]; BAYES_HAM(-3.00)[100.00%] X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, KAM_SHORT, SPF_HELO_PASS, SPF_NEUTRAL, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: commit-hurd@gnu.org Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" --- sysdeps/x86/tst-ifunc-isa-1.c | 17 +++++++++++++++++ sysdeps/x86/tst-ifunc-isa-2.c | 17 +++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/sysdeps/x86/tst-ifunc-isa-1.c b/sysdeps/x86/tst-ifunc-isa-1.c index 37d599210c..7a58591c79 100644 --- a/sysdeps/x86/tst-ifunc-isa-1.c +++ b/sysdeps/x86/tst-ifunc-isa-1.c @@ -16,6 +16,10 @@ License along with the GNU C Library; if not, see . */ +#include + +#ifdef HAVE_GCC_IFUNC + #include #include "tst-ifunc-isa.h" @@ -27,4 +31,17 @@ do_test (void) return value == expected ? EXIT_SUCCESS : EXIT_FAILURE; } +#else /* !HAVE_GCC_IFUNC */ + +#include + +static int +do_test (void) +{ + FAIL_UNSUPPORTED ("GCC does not support the ifunc attribute"); + return 1; /* Not reachable. */ +} + +#endif /* !HAVE_GCC_IFUNC */ + #include diff --git a/sysdeps/x86/tst-ifunc-isa-2.c b/sysdeps/x86/tst-ifunc-isa-2.c index 0bdf7176fa..20f8724997 100644 --- a/sysdeps/x86/tst-ifunc-isa-2.c +++ b/sysdeps/x86/tst-ifunc-isa-2.c @@ -16,6 +16,10 @@ License along with the GNU C Library; if not, see . */ +#include + +#ifdef HAVE_GCC_IFUNC + #include #include "tst-ifunc-isa.h" #include @@ -31,4 +35,17 @@ do_test (void) return value == sse2 ? EXIT_SUCCESS : EXIT_FAILURE; } +#else /* !HAVE_GCC_IFUNC */ + +#include + +static int +do_test (void) +{ + FAIL_UNSUPPORTED ("GCC does not support the ifunc attribute"); + return 1; /* Not reachable. */ +} + +#endif /* !HAVE_GCC_IFUNC */ + #include