RFR: 8341586: RISC-V: build fail with gcc9

SendaoYan syan at openjdk.org
Tue Oct 8 13:16:58 UTC 2024


On Sun, 6 Oct 2024 13:28:30 GMT, SendaoYan <syan at openjdk.org> wrote:

> Hi all,
> The `src/hotspot/cpu/riscv/icache_riscv.cpp` build fails `riscv_flush_icache.cpp:51:29: error: requested alignment 64 is larger than 16 [-Werror=attributes]` with gcc9. Alignment 16 will be enough, though the [NR_riscv_flush_icache syscall](https://github.com/torvalds/linux/blob/master/tools/arch/riscv/include/uapi/asm/unistd.h) doesn't reqiure alignment.
> 
> Addiontional testing:
> 
> - [x] riscv native build with release conf and slowdebug conf
> - [ ] jtreg tier1 tests with release build

I also can't reproduce the build warning with gcc9.4.0. Maybe it's a change from gcc9.2.0 to gcc9.4.0. I will build gcc9.2 and gcc9.4 from source later.


> gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:hsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.4.0-1ubuntu1~20.04.2' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-9-9QDOt0/gcc-9-9.4.0/debian/tmp-nvptx/usr,hsa --without-cuda-driver --enable-checking=release
  --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.2)

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

PR Comment: https://git.openjdk.org/jdk/pull/21376#issuecomment-2399815723


More information about the hotspot-runtime-dev mailing list