riscv64环境使用gcc13编译报错k_rem_pio2.c:305:24: error: 'fq' may be used uninitialized [-Werror=maybe-uninitialized]
Closed this issue · 3 comments
sendaoYan commented
Steps to Reproduce
Steps to reproduce the behavior:
/usr/bin/gcc -MMD -MF /home/yansendao/git/dragonwell11/build/linux-riscv64-normal-server-release/support/native/java.base/libfdlibm/k_rem_pio2.d.tmp -fpch-preprocess -I/home/yansendao/git/dragonwell11/build/linux-riscv64-normal-server-release/support/modules_include/java.base -I/home/yansendao/git/dragonwell11/build/linux-riscv64-normal-server-release/support/modules_include/java.base/linux -I/home/yansendao/git/dragonwell11/src/java.base/share/native/libjava -I/home/yansendao/git/dragonwell11/src/java.base/unix/native/libjava -I/home/yansendao/git/dragonwell11/src/hotspot/share/include -I/home/yansendao/git/dragonwell11/src/hotspot/os/posix/include -pipe -fstack-protector -DLIBC=gnu -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DLINUX -DNDEBUG -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wno-stringop-overflow -Wno-stringop-truncation -Wformat=2 -fmacro-prefix-map=/home/yansendao/git/dragonwell11/= -fno-strict-aliasing -D_LITTLE_ENDIAN '-DARCH="riscv64"' -Driscv64 -D_LP64=1 -fno-omit-frame-pointer -fno-delete-null-pointer-checks -fno-lifetime-dse -fPIC -fvisibility=hidden -I/home/yansendao/git/dragonwell11/src/java.base/share/native/libfdlibm -ffp-contract=off -g -DLIBRARY_NAME=fdlibm -Wno-sign-compare -Wno-misleading-indentation -Wno-array-bounds -Werror -O2 -c -o /home/yansendao/git/dragonwell11/build/linux-riscv64-normal-server-release/support/native/java.base/libfdlibm/k_rem_pio2.o /home/yansendao/git/dragonwell11/src/java.base/share/native/libfdlibm/k_rem_pio2.c
Expected behavior
riscv-port-jdk11u代码仓使用gcc13正常编译&链接
Execution environment
uname -a ; cat /etc/os-release ; free -h ; lscpu | head -n 25 ; java -version ; java -Xinternalversion
Linux fedora-riscv 6.1.31 #1 SMP Thu Jun 15 01:30:00 CST 2023 riscv64 GNU/Linux
NAME="Fedora Linux"
VERSION="38 (Workstation Edition)"
ID=fedora
VERSION_ID=38
VERSION_CODENAME=""
PLATFORM_ID="platform:f38"
PRETTY_NAME="Fedora Linux 38 (Workstation Edition)"
ANSI_COLOR="0;38;2;60;110;180"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:38"
DEFAULT_HOSTNAME="fedora"
HOME_URL="https://fedoraproject.org/"
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f38/system-administrators-guide/"
SUPPORT_URL="https://ask.fedoraproject.org/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=38
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=38
SUPPORT_END=2024-05-14
VARIANT="Workstation Edition"
VARIANT_ID=workstation
total used free shared buff/cache available
Mem: 125Gi 1.4Gi 99Gi 22Mi 25Gi 123Gi
Swap: 8.0Gi 0B 8.0Gi
Architecture: riscv64
Byte Order: Little Endian
CPU(s): 64
On-line CPU(s) list: 0-63
NUMA node(s): 4
NUMA node0 CPU(s): 0-7,16-23
NUMA node1 CPU(s): 8-15,24-31
NUMA node2 CPU(s): 32-39,48-55
NUMA node3 CPU(s): 40-47,56-63
openjdk version "17.0.6" 2023-01-17
OpenJDK Runtime Environment (Red_Hat-17.0.6.0.10-1.rv64.fc38) (build 17.0.6+10)
OpenJDK 64-Bit Zero VM (Red_Hat-17.0.6.0.10-1.rv64.fc38) (build 17.0.6+10, interpreted mode)
OpenJDK 64-Bit Zero VM (17.0.6+10) for linux-riscv64 JRE (17.0.6+10), built on Apr 26 2023 00:00:00 by "mockbuild" with gcc 13.0.1 20230404 (Red Hat 13.0.1-0)
sendaoYan commented
riscv-port-jdk11u该文件编译命令:
/usr/bin/gcc -MMD -MF /home/yansendao/git/riscv-port-jdk11u/build/linux-riscv64-normal-server-release/support/native/java.base/libfdlibm/k_rem_pio2.d.tmp -fpch-preprocess -I/home/yansendao/git/riscv-port-jdk11u/build/linux-riscv64-normal-server-release/support/modules_include/java.base -I/home/yansendao/git/riscv-port-jdk11u/build/linux-riscv64-normal-server-release/support/modules_include/java.base/linux -I/home/yansendao/git/riscv-port-jdk11u/src/java.base/share/native/libjava -I/home/yansendao/git/riscv-port-jdk11u/src/java.base/unix/native/libjava -I/home/yansendao/git/riscv-port-jdk11u/src/hotspot/share/include -I/home/yansendao/git/riscv-port-jdk11u/src/hotspot/os/posix/include -pipe -fstack-protector -DLIBC=gnu -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DLINUX -DNDEBUG -fmacro-prefix-map=/home/yansendao/git/riscv-port-jdk11u/= -fno-strict-aliasing -D_LITTLE_ENDIAN '-DARCH="riscv64"' -Driscv64 -D_LP64=1 -fno-omit-frame-pointer -fno-delete-null-pointer-checks -fno-lifetime-dse -fPIC -fvisibility=hidden -I/home/yansendao/git/riscv-port-jdk11u/src/java.base/share/native/libfdlibm -ffp-contract=off -g -DLIBRARY_NAME=fdlibm -Wno-sign-compare -Wno-misleading-indentation -Wno-array-bounds -Werror -O2 -c -o /home/yansendao/git/riscv-port-jdk11u/build/linux-riscv64-normal-server-release/support/native/java.base/libfdlibm/k_rem_pio2.o /home/yansendao/git/riscv-port-jdk11u/src/java.base/share/native/libfdlibm/k_rem_pio2.c
相比dragonwell11少了几个选项:
-Wall
-Wextra
-Wno-unused
-Wno-unused-parameter
-Wno-stringop-overflow
-Wno-stringop-truncation
-Wformat=2
sendaoYan commented
在aarch64平台上同样编译报错
make-aarch64.log
sendaoYan commented
在上游的backport PR里跟踪,这里不再跟踪