https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125362

            Bug ID: 125362
           Summary: [16 Regression] Missing
                    common/config/loongarch/cpu-features.h in installed
                    GCC plugin headers for LoongArch
           Product: gcc
           Version: 16.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: wszqkzqk at qq dot com
  Target Milestone: ---

Target: loongarch64-unknown-linux-gnu
Host: loongarch64-unknown-linux-gnu

When compiling `linux-hardened` with GCC 16.1.0, the build fails with a missing
header error:

```
In file included from
/usr/lib/gcc/loongarch64-unknown-linux-gnu/16.1.1/plugin/include/tm_p.h:4,
                 from scripts/gcc-plugins/gcc-common.h:19,
                 from scripts/gcc-plugins/stackleak_plugin.c:30:
/usr/lib/gcc/loongarch64-unknown-linux-gnu/16.1.1/plugin/include/config/loongarch/loongarch-protos.h:25:10:
fatal error: common/config/loongarch/cpu-features.h: No such file or directory
   25 | #include "common/config/loongarch/cpu-features.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```

The header cpu-features.h exists in the GCC source tree under
gcc/common/config/loongarch/, but it is not installed into the plugin include
directory during make install-plugin. This breaks compilation of any GCC plugin
that includes standard target headers.

Reply via email to