Skip to content

Commit

Permalink
Update GCC12 to latest commit; sync changes from gcc13 branch
Browse files Browse the repository at this point in the history
  • Loading branch information
smuzaffar committed Nov 16, 2023
1 parent 231a7bb commit fffcf90
Show file tree
Hide file tree
Showing 28 changed files with 282 additions and 74 deletions.
6 changes: 2 additions & 4 deletions autotools.spec
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,21 @@
%define automake_version 1.16.3
%define automake_maj %(echo %{automake_version} | cut -f1,2 -d.)
%define libtool_version 2.4.6
%define m4_version 1.4.18
%define m4_version 1.4.19
%define gettext_version 0.21
%define pkgconfig_version 0.29.2
Source0: http://ftp.gnu.org/gnu/autoconf/autoconf-%{autoconf_version}.tar.gz
Source1: http://ftp.gnu.org/gnu/automake/automake-%{automake_version}.tar.gz
Source2: http://ftp.gnu.org/gnu/libtool/libtool-%{libtool_version}.tar.gz
Source3: http://ftp.gnu.org/gnu/m4/m4-%{m4_version}.tar.bz2
Source3: http://ftp.gnu.org/gnu/m4/m4-%{m4_version}.tar.gz
Source4: http://ftp.gnu.org/gnu/gettext/gettext-%{gettext_version}.tar.gz
Source5: http://pkgconfig.freedesktop.org/releases/pkg-config-%{pkgconfig_version}.tar.gz
Patch0: m4-centos8

%prep
%setup -D -T -b 0 -n autoconf-%{autoconf_version}
%setup -D -T -b 1 -n automake-%{automake_version}
%setup -D -T -b 2 -n libtool-%{libtool_version}
%setup -D -T -b 3 -n m4-%{m4_version}
%patch0 -p1
%setup -D -T -b 4 -n gettext-%{gettext_version}
%setup -D -T -b 5 -n pkg-config-%{pkgconfig_version}

Expand Down
10 changes: 5 additions & 5 deletions bootstrap-bundle.spec
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
### RPM external bootstrap-bundle 3.0
### RPM external bootstrap-bundle 4.0
## NO_AUTO_DEPENDENCY
## NOCOMPILER

AutoReqProv: no
BuildRequires: gcc
BuildRequires: db6-bootstrap lua-bootstrap file-bootstrap
BuildRequires: xz-bootstrap libarchive-bootstrap
BuildRequires: lua-bootstrap file-bootstrap zstd-bootstrap
BuildRequires: xz-bootstrap libarchive-bootstrap sqlite-bootstrap

%define keep_archives true

Expand Down Expand Up @@ -51,7 +51,7 @@ find %{i}/lib -type f ! -name '*.a' -writable -exec %{strip} {} \;
# RPM requires it to generate requires/provides also (otherwise it ignores the files)
find %{i}/lib -type f | xargs chmod 0755

mv %{i}/lib/lib{lua,archive}.a %{i}/tmp
mv %{i}/lib/lib{lua,archive,zstd}.a %{i}/tmp
rm -f %{i}/lib/*.{l,}a
mv %{i}/tmp/lib* %{i}/lib/
rm -rf %{i}/tmp
54 changes: 31 additions & 23 deletions bootstrap-driver.spec
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
### RPM external bootstrap-driver 40.0
### RPM external bootstrap-driver 42.0
## NOCOMPILER
Requires: rpm
BuildRequires: cms-common fakesystem
Expand All @@ -9,50 +9,58 @@ BuildRequires: cms-common fakesystem
%build
%install
packageList=""
echo requiredtools `echo %{requiredtools} | sed -e's|\s+| |;s|^\s+||'`
for tool in `echo %{requiredtools} | sed -e's|\s+| |;s|^\s+||'`
do
case X$tool in
Xdistcc|Xccache )
;;
* )
toolcap=`echo $tool | tr a-z- A-Z_`
toolversion=$(eval echo $`echo ${toolcap}_VERSION`)
toolrevision=$(eval echo $`echo ${toolcap}_REVISION`)
echo $toolversion $toolrevision
packageList="$packageList external+${tool}+${toolversion}-1-${toolrevision}.%cmsplatf.rpm"
;;
esac
for tool in $(echo %{directpkgreqs} | tr '/' '+') ; do
packageList="$packageList ${tool}-1-1.%{cmsplatf}.rpm"
done

additionalProvides=""
##############################
# Packages to seed for runtime
##############################
platformSeeds="bash tcsh perl bzip2-libs glibc nspr nss nss-util popt zlib glibc-devel openssl openssl-devel openssl-libs krb5-libs
libcom_err libX11 libXext libXft libXpm libglvnd-glx libglvnd-opengl mesa-libGLU"
platformSeeds=" bash glibc glibc-headers python3 openssl-libs"
platformSeeds+=" libbrotli libX11 libxcrypt"

# Needed by python runtime
platformSeeds+=" readline ncurses-libs tcl tk"

# Needed by root runtime
platformSeeds+=" mesa-libGLU libglvnd-glx libglvnd-opengl libXext libXft libXpm"

#Various packages perl dependencies
platformSeeds+=" perl perl-base perl-filetest perl-lib perl-libs perl-overload perl-vars"

#Various packages required by xrootd with krb5 enabled
platformSeeds+=" libcom_err krb5-libs"

# Seed packages which provides these
packagesWithProvides="/usr/bin/python3 /usr/bin/perl /usr/bin/env /usr/bin/uname"
packagesWithProvides=" /usr/bin/python3 /usr/bin/env /usr/bin/uname /bin/sh /usr/bin/perl"

##############################
#Packages to seed for build
##############################
platformBuildSeeds="git patch make zip unzip bzip2 java-1.8.0-openjdk-devel libcom_err-devel which libXpm-devel libXft-devel mesa-libGLU-devel rsync"
#Needed by autotools,go and lcov
#platformBuildSeeds+=" perl-Carp perl-Data-Dumper perl-Digest-MD5 perl-Exporter perl-File-Path perl-File-Temp perl-Getopt-Long perl-PathTools perl-Text-ParseWords perl-constant"
platformBuildSeeds=" git patch make zip unzip bzip2 which rsync"
platformBuildSeeds+=" openssl-devel brotli-devel libxcrypt-devel"
platformBuildSeeds+=" libX11-devel libXpm-devel libXft-devel mesa-libGLU-devel"
platformBuildSeeds+=" java-1.8.0-openjdk-devel"

#Various packages required by xrootd with krb5 enabled
platformBuildSeeds+=" libcom_err-devel krb5-devel"

#needed by python build
platformBuildSeeds+=" readline-devel ncurses-devel tcl-devel tk-devel"

##############################
#Packages which provides a definition
##############################
packagesWithBuildProvides=""

%ifnarch aarch64
# Needed by oracle
platformSeeds+=" libaio"
%endif

%if "%{rhel}" != "7"
platformSeeds+=" libxcrypt perl-libs"
%if "%{rhel}" == "9"
platformSeeds+=" libgcc"
%endif

defaultPkgs="cms+cms-common+1.0 cms+fakesystem+1.0"
Expand Down
10 changes: 10 additions & 0 deletions cepgen-gcc12.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
--- a/CepGen/Utils/Drawer.h.orig 2023-06-05 11:45:35.916095554 +0200
+++ b/CepGen/Utils/Drawer.h 2023-06-05 11:46:11.721935669 +0200
@@ -20,6 +20,7 @@
#define CepGen_Utils_Drawer_h

#include "CepGen/Modules/NamedModule.h"
+#include <cstdint>

namespace cepgen {
namespace utils {
2 changes: 2 additions & 0 deletions cepgen.spec
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ Source: https://github.com/cepgen/cepgen/archive/refs/tags/%{realversion}.tar.gz

BuildRequires: cmake ninja
Requires: gsl OpenBLAS hepmc hepmc3 lhapdf pythia6 root bz2lib zlib xz
Patch0: cepgen-gcc12

%prep
%setup -n %{n}-%{realversion}
%patch0 -p1

%build
rm -rf ../build
Expand Down
18 changes: 0 additions & 18 deletions db6-bootstrap.spec

This file was deleted.

4 changes: 2 additions & 2 deletions dd4hep.spec
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
### RPM external dd4hep v01-25x
### RPM external dd4hep v01-26x
## INCLUDE compilation_flags
## INCLUDE compilation_flags_lto
## INCLUDE cpp-standard

%define tag b07fa115c59d80d37154cf205cf00dff8137ee36
%define tag 8715c52c1c8b3c714d80896cb8540f3f8f888786
%define branch master
%define github_user AIDASoft
%define keep_archives true
Expand Down
1 change: 1 addition & 0 deletions file-bootstrap.spec
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
### RPM external file-bootstrap 5.33
%define file_tag %(echo FILE%{realversion} | tr . _)
AutoReqProv: no
Source: https://github.com/file/file/archive/%{file_tag}.tar.gz

%prep
Expand Down
2 changes: 1 addition & 1 deletion gbl.spec
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
### RPM external gbl V02-04-01
### RPM external gbl V03-00-00
## INCLUDE cpp-standard

%define tag 31e726d777fe93cdbed0c363dc15f803f7767f40
Expand Down
2 changes: 1 addition & 1 deletion gcc.spec
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# Use the git repository for fetching the sources. This gives us more control while developing
# a new platform so that we can compile yet to be released versions of the compiler.
# See: https://gcc.gnu.org/viewcvs/gcc/branches/gcc-8-branch/?view=log
%define gccTag 10ebb8b9db2ec7ad53e4fc1f2900d9a8c8ddeaea
%define gccTag b76c4656631977ccf5119bd326df5e03d26f66ac
%define gccBranch releases/gcc-12

%define moduleName %{n}-%{realversion}
Expand Down
2 changes: 1 addition & 1 deletion giflib.spec
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
### RPM external giflib 5.2.0
### RPM external giflib 5.2.1

Source: https://sourceforge.net/projects/giflib/files/giflib-%{realversion}.tar.gz
BuildRequires: autotools
Expand Down
31 changes: 31 additions & 0 deletions grpc-gcc11.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
--- grpc/third_party/abseil-cpp/absl/synchronization/internal/graphcycles.cc.orig 2023-06-12 13:50:04.615712549 +0200
+++ grpc/third_party/abseil-cpp/absl/synchronization/internal/graphcycles.cc 2023-06-12 13:50:21.878566886 +0200
@@ -37,6 +37,7 @@

#include <algorithm>
#include <array>
+#include <limits>
#include "absl/base/internal/hide_ptr.h"
#include "absl/base/internal/raw_logging.h"
#include "absl/base/internal/spinlock.h"
--- grpc/third_party/abseil-cpp/absl/copts/GENERATED_AbseilCopts.cmake.orig 2023-06-12 13:50:35.303453601 +0200
+++ grpc/third_party/abseil-cpp/absl/copts/GENERATED_AbseilCopts.cmake 2023-06-12 13:51:05.358200009 +0200
@@ -202,6 +202,7 @@

list(APPEND ABSL_RANDOM_HWAES_ARM64_FLAGS
"-march=armv8-a+crypto"
+ "-mno-outline-atomics"
)

list(APPEND ABSL_RANDOM_HWAES_MSVC_X64_FLAGS
--- grpc/third_party/abseil-cpp/absl/debugging/failure_signal_handler.cc.orig 2023-06-12 13:51:27.063016878 +0200
+++ grpc/third_party/abseil-cpp/absl/debugging/failure_signal_handler.cc 2023-06-12 13:52:05.133695671 +0200
@@ -125,7 +125,7 @@
#else
const size_t page_mask = sysconf(_SC_PAGESIZE) - 1;
#endif
- size_t stack_size = (std::max(SIGSTKSZ, 65536) + page_mask) & ~page_mask;
+ size_t stack_size = (std::max<size_t>(SIGSTKSZ, 65536) + page_mask) & ~page_mask;
#if defined(ADDRESS_SANITIZER) || defined(MEMORY_SANITIZER) || \
defined(THREAD_SANITIZER)
// Account for sanitizer instrumentation requiring additional stack space.
4 changes: 2 additions & 2 deletions igprof.spec
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ rm -rf ../build; mkdir ../build; cd ../build

cmake ../igprof-%{git_commit} \
-DCMAKE_INSTALL_PREFIX=%i -DCMAKE_VERBOSE_MAKEFILE=TRUE \
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="-g -O3" \
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="-g -O3 -Wno-error=deprecated-declarations" \
-DCMAKE_PREFIX_PATH="$LIBUNWIND_ROOT;$PCRE_ROOT"
make DEBUG=1 VERBOSE=1 %makeprocesses
make DEBUG=1 VERBOSE=1 %makeprocesses

%install
cd ../build
Expand Down
2 changes: 1 addition & 1 deletion java-env.spec
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
### RPM external java-env 1.1
### RPM external java-env 11.0
## INITENV SET JAVA_HOME %{java_home}
## INITENV +PATH PATH %{java_home}/bin
## INITENV +PATH LD_LIBRARY_PATH %{java_home}/lib
Expand Down
2 changes: 1 addition & 1 deletion libarchive-bootstrap.spec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
### RPM external libarchive-bootstrap 3.5.1
Source0: http://www.libarchive.org/downloads/libarchive-%{realversion}.tar.gz

AutoReqProv: no
Requires: xz-bootstrap

%define keep_archives true
Expand Down
2 changes: 1 addition & 1 deletion pip/cryptography.file
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
%define PipPreBuild export CARGO_HOME=%{_tmppath}/cargo_home
%define PipPreBuild export CARGO_HOME=%{_tmppath}/cargo_home; export CARGO_HTTP_CAINFO=/etc/ssl/cert.pem
BuildRequires: rust
Requires: py3-setuptools-rust py3-cffi
2 changes: 1 addition & 1 deletion professor2.spec
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ sed -i -e 's|-std=c[+][+]11|-std=c++%{cms_cxx_standard}|' pyext/setup.py
grep -q 'CXXSTD := c[+][+]11' Makefile
sed -i -e 's|CXXSTD := c[+][+]11|CXXSTD := c++%{cms_cxx_standard}|' Makefile

%define build_flags CPPFLAGS=-I${EIGEN_ROOT}/include/eigen3 PYTHON=$(which python3) PROF_VERSION=%{realversion} PYTHONPATH=./${PYTHON3_LIB_SITE_PACKAGES}
%define build_flags CPPFLAGS=-I${EIGEN_ROOT}/include/eigen3 PYTHON=$(which python3) PROF_VERSION=%{realversion} PYTHONPATH=./${PYTHON3_LIB_SITE_PACKAGES}:./pyext/professor2

%build
make %{build_flags}
Expand Down
107 changes: 107 additions & 0 deletions protobuf-std_iterator-8741.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
From e3675f9c8dc3b35caeadc087fa7653ffefc3e0e9 Mon Sep 17 00:00:00 2001
From: Arthur O'Dwyer <[email protected]>
Date: Thu, 17 Jun 2021 11:02:09 -0400
Subject: [PATCH] Stop using std::iterator (deprecated in C++17).

---
src/google/protobuf/reflection.h | 9 +++++--
src/google/protobuf/repeated_field.h | 36 +++++++++++++++++++++-------
2 files changed, 35 insertions(+), 10 deletions(-)

diff --git a/src/google/protobuf/reflection.h b/src/google/protobuf/reflection.h
index af8eb00ef84..bb41fbaeb52 100644
--- a/src/google/protobuf/reflection.h
+++ b/src/google/protobuf/reflection.h
@@ -392,13 +392,18 @@ class PROTOBUF_EXPORT RepeatedFieldAccessor {

// Implement (Mutable)RepeatedFieldRef::iterator
template <typename T>
-class RepeatedFieldRefIterator
- : public std::iterator<std::forward_iterator_tag, T> {
+class RepeatedFieldRefIterator {
typedef typename RefTypeTraits<T>::AccessorValueType AccessorValueType;
typedef typename RefTypeTraits<T>::IteratorValueType IteratorValueType;
typedef typename RefTypeTraits<T>::IteratorPointerType IteratorPointerType;

public:
+ using iterator_category = std::forward_iterator_tag;
+ using value_type = T;
+ using pointer = T*;
+ using reference = T&;
+ using difference_type = std::ptrdiff_t;
+
// Constructor for non-message fields.
RepeatedFieldRefIterator(const void* data,
const RepeatedFieldAccessor* accessor, bool begin)
diff --git a/src/google/protobuf/repeated_field.h b/src/google/protobuf/repeated_field.h
index 3e3f601d7eb..c8fe9333dee 100644
--- a/src/google/protobuf/repeated_field.h
+++ b/src/google/protobuf/repeated_field.h
@@ -2740,9 +2740,14 @@ RepeatedPtrField<Element>::pointer_end() const {
namespace internal {
// A back inserter for RepeatedField objects.
template <typename T>
-class RepeatedFieldBackInsertIterator
- : public std::iterator<std::output_iterator_tag, T> {
+class RepeatedFieldBackInsertIterator {
public:
+ using iterator_category = std::output_iterator_tag;
+ using value_type = T;
+ using pointer = void;
+ using reference = void;
+ using difference_type = std::ptrdiff_t;
+
explicit RepeatedFieldBackInsertIterator(
RepeatedField<T>* const mutable_field)
: field_(mutable_field) {}
@@ -2762,9 +2767,14 @@ class RepeatedFieldBackInsertIterator

// A back inserter for RepeatedPtrField objects.
template <typename T>
-class RepeatedPtrFieldBackInsertIterator
- : public std::iterator<std::output_iterator_tag, T> {
+class RepeatedPtrFieldBackInsertIterator {
public:
+ using iterator_category = std::output_iterator_tag;
+ using value_type = T;
+ using pointer = void;
+ using reference = void;
+ using difference_type = std::ptrdiff_t;
+
RepeatedPtrFieldBackInsertIterator(RepeatedPtrField<T>* const mutable_field)
: field_(mutable_field) {}
RepeatedPtrFieldBackInsertIterator<T>& operator=(const T& value) {
@@ -2793,9 +2803,14 @@ class RepeatedPtrFieldBackInsertIterator
// A back inserter for RepeatedPtrFields that inserts by transferring ownership
// of a pointer.
template <typename T>
-class AllocatedRepeatedPtrFieldBackInsertIterator
- : public std::iterator<std::output_iterator_tag, T> {
+class AllocatedRepeatedPtrFieldBackInsertIterator {
public:
+ using iterator_category = std::output_iterator_tag;
+ using value_type = T;
+ using pointer = void;
+ using reference = void;
+ using difference_type = std::ptrdiff_t;
+
explicit AllocatedRepeatedPtrFieldBackInsertIterator(
RepeatedPtrField<T>* const mutable_field)
: field_(mutable_field) {}
@@ -2817,9 +2832,14 @@ class AllocatedRepeatedPtrFieldBackInsertIterator
// Almost identical to AllocatedRepeatedPtrFieldBackInsertIterator. This one
// uses the UnsafeArenaAddAllocated instead.
template <typename T>
-class UnsafeArenaAllocatedRepeatedPtrFieldBackInsertIterator
- : public std::iterator<std::output_iterator_tag, T> {
+class UnsafeArenaAllocatedRepeatedPtrFieldBackInsertIterator {
public:
+ using iterator_category = std::output_iterator_tag;
+ using value_type = T;
+ using pointer = void;
+ using reference = void;
+ using difference_type = std::ptrdiff_t;
+
explicit UnsafeArenaAllocatedRepeatedPtrFieldBackInsertIterator(
RepeatedPtrField<T>* const mutable_field)
: field_(mutable_field) {}
Loading

0 comments on commit fffcf90

Please sign in to comment.