RFR: 8348207: Linux PPC64 PCH build broken after JDK-8347909

David Holmes dholmes at openjdk.org
Fri Jan 24 06:30:48 UTC 2025


On Thu, 23 Jan 2025 23:53:01 GMT, Magnus Ihse Bursie <ihse at openjdk.org> wrote:

>> The Linux PPC64 PCH build was broken after JDK-8347909.
>> Build error
>> 
>> * For target hotspot_variant-server_libjvm_objs_sharedRuntimeTrans.o:
>> cc1plus: error: /jdk25_opt/hotspot/variant-server/libjvm/objs/precompiled/precompiled.hpp.gch: created and used with differing settings of '-mpower8-fusion-sign' [-Werror=invalid-pch]
>> cc1plus: error: one or more PCH files were found, but they were invalid
>> <command-line>: fatal error: precompiled.hpp: No such file or directory
>> 
>> * For target hotspot_variant-server_libjvm_objs_sharedRuntimeTrig.o:
>> cc1plus: error: /jdk25_opt/hotspot/variant-server/libjvm/objs/precompiled/precompiled.hpp.gch: created and used with differing settings of '-mpower8-fusion-sign' [-Werror=invalid-pch]
>> cc1plus: error: one or more PCH files were found, but they were invalid
>> <command-line>: fatal error: precompiled.hpp: No such file or directory
>> 
>> 
>> There was a mismatch of the build settings of  precompiled.hpp.gch and these 2 compilation units leading to this error;  the PCH build exclusion of these 2 files did not work.
>
> make/hotspot/lib/JvmOverrideFiles.gmk line 61:
> 
>> 59:       sharedRuntimeTrig.cpp \
>> 60:       sharedRuntimeTrans.cpp \
>> 61:       $(OPT_SPEED_SRC) \
> 
> Note that OPT_SPEED_SRC contains a rather large set of files. They have previously been compiling using PCH just fine with gcc. I don't think it is motivated to exclude them everywhere, just because gcc on ppc64 has a problem.

I agree with Magnus the files should only be excluded where there is a problem and for PPC the problem can be fixed by using the same `-m` flag (or else fixing the build logic to check for PPC as Magnus has).

As far as I can see PCH has been used with these files on Linux and gcc with no problem for other architectures. I'm still unclear exactly what changed for PPC.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/23268#discussion_r1928149331


More information about the build-dev mailing list