Merge remote-tracking branch 'up/main' into main-riscv64
Signed-off-by: David Abdurachmanov <davidlt@rivosinc.com>
This commit is contained in:
commit
2f2901a140
1
.gitignore
vendored
1
.gitignore
vendored
@ -97,3 +97,4 @@
|
|||||||
/gcc-13.0.1-20230321.tar.xz
|
/gcc-13.0.1-20230321.tar.xz
|
||||||
/nvptx-tools-93e00909ceb9cbbc104f0fcba56c0361ffb3ca4b.tar.xz
|
/nvptx-tools-93e00909ceb9cbbc104f0fcba56c0361ffb3ca4b.tar.xz
|
||||||
/gcc-13.0.1-20230324.tar.xz
|
/gcc-13.0.1-20230324.tar.xz
|
||||||
|
/gcc-13.0.1-20230329.tar.xz
|
||||||
|
28
gcc.spec
28
gcc.spec
@ -1,5 +1,5 @@
|
|||||||
%global DATE 20230324
|
%global DATE 20230329
|
||||||
%global gitrev 053e16ff35e0921f66d5b48f2b2e4a51eca89e43
|
%global gitrev 5864cb72cba24f25ae864298e85b553f0cadee5d
|
||||||
%global gcc_version 13.0.1
|
%global gcc_version 13.0.1
|
||||||
%global gcc_major 13
|
%global gcc_major 13
|
||||||
# Note, gcc_release must be integer, if you want to add suffixes to
|
# Note, gcc_release must be integer, if you want to add suffixes to
|
||||||
@ -136,7 +136,7 @@
|
|||||||
Summary: Various compilers (C, C++, Objective-C, ...)
|
Summary: Various compilers (C, C++, Objective-C, ...)
|
||||||
Name: gcc
|
Name: gcc
|
||||||
Version: %{gcc_version}
|
Version: %{gcc_version}
|
||||||
Release: %{gcc_release}.10.0.riscv64%{?dist}
|
Release: %{gcc_release}.11.0.riscv64%{?dist}
|
||||||
# libgcc, libgfortran, libgomp, libstdc++ and crtstuff have
|
# libgcc, libgfortran, libgomp, libstdc++ and crtstuff have
|
||||||
# GCC Runtime Exception.
|
# GCC Runtime Exception.
|
||||||
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and BSD
|
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and BSD
|
||||||
@ -286,7 +286,6 @@ Patch8: gcc13-no-add-needed.patch
|
|||||||
Patch9: gcc13-Wno-format-security.patch
|
Patch9: gcc13-Wno-format-security.patch
|
||||||
Patch10: gcc13-rh1574936.patch
|
Patch10: gcc13-rh1574936.patch
|
||||||
Patch11: gcc13-d-shared-libphobos.patch
|
Patch11: gcc13-d-shared-libphobos.patch
|
||||||
Patch12: gcc13-pr109230.patch
|
|
||||||
|
|
||||||
Patch50: isl-rh2155127.patch
|
Patch50: isl-rh2155127.patch
|
||||||
|
|
||||||
@ -863,7 +862,6 @@ so that there cannot be any synchronization problems.
|
|||||||
%patch10 -p0 -b .rh1574936~
|
%patch10 -p0 -b .rh1574936~
|
||||||
%endif
|
%endif
|
||||||
%patch11 -p0 -b .d-shared-libphobos~
|
%patch11 -p0 -b .d-shared-libphobos~
|
||||||
%patch12 -p0 -b .pr109230~
|
|
||||||
|
|
||||||
%patch50 -p0 -b .rh2155127~
|
%patch50 -p0 -b .rh2155127~
|
||||||
touch -r isl-0.24/m4/ax_prog_cxx_for_build.m4 isl-0.24/m4/ax_prog_cc_for_build.m4
|
touch -r isl-0.24/m4/ax_prog_cxx_for_build.m4 isl-0.24/m4/ax_prog_cc_for_build.m4
|
||||||
@ -3470,12 +3468,30 @@ end
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Mon Mar 27 2023 David Abdurachmanov <davidlt@rivosinc.com> 13.0.1-0.10.0.riscv64
|
* Wed Mar 29 2023 David Abdurachmanov <davidlt@rivosinc.com> 13.0.1-0.11.0.riscv64
|
||||||
- Update config.{sub,guess} scripts for ISL
|
- Update config.{sub,guess} scripts for ISL
|
||||||
- Fix annobin plugin Fedora version check
|
- Fix annobin plugin Fedora version check
|
||||||
- Package riscv_vector.h (vector intrinsics) header
|
- Package riscv_vector.h (vector intrinsics) header
|
||||||
- Enable libitm for riscv64
|
- Enable libitm for riscv64
|
||||||
|
|
||||||
|
* Wed Mar 29 2023 Jakub Jelinek <jakub@redhat.com> 13.0.1-0.11
|
||||||
|
- update from trunk
|
||||||
|
- PRs analyzer/109098, bootstrap/84402, bootstrap/109310, c++/105481,
|
||||||
|
c++/106969, c++/107163, c++/109309, c++/109320, c++/109321, c/107002,
|
||||||
|
fortran/104321, fortran/104949, fortran/109314, gcov-profile/109297,
|
||||||
|
ipa/105685, ipa/106124, libgcc/108891, libstdc++/103387,
|
||||||
|
libstdc++/109288, libstdc++/109299, lto/109263, middle-end/106190,
|
||||||
|
other/109163, other/109293, rtl-optimization/109187,
|
||||||
|
rtl-optimization/109237, target/106282, target/109072, target/109082,
|
||||||
|
target/109140, target/109167, target/109276, target/109296,
|
||||||
|
target/109312, tree-optimization/54498, tree-optimization/106912,
|
||||||
|
tree-optimization/107087, tree-optimization/108129,
|
||||||
|
tree-optimization/108357, tree-optimization/109154,
|
||||||
|
tree-optimization/109230, tree-optimization/109238,
|
||||||
|
tree-optimization/109265, tree-optimization/109274,
|
||||||
|
tree-optimization/109301, tree-optimization/109327,
|
||||||
|
tree-optimization/109331
|
||||||
|
|
||||||
* Fri Mar 24 2023 Jakub Jelinek <jakub@redhat.com> 13.0.1-0.10
|
* Fri Mar 24 2023 Jakub Jelinek <jakub@redhat.com> 13.0.1-0.10
|
||||||
- update from trunk
|
- update from trunk
|
||||||
- PRs analyzer/109239, c++/105996, c++/108390, c++/108795, c++/109177,
|
- PRs analyzer/109239, c++/105996, c++/108390, c++/108795, c++/109177,
|
||||||
|
@ -1,51 +0,0 @@
|
|||||||
2023-03-21 Jakub Jelinek <jakub@redhat.com>
|
|
||||||
|
|
||||||
PR tree-optimization/109230
|
|
||||||
* match.pd (fneg/fadd simplify): Verify also odd permutation indexes.
|
|
||||||
|
|
||||||
* gcc.dg/pr109230.c: New test.
|
|
||||||
|
|
||||||
--- gcc/match.pd.jj 2023-02-18 12:38:30.967022708 +0100
|
|
||||||
+++ gcc/match.pd 2023-03-21 19:59:40.209634256 +0100
|
|
||||||
@@ -8096,6 +8096,7 @@ and,
|
|
||||||
scalar_mode inner_mode = GET_MODE_INNER (vec_mode);
|
|
||||||
}
|
|
||||||
(if (sel.series_p (0, 2, 0, 2)
|
|
||||||
+ && sel.series_p (1, 2, nelts + 1, 2)
|
|
||||||
&& GET_MODE_2XWIDER_MODE (inner_mode).exists (&wide_elt_mode)
|
|
||||||
&& multiple_p (GET_MODE_NUNITS (vec_mode), 2, &wide_nunits)
|
|
||||||
&& related_vector_mode (vec_mode, wide_elt_mode,
|
|
||||||
--- gcc/testsuite/gcc.dg/pr109230.c.jj 2023-03-21 20:03:52.811979268 +0100
|
|
||||||
+++ gcc/testsuite/gcc.dg/pr109230.c 2023-03-21 20:03:35.884224342 +0100
|
|
||||||
@@ -0,0 +1,31 @@
|
|
||||||
+/* PR tree-optimization/109230 */
|
|
||||||
+/* { dg-do run } */
|
|
||||||
+/* { dg-options "-O2 -Wno-psabi" } */
|
|
||||||
+
|
|
||||||
+#if __SIZEOF_FLOAT__ == __SIZEOF_INT__
|
|
||||||
+typedef float V __attribute__((vector_size (4 * sizeof (float))));
|
|
||||||
+typedef int VI __attribute__((vector_size (4 * sizeof (float))));
|
|
||||||
+
|
|
||||||
+__attribute__((noipa)) V
|
|
||||||
+foo (V x, V y)
|
|
||||||
+{
|
|
||||||
+ V a = x - y;
|
|
||||||
+ V b = y + x;
|
|
||||||
+ return __builtin_shuffle (b, a, (VI) { 0, 5, 2, 3 });
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+int
|
|
||||||
+main ()
|
|
||||||
+{
|
|
||||||
+ V a = (V) { 1.0f, 2.0f, 3.0f, 4.0f };
|
|
||||||
+ V b = (V) { 8.0f, 9.0f, 10.0f, 11.0f };
|
|
||||||
+ V c = foo (a, b);
|
|
||||||
+ if (c[0] != 9.0f || c[1] != -7.0f || c[2] != 13.0f || c[3] != 15.0f)
|
|
||||||
+ __builtin_abort ();
|
|
||||||
+}
|
|
||||||
+#else
|
|
||||||
+int
|
|
||||||
+main ()
|
|
||||||
+{
|
|
||||||
+}
|
|
||||||
+#endif
|
|
2
sources
2
sources
@ -1,4 +1,4 @@
|
|||||||
SHA512 (gcc-13.0.1-20230324.tar.xz) = 17f0cdd640232508d316cc02664a2e159a97fa2253b3884862f97f02e60bed45630dfd1811472fdc2215d094a2ac3e7cd05011364f069ca14f741db055d6cd9f
|
SHA512 (gcc-13.0.1-20230329.tar.xz) = 58a45335495f2c15c569ee6594bdf1b99a0ee57df01b268b2682b8d219d306e377aa019925ee59936eb0c464cba63c42e8f23e912f13ba9209642a3f74f95d42
|
||||||
SHA512 (isl-0.24.tar.bz2) = aab3bddbda96b801d0f56d2869f943157aad52a6f6e6a61745edd740234c635c38231af20bc3f1a08d416a5e973a90e18249078ed8e4ae2f1d5de57658738e95
|
SHA512 (isl-0.24.tar.bz2) = aab3bddbda96b801d0f56d2869f943157aad52a6f6e6a61745edd740234c635c38231af20bc3f1a08d416a5e973a90e18249078ed8e4ae2f1d5de57658738e95
|
||||||
SHA512 (newlib-cygwin-9e09d6ed83cce4777a5950412647ccc603040409.tar.xz) = bef3fa04f7b1a915fc1356ebed114698b5cc835e9fa04b0becff05a9efc76c59fb376482990873d222d7acdcfee3c4f30f5a4cb7f3be1f291f1fa5f1c7a9d983
|
SHA512 (newlib-cygwin-9e09d6ed83cce4777a5950412647ccc603040409.tar.xz) = bef3fa04f7b1a915fc1356ebed114698b5cc835e9fa04b0becff05a9efc76c59fb376482990873d222d7acdcfee3c4f30f5a4cb7f3be1f291f1fa5f1c7a9d983
|
||||||
SHA512 (nvptx-tools-93e00909ceb9cbbc104f0fcba56c0361ffb3ca4b.tar.xz) = c719fad8689b2b6f3c888d0308604ddef884037d71ec3e755c68052d30075a181c29358fda516833ace437921b17602b147be7886317be94ec9736faa8cb52be
|
SHA512 (nvptx-tools-93e00909ceb9cbbc104f0fcba56c0361ffb3ca4b.tar.xz) = c719fad8689b2b6f3c888d0308604ddef884037d71ec3e755c68052d30075a181c29358fda516833ace437921b17602b147be7886317be94ec9736faa8cb52be
|
||||||
|
@ -10,7 +10,9 @@ framework: beakerlib
|
|||||||
require:
|
require:
|
||||||
- audit-libs-devel
|
- audit-libs-devel
|
||||||
- binutils
|
- binutils
|
||||||
|
- bison
|
||||||
- gcc
|
- gcc
|
||||||
|
- gcc-c++
|
||||||
- gd-devel
|
- gd-devel
|
||||||
- glibc-devel
|
- glibc-devel
|
||||||
- glibc-static
|
- glibc-static
|
||||||
@ -26,8 +28,11 @@ require:
|
|||||||
- nss-devel
|
- nss-devel
|
||||||
- nss-softokn-devel
|
- nss-softokn-devel
|
||||||
- nss-util-devel
|
- nss-util-devel
|
||||||
|
- python3-devel
|
||||||
- rpm-build
|
- rpm-build
|
||||||
- systemtap-sdt-devel
|
- systemtap-sdt-devel
|
||||||
|
- texinfo
|
||||||
|
- valgrind
|
||||||
- yum-utils
|
- yum-utils
|
||||||
recommend:
|
recommend:
|
||||||
- glibc-devel.ppc
|
- glibc-devel.ppc
|
||||||
@ -64,6 +69,9 @@ adjust:
|
|||||||
- libstdc++-static.i686
|
- libstdc++-static.i686
|
||||||
- libstdc++-static.x86_64
|
- libstdc++-static.x86_64
|
||||||
when: arch == x86_64
|
when: arch == x86_64
|
||||||
|
- require-:
|
||||||
|
- python3-devel
|
||||||
|
when: distro < rhel-8
|
||||||
- enabled: false
|
- enabled: false
|
||||||
when: collection is defined
|
when: collection is defined
|
||||||
continue: false
|
continue: false
|
||||||
|
@ -3,7 +3,7 @@ class X
|
|||||||
{
|
{
|
||||||
T p;
|
T p;
|
||||||
public:
|
public:
|
||||||
template <class U> auto f() -> decltype(+p) { }
|
template <class U> auto f() -> decltype(+p) { return p; }
|
||||||
};
|
};
|
||||||
|
|
||||||
struct A
|
struct A
|
||||||
|
@ -10,7 +10,7 @@ auto apply (T t) -> decltype (t())
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
T f(T t)
|
void f(T t)
|
||||||
{
|
{
|
||||||
T t2 = t;
|
T t2 = t;
|
||||||
if (t != [=]()->T { return t; }())
|
if (t != [=]()->T { return t; }())
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
summary: Try -m32 and -m64 options.
|
summary: Try -m32 and -m64 options.
|
||||||
description: ''
|
description: Try -m32 and -m64 options
|
||||||
contact: mcermak@redhat.com
|
contact: mcermak@redhat.com
|
||||||
component:
|
component:
|
||||||
- gcc
|
- gcc
|
||||||
@ -10,20 +10,16 @@ require:
|
|||||||
- gcc
|
- gcc
|
||||||
- gcc-c++
|
- gcc-c++
|
||||||
- gcc-gfortran
|
- gcc-gfortran
|
||||||
- glibc-common
|
|
||||||
- libgcc
|
|
||||||
- libgomp
|
|
||||||
- libgfortran
|
|
||||||
- libstdc++
|
|
||||||
- libstdc++-devel
|
|
||||||
- glibc-devel
|
- glibc-devel
|
||||||
|
- libgfortran
|
||||||
|
- libgomp
|
||||||
|
- libstdc++-devel
|
||||||
- libitm
|
- libitm
|
||||||
recommend:
|
recommend:
|
||||||
- libgfortran44.i686
|
- libgfortran5
|
||||||
- libgfortran44.x86_64
|
- libitm-devel
|
||||||
- libgfortran4.i686
|
- libquadmath-devel
|
||||||
- libgfortran4.x86_64
|
duration: 20m
|
||||||
duration: 10m
|
|
||||||
enabled: true
|
enabled: true
|
||||||
link:
|
link:
|
||||||
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=1113429
|
- relates: https://bugzilla.redhat.com/show_bug.cgi?id=1113429
|
||||||
@ -31,21 +27,32 @@ adjust:
|
|||||||
- enabled: false
|
- enabled: false
|
||||||
when: arch == ia64, ppc64, s390, s390x
|
when: arch == ia64, ppc64, s390, s390x
|
||||||
continue: false
|
continue: false
|
||||||
- require+:
|
- enabled: false
|
||||||
- glibc-devel.i686
|
when: arch == aarch64
|
||||||
- glibc-devel.x86_64
|
|
||||||
- libgcc.i686
|
|
||||||
- libgcc.x86_64
|
|
||||||
- libgfortran.i686
|
|
||||||
- libgfortran.x86_64
|
|
||||||
- libgomp.i686
|
|
||||||
- libgomp.x86_64
|
|
||||||
- libitm.i686
|
|
||||||
- libitm.x86_64
|
|
||||||
- libstdc++.i686
|
|
||||||
- libstdc++.x86_64
|
|
||||||
when: arch == x86_64
|
|
||||||
continue: false
|
continue: false
|
||||||
|
because: no -m64 nor -m32 there
|
||||||
|
- require+:
|
||||||
|
- glibc-devel.x86_64
|
||||||
|
- glibc-devel.i686
|
||||||
|
- libgfortran.x86_64
|
||||||
|
- libgfortran.i686
|
||||||
|
- libstdc++-devel.x86_64
|
||||||
|
- libstdc++-devel.i686
|
||||||
|
- libitm.x86_64
|
||||||
|
- libitm.i686
|
||||||
|
- libgomp.x86_64
|
||||||
|
- libgomp.i686
|
||||||
|
- libquadmath.x86_64
|
||||||
|
- libquadmath.i686
|
||||||
|
when: arch == x86_64
|
||||||
|
- recommend+:
|
||||||
|
- libgfortran5.x86_64
|
||||||
|
- libgfortran5.i686
|
||||||
|
- libitm-devel.x86_64
|
||||||
|
- libitm-devel.i686
|
||||||
|
- libquadmath-devel.x86_64
|
||||||
|
- libquadmath-devel.i686
|
||||||
|
when: arch == x86_64
|
||||||
extra-nitrate: TC#0197178
|
extra-nitrate: TC#0197178
|
||||||
extra-summary: /tools/gcc/Sanity/test-m32-m64-options
|
extra-summary: /tools/gcc/Sanity/test-m32-m64-options
|
||||||
extra-task: /tools/gcc/Sanity/test-m32-m64-options
|
extra-task: /tools/gcc/Sanity/test-m32-m64-options
|
||||||
|
@ -26,188 +26,142 @@
|
|||||||
#
|
#
|
||||||
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
# This is for Toolset.
|
|
||||||
#
|
|
||||||
# In this test, we try to compile and run programs using -m32 and -m64.
|
# In this test, we try to compile and run programs using -m32 and -m64.
|
||||||
# We compile C, C++ and Fortran Hello World programs. Also, there are two
|
# We compile C, C++ and Fortran Hello World programs. Also, there are two
|
||||||
# proglets which are exercising some C++11 features. Furthermore, we try
|
# proglets which are exercising some C++11 features. Furthermore, we try
|
||||||
# -fgnu-tm, -fopenmp options. We also use libquadmath a little bit.
|
# -fgnu-tm, -fopenmp options. We also use libquadmath a little bit.
|
||||||
# We call a function from libgcc. We also use the __thread keyword.
|
# We call a function from libgcc. We also use the __thread keyword.
|
||||||
# Everything should be ok when running under e.g.:
|
|
||||||
# scl enable devtoolset-1.0 bash
|
|
||||||
# Note, that gfortran is not a part of 1.0 release.
|
|
||||||
|
|
||||||
# Include Beaker environment
|
# Include Beaker environment
|
||||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||||
|
|
||||||
PACKAGES=(gcc gcc-c++ gcc-gfortran glibc-common libgcc libgomp libgfortran glibc-devel libitm)
|
GCC=${GCC:-$(type -P gcc)}
|
||||||
|
GCC_RPM_NAME=$(rpm --qf '%{name}' -qf $GCC)
|
||||||
|
|
||||||
PACKAGES_X86_64=(libgomp libgfortran glibc-devel libgcc libitm)
|
[[ "$GCC_RPM_NAME" == *toolset* ]] && TOOLSET=${GCC_RPM_NAME%-gcc} || TOOLSET=''
|
||||||
|
|
||||||
# Choose the compiler.
|
if [ -n "`rlGetPrimaryArch`" ]; then
|
||||||
GCC=${GCC:-gcc}
|
PRI_ARCH=$(rlGetPrimaryArch)
|
||||||
GXX=${GXX:-g++}
|
else
|
||||||
GFORTRAN=${GFORTRAN:-gfortran}
|
PRI_ARCH="$(uname -i)"
|
||||||
|
|
||||||
PACKAGE=$GCC
|
|
||||||
|
|
||||||
# Set the variabile UNDER_DTS on non-empty string, when run under devtoolset
|
|
||||||
if $( echo `which gcc` | grep -qE '/opt/rh/' ); then
|
|
||||||
UNDER_DTS="true"
|
|
||||||
# Set the actual version of DTS
|
|
||||||
DTS=`which gcc | awk 'BEGIN { FS="/" } { print $4 }'`
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rlJournalStart
|
# State applicable -m<bits> switches
|
||||||
rlPhaseStartSetup
|
SWITCHES='-m64 -m32'
|
||||||
for p in "${PACKAGES[@]}"; do
|
case "$PRI_ARCH" in
|
||||||
rpm -q "$p" || yum install -y $p
|
i686)
|
||||||
rlAssertRpm "$p"
|
SWITCHES=-m32 # just base RHEL-6/i386
|
||||||
done; unset p
|
;;
|
||||||
yum update -y libitm # this is a hack, since libitm is a troublemaker
|
ppc64le) # we never had 32 support there
|
||||||
if [ -n "`rlGetSecondaryArch`" ]; then
|
SWITCHES=-m64
|
||||||
rlCheckRpm "libitm.`rlGetSecondaryArch`" || yum install -y libitm.`rlGetSecondaryArch`
|
;;
|
||||||
rlAssertRpm "libitm.`rlGetSecondaryArch`"
|
aarch64)
|
||||||
fi
|
# Not only we never had 32-bit support there, GCC on this architecture
|
||||||
|
# doesn't accept the -m64 switch either. This test isn't applicable
|
||||||
rlCheckRpm "libstdc++-devel.`rlGetPrimaryArch`" || yum install -y libstdc++-devel.`rlGetPrimaryArch`
|
# at all and should be excluded by its relevancy, e.g. in TCMS:
|
||||||
rlAssertRpm "libstdc++-devel.`rlGetPrimaryArch`"
|
# arch = aarch64: False
|
||||||
# RHEL-8 CI debugging hack (to be removed when not needed):
|
exit 1
|
||||||
rlRun "rpmquery -l libstdc++-devel.`rlGetPrimaryArch` | grep -e bits/c++config"
|
;;
|
||||||
rlRun "rpmquery -l libstdc++-devel.`rlGetPrimaryArch` | grep -e iostream"
|
ppc64|s390x) # 32-bit support present only in system GCC of RHEL <8
|
||||||
|
if [[ -z "$TOOLSET" ]] && rlIsRHEL '<8'; then
|
||||||
if [ -n "`rlGetSecondaryArch`" ]; then
|
if [[ "$PRI_ARCH" != s390x ]]; then
|
||||||
rlCheckRpm "libitm.`rlGetSecondaryArch`" || yum install -y libitm.`rlGetSecondaryArch`
|
SWITCHES='-m64 -m32'
|
||||||
rlAssertRpm "libitm.`rlGetSecondaryArch`"
|
else
|
||||||
fi
|
SWITCHES='-m64 -m31'
|
||||||
|
fi
|
||||||
if [ ! -z ${UNDER_DTS} ]; then
|
else
|
||||||
rlCheckRpm "$DTS-libstdc++-devel" || yum install -y $DTS-libstdc++-devel
|
SWITCHES=-m64
|
||||||
rlAssertRpm "$DTS-libstdc++-devel"
|
|
||||||
if [ "`arch`" = 'x86_64' ]; then
|
|
||||||
rlCheckRpm "$DTS-libquadmath-devel" || yum install -y $DTS-libquadmath-devel
|
|
||||||
rlAssertRpm "$DTS-libquadmath-devel"
|
|
||||||
fi
|
|
||||||
if rlIsRHEL '<=7'; then # no libgfortran[45] on RHEL8+
|
|
||||||
rlCheckRpm "libgfortran4" || yum install -y libgfortran4
|
|
||||||
if [ -n "`rlGetSecondaryArch`" ]; then
|
|
||||||
rlCheckRpm "libgfortran4.`rlGetSecondaryArch`" || yum install -y libgfortran4.`rlGetSecondaryArch`
|
|
||||||
rlAssertRpm "libgfortran4.`rlGetSecondaryArch`"
|
|
||||||
fi
|
fi
|
||||||
rlCheckRpm "libgfortran5" || yum install -y libgfortran5
|
;;
|
||||||
rlAssertRpm "libgfortran5" && yum -y update libgfortran5
|
|
||||||
if [ -n "`rlGetSecondaryArch`" ]; then
|
|
||||||
rlCheckRpm "libgfortran5.`rlGetSecondaryArch`" || yum install -y libgfortran5.`rlGetSecondaryArch`
|
|
||||||
rlAssertRpm "libgfortran5.`rlGetSecondaryArch`"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Check whether on rhel6 x86_64 i686-packages are installed too.
|
|
||||||
# On rhel5 i386-packages should be already installed.
|
|
||||||
if [ "$(uname -i)" == "x86_64" ]; then
|
|
||||||
for pack in "${PACKAGES_X86_64[@]}"; do
|
|
||||||
rpm -q ${pack}.i?86 || yum install -y ${pack}.i?86
|
|
||||||
done; unset pack
|
|
||||||
|
|
||||||
if [ ! -z ${UNDER_DTS} ]; then
|
|
||||||
yum install -y $DTS-libstdc++-devel.i?86
|
|
||||||
yum install -y $DTS-libquadmath-devel.i?86
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory"
|
|
||||||
# We need some files.
|
|
||||||
rlRun "cp -v hello.{c,cpp,f90} tm.c quad.c thr-init-2.c \
|
|
||||||
clear_cache.c omphello.c lambda-template.C cpp11.cpp $TmpDir"
|
|
||||||
rlRun "pushd $TmpDir"
|
|
||||||
rlPhaseEnd
|
|
||||||
|
|
||||||
rlPhaseStartSetup "Showing compiler versions"
|
|
||||||
for compiler in $GCC $GXX $GFORTRAN
|
|
||||||
do
|
|
||||||
rlLog "Version of compiler: $compiler"
|
|
||||||
eval "$compiler --version 2>&1" | while read line
|
|
||||||
do
|
|
||||||
rlLog " $line"
|
|
||||||
done
|
|
||||||
done
|
|
||||||
rlPhaseEnd
|
|
||||||
|
|
||||||
ARCH="$(uname -i)"
|
|
||||||
case "$ARCH" in
|
|
||||||
"aarch64") export SWITCHES="-mlittle-endian" # we don't have -m64, so let's use some dummy switch that is enabled by default
|
|
||||||
;;
|
|
||||||
"i386") export SWITCHES="-m32"
|
|
||||||
;;
|
|
||||||
"ppc64") export SWITCHES="-m32 -m64"
|
|
||||||
;;
|
|
||||||
"ppc64le") export SWITCHES="-m64"
|
|
||||||
;;
|
|
||||||
"s390x") export SWITCHES="-m31 -m64"
|
|
||||||
;;
|
|
||||||
"x86_64") export SWITCHES="-m32 -m64"
|
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Always try both -m32 and -m64.
|
rlJournalStart
|
||||||
for m in $SWITCHES; do
|
rlPhaseStartSetup
|
||||||
rlPhaseStartTest "Compile and run [$m]"
|
rlLogInfo "COLLECTIONS=$COLLECTIONS"
|
||||||
rlRun "$GCC $m hello.c -o hello_c"
|
rlLogInfo "GCC=$GCC"
|
||||||
rlRun "./hello_c"
|
rlLogInfo "SKIP_COLLECTION_METAPACKAGE_CHECK=$SKIP_COLLECTION_METAPACKAGE_CHECK"
|
||||||
|
|
||||||
rlRun "$GXX $m hello.cpp -o hello_cpp"
|
# We optionally need to skip checking for the presence of the metapackage
|
||||||
rlRun "./hello_cpp"
|
# because that would pull in all the dependent toolset subrpms. We do not
|
||||||
|
# always want that, especially in CI.
|
||||||
|
_COLLECTIONS="$COLLECTIONS"
|
||||||
|
if ! test -z $SKIP_COLLECTION_METAPACKAGE_CHECK; then
|
||||||
|
for c in $SKIP_COLLECTION_METAPACKAGE_CHECK; do
|
||||||
|
rlLogInfo "ignoring metapackage check for collection $c"
|
||||||
|
export COLLECTIONS=$(shopt -s extglob && echo ${COLLECTIONS//$c/})
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
rlLogInfo "(without skipped) COLLECTIONS=$COLLECTIONS"
|
||||||
|
export COLLECTIONS="$_COLLECTIONS"
|
||||||
|
|
||||||
# Now try a few C++11 features.
|
rlRun "TmpDir=\$(mktemp -d)"
|
||||||
$GXX -xc++ -std=c++11 - <<< "int main(){}"
|
rlRun "cp -v hello.{c,cpp,f90} tm.c quad.c thr-init-2.c clear_cache.c omphello.c lambda-template.C cpp11.cpp $TmpDir"
|
||||||
if test $? -eq 0; then
|
rlRun "pushd $TmpDir"
|
||||||
rlRun "$GXX $m -std=c++11 lambda-template.C -o lambda"
|
rlPhaseEnd
|
||||||
rlRun "./lambda"
|
|
||||||
|
|
||||||
rlRun "$GXX $m -std=c++11 cpp11.cpp -o cpp11"
|
rlPhaseStartSetup "Showing compiler versions"
|
||||||
rlRun "./cpp11"
|
for compiler in gcc g++ gfortran; do
|
||||||
fi
|
rlLogInfo "Version of compiler: $compiler"
|
||||||
|
eval "$compiler --version 2>&1" | while read line; do
|
||||||
|
rlLogInfo " $line"
|
||||||
|
done
|
||||||
|
done
|
||||||
|
rlPhaseEnd
|
||||||
|
|
||||||
rlRun "$GFORTRAN $m hello.f90 -o hello_fortran"
|
for m in $SWITCHES; do
|
||||||
rlRun "./hello_fortran"
|
rlPhaseStartTest "Compile and run [$m]"
|
||||||
|
|
||||||
# TM support is GCC >=4.7 only.
|
# Test C
|
||||||
$GCC -xc -O2 -std=gnu99 -fgnu-tm - <<< "int main(){}"
|
rlRun "gcc $m hello.c -o hello_c"
|
||||||
if test $? -eq 0; then
|
rlRun ./hello_c
|
||||||
rlRun "$GCC $m -O2 -std=gnu99 -fgnu-tm tm.c -o tm"
|
|
||||||
rlRun "./tm"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Test OpenMP.
|
# Test C++
|
||||||
rlRun "$GCC $m omphello.c -O2 -std=gnu99 -fopenmp -o omp"
|
rlRun "g++ $m hello.cpp -o hello_cpp"
|
||||||
rlRun "./omp"
|
rlRun ./hello_cpp
|
||||||
|
|
||||||
# Test __thread.
|
# C++11 features. Not available in system GCC of RHEL-6
|
||||||
rlRun "$GCC $m thr-init-2.c -O2 -std=gnu99 -ftls-model=initial-exec -o thr"
|
if ! rlIsRHEL 6 || [[ -n "$TOOLSET" ]]; then
|
||||||
rlRun "./thr"
|
rlRun "g++ $m -std=c++11 lambda-template.C -o lambda"
|
||||||
|
rlRun ./lambda
|
||||||
|
|
||||||
# Now test some libquadmath stuff (__float128 support).
|
rlRun "g++ $m -std=c++11 cpp11.cpp -o cpp11"
|
||||||
# libquadmath is mising on RHEL machines, usually.
|
rlRun ./cpp11
|
||||||
# But with DTS, this should be available.
|
fi
|
||||||
if [ ! -z ${UNDER_DTS} ]; then
|
|
||||||
if [ "`arch`" = 'x86_64' ]; then
|
|
||||||
rlRun "$GCC $m quad.c -O2 -std=gnu99 -lquadmath -o quad -lm"
|
|
||||||
rlRun "./quad"
|
|
||||||
else
|
|
||||||
rlLog "quadmath test skipped (needs x86_64)"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# And now something from libgcc, e.g. __builtin___clear_cache.
|
# Test Fortran
|
||||||
rlRun "$GCC $m clear_cache.c -O2 -std=gnu99 -o cache"
|
rlRun "gfortran $m hello.f90 -o hello_fortran"
|
||||||
rlRun "./cache"
|
rlRun "./hello_fortran"
|
||||||
rlPhaseEnd
|
|
||||||
done; unset m
|
|
||||||
|
|
||||||
rlPhaseStartCleanup
|
# Test TM. Not available in system GCC of RHEL-6
|
||||||
rlRun "popd"
|
if ! rlIsRHEL 6 || [[ -n "$TOOLSET" ]]; then
|
||||||
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
|
rlRun "gcc $m -O2 -std=gnu99 -fgnu-tm tm.c -o tm"
|
||||||
rlPhaseEnd
|
rlRun ./tm
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Test OpenMP
|
||||||
|
rlRun "gcc $m omphello.c -O2 -std=gnu99 -fopenmp -o omp"
|
||||||
|
rlRun ./omp
|
||||||
|
|
||||||
|
# Test __thread
|
||||||
|
rlRun "gcc $m thr-init-2.c -O2 -std=gnu99 -ftls-model=initial-exec -o thr"
|
||||||
|
rlRun ./thr
|
||||||
|
|
||||||
|
# Now test some libquadmath stuff (__float128 support).
|
||||||
|
if rpm -q ${GCC_RPM_NAME%%gcc}libquadmath-devel &>/dev/null; then
|
||||||
|
rlRun "gcc $m quad.c -O2 -std=gnu99 -lquadmath -o quad -lm"
|
||||||
|
rlRun ./quad
|
||||||
|
fi
|
||||||
|
|
||||||
|
# And now something from libgcc, e.g. __builtin___clear_cache.
|
||||||
|
rlRun "gcc $m clear_cache.c -O2 -std=gnu99 -o cache"
|
||||||
|
rlRun ./cache
|
||||||
|
|
||||||
|
rlPhaseEnd
|
||||||
|
done
|
||||||
|
|
||||||
|
rlPhaseStartCleanup
|
||||||
|
rlRun popd
|
||||||
|
rlRun "rm -r $TmpDir"
|
||||||
|
rlPhaseEnd
|
||||||
rlJournalPrintText
|
rlJournalPrintText
|
||||||
rlJournalEnd
|
rlJournalEnd
|
||||||
|
Loading…
Reference in New Issue
Block a user