-
Bug
-
Resolution: Won't Fix
-
P4
-
25
-
riscv
-
linux
I found that linux-riscv cross build fails after JDK-8345627.
The riscv-cross gcc compiler version is gcc14, and native gcc is gcc10.
During configure stage it will check cross-gcc support -ftrivial-auto-var-init=pattern gcc option or not. But during make stage, it will invoke /usr/bin/cc to generate build/linux-riscv64-server-fastdebug/buildjdk/hotspot/variant-server/libjvm/objs/precompiled/precompiled.hpp.gch with gcc option -ftrivial-auto-var-init=pattern, but the native gcc10 do not support this option.
Cross gcc version:
# ../riscv64-gcc14-glibc2.37/bin/riscv64-unknown-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=../riscv64-gcc14-glibc2.37/bin/riscv64-unknown-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/tmp/tone/run/jtreg/riscv64-gcc14-glibc2.37/bin/../libexec/gcc/riscv64-unknown-linux-gnu/14.2.1/lto-wrapper
Target: riscv64-unknown-linux-gnu
Configured with: /home/yansendao/git/riscv-gnu-toolchain/gcc/configure --target=riscv64-unknown-linux-gnu --prefix=/home/yansendao/software/riscv64-gcc14-glibc2.37 --with-sysroot=/home/yansendao/software/riscv64-gcc14-glibc2.37/sysroot --with-pkgversion=gc6c8455e59b --with-system-zlib --enable-shared --enable-tls --enable-languages=c,c++,fortran --disable-libmudflap --disable-libssp --disable-libquadmath --disable-libsanitizer --disable-nls --disable-bootstrap --src=.././gcc --disable-default-pie --disable-multilib --with-abi=lp64d --with-arch=rv64imafdc --with-tune=rocket --with-isa-spec=20191213 'CFLAGS_FOR_TARGET=-O2 -mcmodel=medlow' 'CXXFLAGS_FOR_TARGET=-O2 -mcmodel=medlow'
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.2.1 20241010 (gc6c8455e59b)
Native gcc version:
# /usr/bin/gcc -v
Using built-in specs.
COLLECT_GCC=/usr/bin/gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/10/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --disable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl --enable-gnu-indirect-function --enable-cet --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 10.2.1 20200825 (Alibaba 10.2.1-3.8 2.32) (GCC)
The riscv-cross gcc compiler version is gcc14, and native gcc is gcc10.
During configure stage it will check cross-gcc support -ftrivial-auto-var-init=pattern gcc option or not. But during make stage, it will invoke /usr/bin/cc to generate build/linux-riscv64-server-fastdebug/buildjdk/hotspot/variant-server/libjvm/objs/precompiled/precompiled.hpp.gch with gcc option -ftrivial-auto-var-init=pattern, but the native gcc10 do not support this option.
Cross gcc version:
# ../riscv64-gcc14-glibc2.37/bin/riscv64-unknown-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=../riscv64-gcc14-glibc2.37/bin/riscv64-unknown-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/tmp/tone/run/jtreg/riscv64-gcc14-glibc2.37/bin/../libexec/gcc/riscv64-unknown-linux-gnu/14.2.1/lto-wrapper
Target: riscv64-unknown-linux-gnu
Configured with: /home/yansendao/git/riscv-gnu-toolchain/gcc/configure --target=riscv64-unknown-linux-gnu --prefix=/home/yansendao/software/riscv64-gcc14-glibc2.37 --with-sysroot=/home/yansendao/software/riscv64-gcc14-glibc2.37/sysroot --with-pkgversion=gc6c8455e59b --with-system-zlib --enable-shared --enable-tls --enable-languages=c,c++,fortran --disable-libmudflap --disable-libssp --disable-libquadmath --disable-libsanitizer --disable-nls --disable-bootstrap --src=.././gcc --disable-default-pie --disable-multilib --with-abi=lp64d --with-arch=rv64imafdc --with-tune=rocket --with-isa-spec=20191213 'CFLAGS_FOR_TARGET=-O2 -mcmodel=medlow' 'CXXFLAGS_FOR_TARGET=-O2 -mcmodel=medlow'
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.2.1 20241010 (gc6c8455e59b)
Native gcc version:
# /usr/bin/gcc -v
Using built-in specs.
COLLECT_GCC=/usr/bin/gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/10/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --disable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl --enable-gnu-indirect-function --enable-cet --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 10.2.1 20200825 (Alibaba 10.2.1-3.8 2.32) (GCC)
- relates to
-
JDK-8345627 [REDO] Use gcc12 -ftrivial-auto-var-init=pattern in debug builds
-
- Resolved
-