Closed github-actions[bot] closed 1 day ago
The following issues have been found with 36387-Dont_forceenable_ifuncs_on_RISCV-1 using gcc's ./contrib/check_GNU_style.py. Please use your best judgement when resolving these issues. These are only warnings and do not need to be resolved in order to merge your patch.
Traceback (most recent call last):
File "./gcc/contrib/check_GNU_style.py", line 45, in <module>
main()
File "./gcc/contrib/check_GNU_style.py", line 43, in main
check_GNU_style_file(diff_file, format)
File "/home/runner/work/gcc-precommit-ci/gcc-precommit-ci/riscv-gnu-toolchain/gcc/contrib/check_GNU_style_lib.py", line 279, in check_GNU_style_file
patch = PatchSet(file)
File "/home/runner/.local/lib/python3.8/site-packages/unidiff/patch.py", line 462, in __init__
self._parse(data, encoding=encoding, metadata_only=metadata_only)
File "/home/runner/.local/lib/python3.8/site-packages/unidiff/patch.py", line 552, in _parse
current_file._parse_hunk(line, diff, encoding, metadata_only)
File "/home/runner/.local/lib/python3.8/site-packages/unidiff/patch.py", line 318, in _parse_hunk
raise UnidiffParseError(
unidiff.errors.UnidiffParseError: Hunk diff line expected: sparc*-* | x86_64-* | loongarch*-*)
Target | Status |
---|---|
Baseline hash: https://github.com/gcc-mirror/gcc/commit/d890b04197fb0ddba4fbfb32f88e266fa27e02f3 | Failed |
Tip of tree hash: https://github.com/gcc-mirror/gcc/commit/ebac11afbcb7a52536da5f04fc524b870f5d76e0 | Failed |
> git am ../patches/*.patch --whitespace=fix -q --3way --empty=drop
error: corrupt patch at line 20
error: could not build fake ancestor
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config advice.mergeConflict false"
Patch failed at 0001 Fwd: [PATCH] Don't force-enable ifuncs on RISC-V
---
gcc/config.gcc | 2 +-
gcc/configure | 72 +++++++++++++++++++++++++-----------------------
gcc/configure.ac | 72 +++++++++++++++++++++++++-----------------------
3 files changed, 77 insertions(+), 69 deletions(-)
AC_DEFINE_UNQUOTED(HAVE_GNU_INDIRECT_FUNCTION, $gif,
--
2.34.1
diff --git a/gcc/config.gcc b/gcc/config.gcc
index bc45615741b..012022399f4 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -3687,7 +3687,7 @@ case ${target} in
;;
*-*-linux* | *-*-gnu*)
case ${target} in
- aarch64*-* | arm*-* | i[34567]86-* | powerpc*-* | s390*-* |
sparc*-* | x86_64-* | loongarch*-*)
+ aarch64*-* | arm*-* | i[34567]86-* | powerpc*-* | riscv*-* |
s390*-* | sparc*-* | x86_64-* | loongarch*-*)
default_gnu_indirect_function=yes
;;
esac
diff --git a/gcc/configure b/gcc/configure
index 4faae0fa5fb..874412dc96b 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -25907,42 +25907,46 @@ else
fi
-case "${target}" in
- riscv*-*-linux*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking linker ifunc
IRELATIVE support" >&5
+if test $default_gnu_indirect_function = yes; then
+ case "${target}" in
+ riscv*-*-linux*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking linker ifunc
IRELATIVE support" >&5
$as_echo_n "checking linker ifunc IRELATIVE support... " >&6; }
- cat > conftest.s <<EOF
- .text
- .type foo_resolver, @function
-foo_resolver:
- ret
- .size foo_resolver, .-foo_resolver
-
- .globl foo
- .type foo, %gnu_indirect_function
- .set foo, foo_resolver
-
- .globl bar
- .type bar, @function
-bar:
- call foo
- ret
- .size bar, .-bar
-EOF
- if test x$gcc_cv_as != x \
- && test x$gcc_cv_ld != x \
- && test x$gcc_cv_readelf != x \
- && $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \
- && $gcc_cv_ld -o conftest conftest.o > /dev/null 2>&1 \
- && $gcc_cv_readelf --relocs --wide conftest \
- | grep R_RISCV_IRELATIVE > /dev/null 2>&1; then
- enable_gnu_indirect_function=yes
- fi
- rm -f conftest conftest.o conftest.s
- { $as_echo "$as_me:${as_lineno-$LINENO}: result:
$enable_gnu_indirect_function" >&5
+ cat > conftest.s <<EOF
+ .text
+ .type foo_resolver, @function
+ foo_resolver:
+ ret
+ .size foo_resolver, .-foo_resolver
+
+ .globl foo
+ .type foo, %gnu_indirect_function
+ .set foo, foo_resolver
+
+ .globl bar
+ .type bar, @function
+ bar:
+ call foo
+ ret
+ .size bar, .-bar
+ EOF
+ if test x$gcc_cv_as != x \
+ && test x$gcc_cv_ld != x \
+ && test x$gcc_cv_readelf != x \
+ && $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \
+ && $gcc_cv_ld -o conftest conftest.o > /dev/null 2>&1 \
+ && $gcc_cv_readelf --relocs --wide conftest \
+ | grep R_RISCV_IRELATIVE > /dev/null 2>&1; then
+ enable_gnu_indirect_function=yes
+ else
+ enable_gnu_indirect_function=no
+ fi
+ rm -f conftest conftest.o conftest.s
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result:
$enable_gnu_indirect_function" >&5
$as_echo "$enable_gnu_indirect_function" >&6; }
- ;;
-esac
+ ;;
+ esac
+fi
gif=`if test x$enable_gnu_indirect_function = xyes; then echo 1; else
echo 0; fi`
diff --git a/gcc/configure.ac b/gcc/configure.ac
index 3da1eaa7064..4f90a974c6b 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -3072,40 +3072,44 @@ Valid choices are 'yes' and 'no'.]) ;;
esac],
[enable_gnu_indirect_function="$default_gnu_indirect_function"])
-case "${target}" in
- riscv*-*-linux*)
- AC_MSG_CHECKING(linker ifunc IRELATIVE support)
- cat > conftest.s <<EOF
- .text
- .type foo_resolver, @function
-foo_resolver:
- ret
- .size foo_resolver, .-foo_resolver
-
- .globl foo
- .type foo, %gnu_indirect_function
- .set foo, foo_resolver
-
- .globl bar
- .type bar, @function
-bar:
- call foo
- ret
- .size bar, .-bar
-EOF
- if test x$gcc_cv_as != x \
- && test x$gcc_cv_ld != x \
- && test x$gcc_cv_readelf != x \
- && $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \
- && $gcc_cv_ld -o conftest conftest.o > /dev/null 2>&1 \
- && $gcc_cv_readelf --relocs --wide conftest \
- | grep R_RISCV_IRELATIVE > /dev/null 2>&1; then
- enable_gnu_indirect_function=yes
- fi
- rm -f conftest conftest.o conftest.s
- AC_MSG_RESULT($enable_gnu_indirect_function)
- ;;
-esac
+if test $default_gnu_indirect_function = yes; then
+ case "${target}" in
+ riscv*-*-linux*)
+ AC_MSG_CHECKING(linker ifunc IRELATIVE support)
+ cat > conftest.s <<EOF
+ .text
+ .type foo_resolver, @function
+ foo_resolver:
+ ret
+ .size foo_resolver, .-foo_resolver
+
+ .globl foo
+ .type foo, %gnu_indirect_function
+ .set foo, foo_resolver
+
+ .globl bar
+ .type bar, @function
+ bar:
+ call foo
+ ret
+ .size bar, .-bar
+ EOF
+ if test x$gcc_cv_as != x \
+ && test x$gcc_cv_ld != x \
+ && test x$gcc_cv_readelf != x \
+ && $gcc_cv_as -o conftest.o conftest.s > /dev/null 2>&1 \
+ && $gcc_cv_ld -o conftest conftest.o > /dev/null 2>&1 \
+ && $gcc_cv_readelf --relocs --wide conftest \
+ | grep R_RISCV_IRELATIVE > /dev/null 2>&1; then
+ enable_gnu_indirect_function=yes
+ else
+ enable_gnu_indirect_function=no
+ fi
+ rm -f conftest conftest.o conftest.s
+ AC_MSG_RESULT($enable_gnu_indirect_function)
+ ;;
+ esac
+fi
gif=`if test x$enable_gnu_indirect_function = xyes; then echo 1; else
echo 0; fi`
Precommit CI Run information
Logs can be found in the associated Github Actions run: https://github.com/ewlu/gcc-precommit-ci/actions/runs/9989823996
Patch information
Applied patches: 1 -> 1 Associated series: https://patchwork.sourceware.org/project/gcc/list/?series=36387 Last patch applied: https://patchwork.sourceware.org/project/gcc/patch/CAHXVFW===byiJP=15Jws_a6Vcfj5pFC_mE3_dshBhADExfjdPg@mail.gmail.com/ Patch id: 94140
Build Targets
multilib
, please refer to the table below to see all the targets within that multilib.-march
stringrv32gc-ilp32d
,rv64gc-lp64d
rv64gcv-lp64d
rv32gcv-ilp32d
,rv64gcv-lp64d
Target Information
-march
stringgc_zba_zbb_zbc_zbs
Notes
Testsuite results use a more lenient allowlist to reduce error reporting with flakey tests. Please take a look at the current allowlist. Results come from a sum file comparator. Each patch is applied to a well known, non-broken baseline taken from our gcc postcommit framework (here) which runs the full gcc testsuite every 6 hours. If you have any questions or encounter any issues which may seem like false-positives, please contact us at patchworks-ci@rivosinc.com