Bug 27958 - fatal error: bits/platform/x86.h: No such file or directory
Summary: fatal error: bits/platform/x86.h: No such file or directory
Status: RESOLVED FIXED
Alias: None
Product: glibc
Classification: Unclassified
Component: libc (show other bugs)
Version: 2.33
: P2 normal
Target Milestone: 2.34
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-06-05 13:40 UTC by H.J. Lu
Modified: 2021-11-25 17:46 UTC (History)
1 user (show)

See Also:
Host:
Target: i386, x86-64
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description H.J. Lu 2021-06-05 13:40:22 UTC
[hjl@gnu-tgl-2 tmp]$ cat x.c
#include <sys/platform/x86.h>
[hjl@gnu-tgl-2 tmp]$ gcc -c x.c
In file included from x.c:1:
/usr/include/sys/platform/x86.h:24:10: fatal error: bits/platform/x86.h: No such file or directory
   24 | #include <bits/platform/x86.h>
      |          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[hjl@gnu-tgl-2 tmp]$
Comment 1 Sourceware Commits 2021-07-23 12:21:21 UTC
The master branch has been updated by H.J. Lu <hjl@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=7c124e3714c38157230ed1a5d743b37defe64dc2

commit 7c124e3714c38157230ed1a5d743b37defe64dc2
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Sat Jun 5 06:42:20 2021 -0700

    x86: Install <bits/platform/x86.h> [BZ #27958]
    
    1. Install <bits/platform/x86.h> for <sys/platform/x86.h> which includes
    <bits/platform/x86.h>.
    2. Rename HAS_CPU_FEATURE to CPU_FEATURE_PRESENT which checks if the
    processor has the feature.
    3. Rename CPU_FEATURE_USABLE to CPU_FEATURE_ACTIVE which checks if the
    feature is active.  There may be other preconditions, like sufficient
    stack space or further setup for AMX, which must be satisfied before the
    feature can be used.
    
    This fixes BZ #27958.
    
    Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Comment 2 H.J. Lu 2021-11-25 17:46:17 UTC
Fixed for 2.34.