Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GCC14] Apply fix for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118817 #9686

Merged
merged 5 commits into from
Feb 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion fakesystem.spec
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
### RPM cms fakesystem 1.0
## REVISION 1016
## REVISION 1017
## NOCOMPILER
## NO_VERSION_SUFFIX

Expand Down Expand Up @@ -50,6 +50,7 @@ Provides: perl(Tk::DialogBox)
Provides: perl(Tk::ROText)
Provides: perl(constant)
Provides: perl(full)
Provides: perl(bigint)

#################################
# Needed by git on SLC7
Expand Down
4 changes: 4 additions & 0 deletions gcc.spec
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ Source3: https://ftp.gnu.org/gnu/mpc/mpc-%{mpcVersion}.tar.gz
Source4: https://libisl.sourceforge.io/isl-%{islVersion}.tar.bz2
Source12: http://zlib.net/zlib-%{zlibVersion}.tar.gz
Source13: https://github.com/facebook/zstd/releases/download/v%{zstdVersion}/zstd-%{zstdVersion}.tar.gz
Source14: https://github.com/gcc-mirror/gcc/commit/0a1d2ea57722c248777e1130de076e28c443ff8b.diff
Source15: https://github.com/gcc-mirror/gcc/commit/77d01927bd7c989d431035251a5c196fe39bcec9.diff

%ifos linux
%define bisonVersion 3.8.2
Expand All @@ -44,6 +46,8 @@ Patch1: gcc-flex-disable-doc
%prep

%setup -T -b 0 -n %{moduleName}
patch -p1 <%{_sourcedir}/0a1d2ea57722c248777e1130de076e28c443ff8b.diff
patch -p1 <%{_sourcedir}/77d01927bd7c989d431035251a5c196fe39bcec9.diff

# Filter out private stuff from RPM requires headers.
cat << \EOF > %{name}-req
Expand Down
25 changes: 25 additions & 0 deletions gcc14-fix118817.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
diff --git a/gcc/tree-ssa-sccvn.cc b/gcc/tree-ssa-sccvn.cc
index 1e11690..4550960 100644
--- a/gcc/tree-ssa-sccvn.cc
+++ b/gcc/tree-ssa-sccvn.cc
@@ -2621,13 +2621,18 @@ vn_nary_build_or_lookup (gimple_match_op *res_op)
tree
vn_nary_simplify (vn_nary_op_t nary)
{
- if (nary->length > gimple_match_op::MAX_NUM_OPS)
+ if (nary->length > gimple_match_op::MAX_NUM_OPS
+ /* For CONSTRUCTOR the vn_nary_op_t and gimple_match_op representation
+ does not match. */
+ || nary->opcode == CONSTRUCTOR)
return NULL_TREE;
gimple_match_op op (gimple_match_cond::UNCOND, nary->opcode,
nary->type, nary->length);
memcpy (op.ops, nary->op, sizeof (tree) * nary->length);
tree res = vn_nary_build_or_lookup_1 (&op, false, true);
- if (op.code.is_tree_code () && op.num_ops <= nary->length)
+ if (op.code.is_tree_code ()
+ && op.num_ops <= nary->length
+ && (tree_code) op.code != CONSTRUCTOR)
{
nary->opcode = (tree_code) op.code;
nary->length = op.num_ops;
1 change: 0 additions & 1 deletion pip/pybind11.file
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
Patch0: pybind11-array-bound
%define PipPostInstall \
ln -s ${PYTHON3_LIB_SITE_PACKAGES}/pybind11/share %{i}/share; \
ln -s ${PYTHON3_LIB_SITE_PACKAGES}/pybind11/include %{i}/include
Expand Down
22 changes: 0 additions & 22 deletions pybind11-array-bound.patch

This file was deleted.

2 changes: 0 additions & 2 deletions scram-tools.file/tools/gcc/env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ GCC_CXXFLAGS="$GCC_CXXFLAGS -Xassembler --compress-debug-sections"
#FIXME: GCC 12.2 workaround
if [[ "$GCC_VERSION" =~ ^12\.[23]\. ]] ; then
GCC_CXXFLAGS="$GCC_CXXFLAGS -Wno-error=array-bounds -Warray-bounds"
elif [[ "$GCC_VERSION" =~ ^14\.[2]\. ]] ; then
GCC_CXXFLAGS="$GCC_CXXFLAGS -Wno-error=array-bounds -Warray-bounds"
fi

# Explicitly use the GNU binutils ld.bfd linker
Expand Down
2 changes: 1 addition & 1 deletion tbb.spec
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ mkdir %{_builddir}/build
cd %{_builddir}/build
cmake ../%{n}-%{realversion} \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_CXX_FLAGS="-Wno-error=array-bounds -Wno-error=use-after-free -Wno-error=address -Wno-error=uninitialized -Wno-error=stringop-overflow" \
-DCMAKE_CXX_FLAGS="-Wno-error=use-after-free -Wno-error=address -Wno-error=uninitialized" \
-DCMAKE_CXX_STANDARD=%{cms_cxx_standard} \
-DCMAKE_INSTALL_PREFIX=%{i} \
-DCMAKE_INSTALL_LIBDIR=lib \
Expand Down
1 change: 0 additions & 1 deletion ucx.spec
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ Requires: xpmem
--without-knem \
--with-xpmem=$XPMEM_ROOT \
--without-ugni \
CFLAGS="-Wno-error=array-bounds" \
CPPFLAGS="-I$NUMACTL_ROOT/include" \
LDFLAGS="-L$NUMACTL_ROOT/lib"

Expand Down