[Bug libc/26124] New: Export <cpu-features.h>

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug libc/26124] New: Export <cpu-features.h>

Sourceware - glibc-bugs mailing list
https://sourceware.org/bugzilla/show_bug.cgi?id=26124

            Bug ID: 26124
           Summary: Export <cpu-features.h>
           Product: glibc
           Version: 2.32
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
          Assignee: unassigned at sourceware dot org
          Reporter: hjl.tools at gmail dot com
                CC: drepper.fsp at gmail dot com
  Target Milestone: ---

I got user requests to export <cpu-features.h> so that people can do

#if __has_include(<cpu-features.h>)
#include <cpu-features.h>
#endif
...

   if (HAS_CPU_FEATURE (SSE3))
...
   if (CPU_FEATURE_USABLE (SSE3))
...

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug libc/26124] Export <cpu-features.h>

Sourceware - glibc-bugs mailing list
https://sourceware.org/bugzilla/show_bug.cgi?id=26124

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
              Flags|                            |security-
                 CC|                            |fweimer at redhat dot com

--- Comment #1 from Florian Weimer <fweimer at redhat dot com> ---
GCC already has this as __builtin_cpu_supports. Why isn't that sufficient?

GCC support is desirable so that GCC can turn the expression into a true value
at compile time if the CPU feature is required by the current compilation
environment.

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug libc/26124] Export <cpu-features.h>

Sourceware - glibc-bugs mailing list
In reply to this post by Sourceware - glibc-bugs mailing list
https://sourceware.org/bugzilla/show_bug.cgi?id=26124

--- Comment #2 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Florian Weimer from comment #1)
> GCC already has this as __builtin_cpu_supports. Why isn't that sufficient?
>
> GCC support is desirable so that GCC can turn the expression into a true
> value at compile time if the CPU feature is required by the current
> compilation environment.

__builtin_cpu_supports only supports a subset of <cpu-features.h>.

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug libc/26124] Export <cpu-features.h>

Sourceware - glibc-bugs mailing list
In reply to this post by Sourceware - glibc-bugs mailing list
https://sourceware.org/bugzilla/show_bug.cgi?id=26124

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |2.32

--- Comment #3 from H.J. Lu <hjl.tools at gmail dot com> ---
A patch is posted at

https://sourceware.org/pipermail/libc-alpha/2020-June/115158.html

--
You are receiving this mail because:
You are on the CC list for the bug.
Reply | Threaded
Open this post in threaded view
|

[Bug libc/26124] Export <cpu-features.h>

Sourceware - glibc-bugs mailing list
In reply to this post by Sourceware - glibc-bugs mailing list
https://sourceware.org/bugzilla/show_bug.cgi?id=26124

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|2.32                        |2.33
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #4 from H.J. Lu <hjl.tools at gmail dot com> ---
Fixed in 2.33 by

commit 9620398097de3981c1adf5233e2b3478d36bc1b3
Author: H.J. Lu <[hidden email]>
Date:   Mon Jun 29 18:30:54 2020 -0700

    x86: Install <sys/platform/x86.h> [BZ #26124]

--
You are receiving this mail because:
You are on the CC list for the bug.