summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc10/README.md18
-rw-r--r--gcc10/gcc1023
-rw-r--r--gcc10/gcc10.spec165
-rw-r--r--gcc10/target.path125
4 files changed, 331 insertions, 0 deletions
diff --git a/gcc10/README.md b/gcc10/README.md
new file mode 100644
index 0000000..0c9bd5c
--- /dev/null
+++ b/gcc10/README.md
@@ -0,0 +1,18 @@
+# README for gcc10
+
+## gcc10 upstream
+
+## Reason for being in stackrpms
+FreeFileSync 10.25 contains code for -std=c++20 that cannot be easily converted for -std=c++17, so gcc10 is required for FreeFileSync 10.25. Therefore, I need gcc 10 on CentOS 7, CentOS 8, and Fedora 31.
+
+## References
+https://jdhao.github.io/2017/09/04/install-gcc-newer-version-on-centos/
+gcc49 from this stackrpms collection.
+
+## Reverse dependency matrix
+Distro | gcc version
+-------------- | -----------
+CentOS 7 | 4.9
+
+## Differences from upstream
+Unknown
diff --git a/gcc10/gcc10 b/gcc10/gcc10
new file mode 100644
index 0000000..f943280
--- /dev/null
+++ b/gcc10/gcc10
@@ -0,0 +1,23 @@
+#! /bin/bash
+
+gver=10.1.0
+gcc_target_platform=$(uname -m)-fedoraunited-linux-gnu
+
+if [ `getconf LONG_BIT` = "64" ]
+then
+lib=lib64
+else
+lib=lib
+fi
+
+
+export CC=/opt/gcc-$gver/bin/gcc
+export CXX=/opt/gcc-$gver/bin/g++
+export CPP=/opt/gcc-$gver/bin/cpp
+export LD=/opt/gcc-$gver/bin/gcc
+#
+
+# gcc49
+export LDFLAGS="-L/opt/gcc-$gver/$lib/gcc/$gcc_target_platform/$lib/"
+export CPPFLAGS="-I/opt/gcc-$gver/$lib/gcc/$gcc_target_platform/$gver/include/"
+#
diff --git a/gcc10/gcc10.spec b/gcc10/gcc10.spec
new file mode 100644
index 0000000..069b482
--- /dev/null
+++ b/gcc10/gcc10.spec
@@ -0,0 +1,165 @@
+%global _optdir /opt
+%global gcc_target_platform %{_arch}-fedoraunited-linux-gnu
+%define debug_package %{nil}
+
+Summary: Various compilers (C, C++, Objective-C, Java, ada, go, obj-c++ ...)
+Name: gcc10
+Version: 10.1.0
+Release: 1
+
+License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and BSD
+Group: Development/Languages
+
+#Source: http://gcc.gnu.org/pub/gcc/releases/gcc-4.9.3/gcc-4.9.3.tar.bz2
+Source: https://github.com/gcc-mirror/gcc/archive/releases/gcc-10.1.0.tar.gz
+Source6: gcc10
+Patch: target.path
+
+# Patch1 for libitm: Don't redefine __always_inline in local_atomic.
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+BuildRequires: binutils >= 2.24
+BuildRequires: make autoconf m4 gettext dejagnu bison flex sharutils
+BuildRequires: texinfo texinfo-tex
+BuildRequires: python-sphinx
+BuildRequires: zlib-devel
+BuildRequires: texinfo
+BuildRequires: glibc-devel
+BuildRequires: mpfr-devel gmp-devel libmpc-devel
+#ada
+BuildRequires: dejagnu
+
+# go
+BuildRequires: hostname, procps
+
+# java
+# BuildRequires: which
+# BuildRequires: dejagnu
+# BuildRequires: libart_lgpl-devel
+# BuildRequires: gtk2-devel
+
+Requires: binutils >= 2.24
+Conflicts: gdb < 5.1-2
+Requires(post): /sbin/install-info
+Requires(preun): /sbin/install-info
+AutoReq: true
+
+
+
+%description
+The gcc package contains the GNU Compiler Collection version 4.9.
+You'll need this package in order to compile C code.
+You can change the environment variables as follows adding
+"source /usr/bin/gcc10"
+
+
+
+%prep
+%setup -n gcc-releases-gcc-%{version}
+%patch -p0
+
+tar jxvf %{SOURCE1} -C %{_builddir}/gcc-%{version}/
+
+ # Do not run fixincludes
+ sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in
+
+ # Fedora Linux installs x86_64 libraries /lib
+
+[[ $CARCH == "x86_64" ]] && sed -i '/m64=/s/lib64/lib/' gcc/config/i386/t-linux64
+
+ echo %{version} > gcc/BASE-VER
+
+ # hack! - some configure tests for header files using "$CPP $CPPFLAGS"
+ sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" {libiberty,gcc}/configure
+
+ mkdir -p %{_builddir}/gcc-build
+
+%build
+cd %{_builddir}/gcc-build
+
+ # using -pipe causes spurious test-suite failures
+ # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48565
+ CFLAGS=${CFLAGS/-pipe/}
+ CXXFLAGS=${CXXFLAGS/-pipe/}
+
+
+ %{_builddir}/gcc-%{version}/configure --prefix=/opt/gcc-%{version} \
+ --libdir=/opt/gcc-%{version}/%{_lib} --libexecdir=/opt/gcc-%{version}/%{_lib} \
+ --mandir=/opt/gcc-%{version}/man --infodir=/opt/gcc-%{version}/info --with-gxx-include-dir=/opt/gcc-%{version}/include \
+ --host=%{_arch}-fedoraunited-linux-gnu \
+ --build=%{_arch}-fedoraunited-linux-gnu \
+ --enable-languages=c,c++,objc,obj-c++,go,fortran,lto \
+ --with-system-zlib \
+ --enable-libstdcxx-time \
+ --disable-multilib \
+ --enable-version-specific-runtime-libs \
+ --enable-plugin \
+ --enable-threads=posix \
+ --enable-checking=release \
+ --enable-gnu-unique-object \
+ --enable-linker-build-id \
+ --enable-lto \
+ --enable-initfini-array \
+ --enable-gnu-indirect-function \
+ --enable-tls \
+ %ifarch %{ix86} x86_64
+ --with-tune=generic \
+%endif
+ --enable-bootstrap
+
+
+make bootstrap || return 1
+
+
+
+%install
+
+cd %{_builddir}/gcc-build
+
+ make -j1 DESTDIR=%{buildroot} install
+
+
+ # Install Runtime Library Exception
+ install -dm 755 %{buildroot}/usr/share/licenses/%{name}/
+ install -m 0644 %{_builddir}/gcc-%{version}/COPYING.RUNTIME %{buildroot}/usr/share/licenses/%{name}/RUNTIME.LIBRARY.EXCEPTION
+
+ # Help plugins find out nvra.
+echo "gcc-%{version}-%{release}.%{_arch}" | tee %{buildroot}/opt/gcc-%{version}/%{_lib}/gcc/%{gcc_target_platform}/rpmver
+
+ # i686
+%ifarch i686
+ ln -sf %{_optdir}/gcc-%{version}/lib/gcc/i386-fedoraunited-linux-gnu %{buildroot}/opt/gcc-%{version}/%{_lib}/gcc/i686-fedoraunited-linux-gnu
+%endif
+
+ # fix id bgstack15-gcc49-0001
+%ifarch x86_64
+ pushd %{buildroot}%{_optdir}/gcc-%{version}/lib64/gcc/x86_64-fedoraunited-linux-gnu/%{version}
+ %{__cp} -p ../lib64/libgcc_s.so.1 .
+ %{__ln_s} libgcc_s.so.1 libgcc_s.so
+ popd
+%endif
+
+ # We need a script to change environment variables as follows
+ install -dm 755 %{buildroot}/%{_bindir}/
+ install -m 0644 %{SOURCE6} %{buildroot}/%{_bindir}/
+ chmod a+x %{buildroot}/%{_bindir}/gcc49
+
+
+%files
+
+%{_optdir}/gcc-%{version}/
+%{_datadir}/licenses/%{name}/RUNTIME.LIBRARY.EXCEPTION
+%{_bindir}/gcc10
+
+
+%changelog
+* Mon Jun 22 2020 B Stack <bgstack15@gmail.com> 10.1.0-1
+- build gcc 10 for CentOS 7 and 8 and Fedora 31
+
+* Sat Sep 1 2018 B Stack <bgstack15@gmail.com> 4.9.3-5
+- fix x86_64 gcc_s.so symlink
+
+* Mon Mar 28 2016 David Vasquez <davidjeremias82@gmail.com> 4.9.3-2
+- Added i686 symlink
+
+* Sat Oct 10 2015 David Vasquez <davidjeremias82@gmail.com> 4.9.3-1
+- New package
diff --git a/gcc10/target.path b/gcc10/target.path
new file mode 100644
index 0000000..b801c77
--- /dev/null
+++ b/gcc10/target.path
@@ -0,0 +1,125 @@
+--- config.guess 2014-02-05 04:40:55.000000000 -0600
++++ config-new.guess 2015-10-19 01:41:40.576796312 -0600
+@@ -884,11 +884,11 @@
+ echo ${UNAME_MACHINE}-pc-minix
+ exit ;;
+ aarch64:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
++ echo ${UNAME_MACHINE}-fedora-linux
+ exit ;;
+ aarch64_be:Linux:*:*)
+ UNAME_MACHINE=aarch64_be
+- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
++ echo ${UNAME_MACHINE}-fedora-linux
+ exit ;;
+ alpha:Linux:*:*)
+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+@@ -902,29 +902,29 @@
+ esac
+ objdump --private-headers /bin/sh | grep -q ld.so.1
+ if test "$?" = 0 ; then LIBC="gnulibc1" ; fi
+- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
++ echo ${UNAME_MACHINE}-fedora-linux
+ exit ;;
+ arc:Linux:*:* | arceb:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
++ echo ${UNAME_MACHINE}-fedora-linux
+ exit ;;
+ arm*:Linux:*:*)
+ eval $set_cc_for_build
+ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_EABI__
+ then
+- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
++ echo ${UNAME_MACHINE}-fedora-linux
+ else
+ if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_PCS_VFP
+ then
+- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi
++ echo ${UNAME_MACHINE}-fedora-linux-eabi
+ else
+- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf
++ echo ${UNAME_MACHINE}-fedora-linux-eabihf
+ fi
+ fi
+ exit ;;
+ avr32*:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
++ echo ${UNAME_MACHINE}-fedora-linux
+ exit ;;
+ cris:Linux:*:*)
+ echo ${UNAME_MACHINE}-axis-linux-${LIBC}
+@@ -933,22 +933,22 @@
+ echo ${UNAME_MACHINE}-axis-linux-${LIBC}
+ exit ;;
+ frv:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
++ echo ${UNAME_MACHINE}-fedora-linux
+ exit ;;
+ hexagon:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
++ echo ${UNAME_MACHINE}-fedora-linux
+ exit ;;
+ i*86:Linux:*:*)
+ echo ${UNAME_MACHINE}-pc-linux-${LIBC}
+ exit ;;
+ ia64:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
++ echo ${UNAME_MACHINE}-fedora-linux
+ exit ;;
+ m32r*:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
++ echo ${UNAME_MACHINE}-fedora-linux
+ exit ;;
+ m68*:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
++ echo ${UNAME_MACHINE}-fedora-linux
+ exit ;;
+ mips:Linux:*:* | mips64:Linux:*:*)
+ eval $set_cc_for_build
+@@ -970,10 +970,10 @@
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; }
+ ;;
+ or1k:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
++ echo ${UNAME_MACHINE}-fedora-linux
+ exit ;;
+ or32:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
++ echo ${UNAME_MACHINE}-fedora-linux
+ exit ;;
+ padre:Linux:*:*)
+ echo sparc-unknown-linux-${LIBC}
+@@ -1005,25 +1005,25 @@
+ echo ${UNAME_MACHINE}-ibm-linux-${LIBC}
+ exit ;;
+ sh64*:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
++ echo ${UNAME_MACHINE}-fedora-linux
+ exit ;;
+ sh*:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
++ echo ${UNAME_MACHINE}-fedora-linux
+ exit ;;
+ sparc:Linux:*:* | sparc64:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
++ echo ${UNAME_MACHINE}-fedora-linux
+ exit ;;
+ tile*:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
++ echo ${UNAME_MACHINE}-fedora-linux
+ exit ;;
+ vax:Linux:*:*)
+ echo ${UNAME_MACHINE}-dec-linux-${LIBC}
+ exit ;;
+ x86_64:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
++ echo ${UNAME_MACHINE}-fedora-linux
+ exit ;;
+ xtensa*:Linux:*:*)
+- echo ${UNAME_MACHINE}-unknown-linux-${LIBC}
++ echo ${UNAME_MACHINE}-fedora-linux
+ exit ;;
+ i*86:DYNIX/ptx:4*:*)
+ # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
bgstack15