public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] x86: Fix tst-ifunc-isa-* build when gcc ifunc support is not enabled
@ 2021-03-23 22:48 Samuel Thibault
  2021-03-23 23:09 ` H.J. Lu
  0 siblings, 1 reply; 3+ messages in thread
From: Samuel Thibault @ 2021-03-23 22:48 UTC (permalink / raw)
  To: libc-alpha; +Cc: Samuel Thibault, commit-hurd

---
 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
    <https://www.gnu.org/licenses/>.  */
 
+#include <config.h>
+
+#ifdef HAVE_GCC_IFUNC
+
 #include <stdlib.h>
 #include "tst-ifunc-isa.h"
 
@@ -27,4 +31,17 @@ do_test (void)
   return value == expected ? EXIT_SUCCESS : EXIT_FAILURE;
 }
 
+#else  /* !HAVE_GCC_IFUNC */
+
+#include <support/check.h>
+
+static int
+do_test (void)
+{
+  FAIL_UNSUPPORTED ("GCC does not support the ifunc attribute");
+  return 1;                     /* Not reachable.  */
+}
+
+#endif  /* !HAVE_GCC_IFUNC */
+
 #include <support/test-driver.c>
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
    <https://www.gnu.org/licenses/>.  */
 
+#include <config.h>
+
+#ifdef HAVE_GCC_IFUNC
+
 #include <stdlib.h>
 #include "tst-ifunc-isa.h"
 #include <support/test-driver.h>
@@ -31,4 +35,17 @@ do_test (void)
   return value == sse2 ? EXIT_SUCCESS : EXIT_FAILURE;
 }
 
+#else  /* !HAVE_GCC_IFUNC */
+
+#include <support/check.h>
+
+static int
+do_test (void)
+{
+  FAIL_UNSUPPORTED ("GCC does not support the ifunc attribute");
+  return 1;                     /* Not reachable.  */
+}
+
+#endif  /* !HAVE_GCC_IFUNC */
+
 #include <support/test-driver.c>
-- 
2.30.2


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] x86: Fix tst-ifunc-isa-* build when gcc ifunc support is not enabled
  2021-03-23 22:48 [PATCH] x86: Fix tst-ifunc-isa-* build when gcc ifunc support is not enabled Samuel Thibault
@ 2021-03-23 23:09 ` H.J. Lu
  2021-03-24  0:17   ` Samuel Thibault
  0 siblings, 1 reply; 3+ messages in thread
From: H.J. Lu @ 2021-03-23 23:09 UTC (permalink / raw)
  To: Samuel Thibault; +Cc: GNU C Library, commit-hurd

On Tue, Mar 23, 2021 at 3:49 PM Samuel Thibault
<samuel.thibault@ens-lyon.org> wrote:
>
> ---
>  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
>     <https://www.gnu.org/licenses/>.  */
>
> +#include <config.h>
> +
> +#ifdef HAVE_GCC_IFUNC
> +
>  #include <stdlib.h>
>  #include "tst-ifunc-isa.h"
>
> @@ -27,4 +31,17 @@ do_test (void)
>    return value == expected ? EXIT_SUCCESS : EXIT_FAILURE;
>  }
>
> +#else  /* !HAVE_GCC_IFUNC */
> +
> +#include <support/check.h>
> +
> +static int
> +do_test (void)
> +{
> +  FAIL_UNSUPPORTED ("GCC does not support the ifunc attribute");
> +  return 1;                     /* Not reachable.  */
> +}
> +
> +#endif  /* !HAVE_GCC_IFUNC */
> +
>  #include <support/test-driver.c>

Can you add LIBC_CONFIG_VAR with have-gcc-ifunc to skip
these tests?


-- 
H.J.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] x86: Fix tst-ifunc-isa-* build when gcc ifunc support is not enabled
  2021-03-23 23:09 ` H.J. Lu
@ 2021-03-24  0:17   ` Samuel Thibault
  0 siblings, 0 replies; 3+ messages in thread
From: Samuel Thibault @ 2021-03-24  0:17 UTC (permalink / raw)
  To: H.J. Lu; +Cc: GNU C Library, commit-hurd

H.J. Lu, le mar. 23 mars 2021 16:09:18 -0700, a ecrit:
> Can you add LIBC_CONFIG_VAR with have-gcc-ifunc to skip
> these tests?

Ok, and ifuncmain9 can use it as well.

Samuel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-03-24  0:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-23 22:48 [PATCH] x86: Fix tst-ifunc-isa-* build when gcc ifunc support is not enabled Samuel Thibault
2021-03-23 23:09 ` H.J. Lu
2021-03-24  0:17   ` Samuel Thibault

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).