Initial version of gcc-toolset-15-gcc

Related: RHEL-81741
This commit is contained in:
Marek Polacek 2025-05-28 11:07:59 -04:00
parent 24e77083e8
commit 7a8476ea67
23 changed files with 3071 additions and 1349 deletions

View File

@ -92,10 +92,10 @@ diff --git a/libstdc++-v3/testsuite/lib/libstdc++.exp b/libstdc++-v3/testsuite/l
index 7f9580db8..5e4b32f76 100644
--- a/libstdc++-v3/testsuite/lib/libstdc++.exp
+++ b/libstdc++-v3/testsuite/lib/libstdc++.exp
@@ -58,6 +58,7 @@ load_gcc_lib timeout.exp
load_gcc_lib timeout-dg.exp
@@ -74,6 +74,7 @@
load_gcc_lib wrapper.exp
load_gcc_lib target-utils.exp
load_gcc_lib dg-test-cleanup.exp
+load_lib dts.exp
# Useful for debugging. Pass the name of a variable and the verbosity

View File

@ -2,9 +2,9 @@ diff --git a/gcc/testsuite/g++.dg/warn/Wfree-nonheap-object-3.C b/gcc/testsuite/
index 47f97dcb636..66f07aaa749 100644
--- a/gcc/testsuite/g++.dg/warn/Wfree-nonheap-object-3.C
+++ b/gcc/testsuite/g++.dg/warn/Wfree-nonheap-object-3.C
@@ -4,6 +4,8 @@
{ dg-do compile { target c++11 } }
{ dg-options "-O2 -Wall" } */
@@ -5,6 +5,8 @@
{ dg-options "-O2 -Wall" }
{ dg-skip-if "requires hosted libstdc++ for string" { ! hostedlib } } */
+#define _GLIBCXX_USE_CXX11_ABI 1
+

View File

@ -6,23 +6,31 @@ BuildRequires: scl-utils-build
%{?scl:%global __strip %%{_scl_root}/usr/bin/strip}
%{?scl:%global __objdump %%{_scl_root}/usr/bin/objdump}
%{?scl:%scl_package gcc}
%global DATE 20250110
%global gitrev e525669e462dd777a1af9932fe9188937acdeb69
%global gcc_version 14.2.1
%global gcc_major 14
%global DATE 20250521
%global gitrev b9def1721b12cae307c1a1ebc49030fce6531dfa
%global gcc_version 15.1.1
%global gcc_major 15
# Note, gcc_release must be integer, if you want to add suffixes to
# %%{release}, append them after %%{gcc_release} on Release: line.
%global gcc_release 7
%global gcc_release 2
%global nvptx_tools_gitrev 87ce9dc5999e5fca2e1d3478a30888d9864c9804
%global newlib_cygwin_gitrev d45261f62a15f8abd94a1031020b9a9f455e4eed
%global newlib_cygwin_gitrev d35cc82b5ec15bb8a5fe0fe11e183d1887992e99
%global isl_version 0.24
%global mpc_version 1.0.3
%global mpfr_version 3.1.4
%global gmp_version 6.1.0
%global doxygen_version 1.8.0
%global _unpackaged_files_terminate_build 0
%if 0%{?fedora:1}
%global _performance_build 1
# Hardening slows the compiler way too much.
%undefine _hardened_build
%endif
%undefine _auto_set_build_flags
%if 0%{?fedora} > 27 || 0%{?rhel} > 7
# Until annobin is fixed (#1519165).
%undefine _annotated_build
%endif
# Strip will fail on nvptx-none *.a archives and the brp-* scripts will
# fail randomly depending on what is stripped last.
%if 0%{?__brp_strip_static_archive:1}
@ -42,6 +50,7 @@ BuildRequires: scl-utils-build
%global build_go 0
%global build_d 0
%global build_m2 0
%global build_cobol 0
%else
%ifarch %{ix86} x86_64 ia64 ppc %{power64} alpha s390x %{arm} aarch64 riscv64
%global build_ada 0
@ -64,12 +73,12 @@ BuildRequires: scl-utils-build
%else
%global build_m2 0
%endif
%ifarch x86_64 aarch64
%global build_cobol 0
%else
%global build_cobol 0
%endif
# Only so that rpmbuild doesn't complain on Fedora.
%if 0%{?fedora} > 18
%global build_libquadmath 0
%endif
%global build_libitm 0
%ifarch %{ix86} x86_64 ia64 ppc64le
%global build_libquadmath 1
%else
@ -122,7 +131,8 @@ BuildRequires: scl-utils-build
%global attr_ifunc 0
%endif
%ifarch x86_64 ppc64le
%global build_offload_nvptx 1
# FIXME fails with nvptx-as: missing .version directive at start of file
%global build_offload_nvptx 0
%else
%global build_offload_nvptx 0
%endif
@ -145,7 +155,7 @@ BuildRequires: scl-utils-build
%ifarch x86_64
%global multilib_32_arch i686
%endif
%if 0%{?fedora} >= 36 || 0%{?rhel} >= 8
%if 0%{?fedora} >= 36 || 0%{?rhel} > 8
%global build_annobin_plugin 1
%else
%global build_annobin_plugin 0
@ -153,7 +163,7 @@ BuildRequires: scl-utils-build
Summary: GCC version %{gcc_major}
Name: %{?scl_prefix}gcc
Version: %{gcc_version}
Release: %{gcc_release}.2%{?dist}
Release: %{gcc_release}%{?dist}
# License notes for some of the less obvious ones:
# gcc/doc/cppinternals.texi: Linux-man-pages-copyleft-2-para
# isl: MIT, BSD-2-Clause
@ -184,7 +194,7 @@ Source1: https://gcc.gnu.org/pub/gcc/infrastructure/isl-%{isl_version}.tar.bz2
Source4: nvptx-tools-%{nvptx_tools_gitrev}.tar.xz
# The source for nvptx-newlib package was pulled from upstream's vcs. Use the
# following commands to generate the tarball:
# git clone git://sourceware.org/git/newlib-cygwin.git newlib-cygwin-dir.tmp
# git clone https://sourceware.org/git/newlib-cygwin.git newlib-cygwin-dir.tmp
# git --git-dir=newlib-cygwin-dir.tmp/.git archive --prefix=newlib-cygwin-%%{newlib_cygwin_gitrev}/ %%{newlib_cygwin_gitrev} ":(exclude)newlib/libc/sys/linux/include/rpc/*.[hx]" | xz -9e > newlib-cygwin-%%{newlib_cygwin_gitrev}.tar.xz
# rm -rf newlib-cygwin-dir.tmp
Source5: newlib-cygwin-%{newlib_cygwin_gitrev}.tar.xz
@ -204,7 +214,8 @@ URL: http://gcc.gnu.org
# Need binutils which support -plugin
# Need binutils which support .loc view >= 2.30
# Need binutils which support --generate-missing-build-notes=yes >= 2.31
BuildRequires: %{?scl_prefix}binutils >= 2.31
# Need binutils which support .base64 >= 2.43
BuildRequires: %{?scl_prefix}binutils >= 2.43
# For VTA guality testing
%if 0%{?rhel} >= 9
BuildRequires: gdb >= 7.4.50
@ -254,7 +265,8 @@ BuildRequires: libunwind >= 0.98
# Need binutils that support -plugin
# Need binutils that support .loc view >= 2.30
# Need binutils which support --generate-missing-build-notes=yes >= 2.31
Requires: %{?scl_prefix}binutils >= 2.22.52.0.1
# Need binutils that support .base64 >= 2.43
Requires: %{?scl_prefix}binutils >= 2.43
# Make sure gdb will understand DW_FORM_strp
Conflicts: gdb < 5.1-2
Requires: glibc-devel >= 2.2.90-12
@ -322,26 +334,25 @@ Provides: liblto_plugin.so.0
%global oformat OUTPUT_FORMAT(elf64-littleaarch64)
%endif
Patch0: gcc14-hack.patch
Patch2: gcc14-sparc-config-detection.patch
Patch3: gcc14-libgomp-omp_h-multilib.patch
Patch4: gcc14-libtool-no-rpath.patch
Patch5: gcc14-isl-dl.patch
Patch6: gcc14-isl-dl2.patch
Patch7: gcc14-libstdc++-docs.patch
Patch8: gcc14-no-add-needed.patch
Patch9: gcc14-Wno-format-security.patch
Patch10: gcc14-rh1574936.patch
Patch11: gcc14-d-shared-libphobos.patch
Patch12: gcc14-pr101523.patch
Patch13: gcc14-pr118509.patch
Patch0: gcc15-hack.patch
Patch2: gcc15-sparc-config-detection.patch
Patch3: gcc15-libgomp-omp_h-multilib.patch
Patch4: gcc15-libtool-no-rpath.patch
Patch5: gcc15-isl-dl.patch
Patch6: gcc15-isl-dl2.patch
Patch7: gcc15-libstdc++-docs.patch
Patch8: gcc15-no-add-needed.patch
Patch9: gcc15-Wno-format-security.patch
Patch10: gcc15-rh1574936.patch
Patch11: gcc15-d-shared-libphobos.patch
Patch12: gcc15-pr119006.patch
Patch50: isl-rh2155127.patch
Patch100: gcc14-fortran-fdec-duplicates.patch
Patch100: gcc15-fortran-fdec-duplicates.patch
Patch1000: gcc14-libstdc++-compat.patch
Patch1001: gcc14-libgfortran-compat.patch
Patch1000: gcc15-libstdc++-compat.patch
Patch1001: gcc15-libgfortran-compat.patch
Patch3000: 0001-basic_string-reserve-n-semantics-are-not-available-i.patch
@ -357,7 +368,7 @@ Patch3010: 0014-Conditionalize-tests-for-PR-libstdc-98466-on-__LIBST.patch
Patch3011: 0015-Conditionalize-test-for-PR-libstdc-87135-on-__LIBSTD.patch
Patch3012: 0016-Conditionalize-test-for-hashtable-bucket-sizes-on-__.patch
Patch3013: 0017-Conditionalize-test-for-PR-libstdc-71181-on-__LIBSTD.patch
Patch3014: gcc14-dg-ice-fixes.patch
Patch3014: gcc15-dg-ice-fixes.patch
Patch3015: 0018-Use-CXX11-ABI.patch
Patch3017: 0020-more-fixes.patch
Patch3018: 0021-libstdc++-disable-tests.patch
@ -683,8 +694,7 @@ so that there cannot be any synchronization problems.
%patch -P9 -p0 -b .Wno-format-security~
%patch -P10 -p0 -b .rh1574936~
%patch -P11 -p0 -b .d-shared-libphobos~
%patch -P12 -p1 -b .pr101523~
%patch -P13 -p0 -b .pr118509~
%patch -P12 -p0 -b .pr119006~
%patch -P100 -p1 -b .fortran-fdec-duplicates~
@ -737,7 +747,6 @@ sed -i 's/\(version for most targets is \)5 /\14 /' gcc/doc/invoke.texi
cp -a libstdc++-v3/config/cpu/i{4,3}86/atomicity.h
cp -a libstdc++-v3/config/cpu/i{4,3}86/opt
echo 'TM_H += $(srcdir)/config/rs6000/rs6000-modes.h' >> gcc/config/rs6000/t-rs6000
./contrib/gcc_update --touch
@ -916,13 +925,17 @@ CONFIGURE_OPTS="\
%else
--without-isl \
%endif
%if %{build_offload_nvptx}
--enable-offload-targets=nvptx-none \
--without-cuda-driver --enable-offload-defaulted \
%if %{build_offload_nvptx} || %{build_offload_amdgcn}
--enable-offload-targets=$offloadtgts --enable-offload-defaulted \
%endif
%if %{build_offload_nvptx}
--without-cuda-driver \
%endif
%if 0%{?fedora} >= 21 || 0%{?rhel} >= 7
%if %{attr_ifunc}
--enable-gnu-indirect-function \
%endif
%endif
%ifarch %{arm}
--disable-sjlj-exceptions \
%endif
@ -949,7 +962,11 @@ CONFIGURE_OPTS="\
%endif
%ifarch ppc64le
%if 0%{?rhel} >= 9
%if 0%{?rhel} >= 10
--with-cpu-32=power9 --with-tune-32=power10 --with-cpu-64=power9 --with-tune-64=power10 \
%else
--with-cpu-32=power9 --with-tune-32=power9 --with-cpu-64=power9 --with-tune-64=power9 \
%endif
%else
--with-cpu-32=power8 --with-tune-32=power8 --with-cpu-64=power8 --with-tune-64=power8 \
%endif
@ -958,9 +975,7 @@ CONFIGURE_OPTS="\
--build=%{gcc_target_platform} --target=%{gcc_target_platform} --with-cpu=default32
%endif
%ifarch %{ix86} x86_64
%if 0%{?rhel} >= 8
--enable-cet \
%endif
--with-tune=generic \
%endif
%ifarch %{ix86}
@ -968,7 +983,11 @@ CONFIGURE_OPTS="\
%endif
%ifarch x86_64
%if 0%{?rhel} > 8
%if 0%{?rhel} > 9
--with-arch_64=x86-64-v3 \
%else
--with-arch_64=x86-64-v2 \
%endif
%endif
--with-arch_32=x86-64 \
%endif
@ -1063,7 +1082,7 @@ CC="$CC" CXX="$CXX" CFLAGS="$OPT_FLAGS" \
| sed 's/ -Wformat-security / -Wformat -Wformat-security /'`" \
XCFLAGS="$OPT_FLAGS" TCFLAGS="$OPT_FLAGS" \
../../configure --disable-bootstrap --enable-host-shared \
--enable-languages=jit $CONFIGURE_OPTS
--enable-languages=jit --enable-libgdiagnostics $CONFIGURE_OPTS
make %{?_smp_mflags} BOOT_CFLAGS="$OPT_FLAGS" all-gcc
cp -a gcc/libgccjit.so* ../gcc/
cd ../gcc/
@ -1191,6 +1210,7 @@ cd obj-offload-nvptx-none
make prefix=%{buildroot}%{_prefix} mandir=%{buildroot}%{_mandir} \
infodir=%{buildroot}%{_infodir} install
rm -rf %{buildroot}%{_prefix}/libexec/gcc/nvptx-none/%{gcc_major}/install-tools
rm -rf %{buildroot}%{_prefix}/libexec/gcc/nvptx-none/%{gcc_major}/g++-mapper-server
rm -rf %{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_major}/accel/nvptx-none/{install-tools,plugin,cc1,cc1plus,f951}
rm -rf %{buildroot}%{_infodir} %{buildroot}%{_mandir}/man7 %{buildroot}%{_prefix}/share/locale
rm -rf %{buildroot}%{_prefix}/lib/gcc/nvptx-none/%{gcc_major}/{install-tools,plugin}
@ -1904,6 +1924,13 @@ cp -a %{_builddir}/gcc-%{version}-%{DATE}/annobin-plugin/annobin*/gcc-plugin/.li
pushd $FULLPATH/plugin/
ln -sf gts-gcc-annobin.so.0.0.0 gts-gcc-annobin.so.0
ln -sf gts-gcc-annobin.so.0.0.0 gts-gcc-annobin.so
# On RHEL9 and later there is no GTS annobin from GTS15 onwards.
%if 0%{?rhel} > 8
ln -sf gts-gcc-annobin.so.0.0.0 annobin.so
ln -sf gts-gcc-annobin.so.0.0.0 gcc-annobin.so
ln -sf gts-gcc-annobin.so.0.0.0 annobin.so.0.0.0
ln -sf gts-gcc-annobin.so.0.0.0 gcc-annobin.so.0.0.0
%endif
popd
%endif
@ -2144,9 +2171,7 @@ fi
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/xsaveintrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/xsaveoptintrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/avx512cdintrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/avx512erintrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/avx512fintrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/avx512pfintrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/shaintrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/mm_malloc.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/mm3dnow.h
@ -2168,8 +2193,6 @@ fi
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/xsavesintrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/clzerointrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/pkuintrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/avx5124fmapsintrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/avx5124vnniwintrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/avx512vpopcntdqintrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/sgxintrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/gfniintrin.h
@ -2220,6 +2243,23 @@ fi
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/sm3intrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/sm4intrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/usermsrintrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/amxavx512intrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/amxfp8intrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/amxmovrsintrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/amxtf32intrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/amxtransposeintrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/avx10_2-512bf16intrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/avx10_2-512convertintrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/avx10_2-512mediaintrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/avx10_2-512minmaxintrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/avx10_2-512satcvtintrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/avx10_2bf16intrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/avx10_2convertintrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/avx10_2copyintrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/avx10_2mediaintrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/avx10_2minmaxintrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/avx10_2satcvtintrin.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/movrsintrin.h
%endif
%ifarch ia64
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/ia64intrin.h
@ -2264,6 +2304,10 @@ fi
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/arm_fp16.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/arm_bf16.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/arm_sve.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/arm_sme.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/arm_neon_sve_bridge.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/arm_private_fp8.h
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/arm_private_neon_types.h
%endif
%ifarch sparc sparcv9 sparc64
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/include/visintrin.h
@ -2424,6 +2468,10 @@ fi
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/plugin/gts-gcc-annobin.so
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/plugin/gts-gcc-annobin.so.0
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/plugin/gts-gcc-annobin.so.0.0.0
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/plugin/annobin.so
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/plugin/gcc-annobin.so
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/plugin/annobin.so.0.0.0
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_major}/plugin/gcc-annobin.so.0.0.0
%endif
%files c++
@ -2797,6 +2845,31 @@ fi
%endif
%changelog
* Wed May 21 2025 Marek Polacek <polacek@redhat.com> 15.1.1-2
- update from releases/gcc-15 branch
- PRs ada/112958, ada/120104, c/120057, c++/119863, c++/119864, c++/119938,
c++/119939, c++/119981, c++/119996, c++/120012, c++/120013,
c++/120023, c++/120125, c++/120161, c++/120350, fortran/102891,
fortran/102900, fortran/119928, fortran/119986, fortran/120049,
fortran/120107, fortran/120139, fortran/120163, fortran/120179,
fortran/120191, ipa/119852, ipa/119973, ipa/120006, ipa/120146,
libfortran/120152, libfortran/120153, libfortran/120158,
libfortran/120196, libstdc++/118260, libstdc++/119427,
libstdc++/119714, libstdc++/120029, libstdc++/120114,
libstdc++/120159, libstdc++/120187, libstdc++/120190,
libstdc++/120198, libstdc++/120293, modula2/115276, modula2/119914,
modula2/119915, modula2/120117, modula2/120188, preprocessor/116047,
preprocessor/120061, target/119610, testsuite/119909,
tree-optimization/111873, tree-optimization/119712,
tree-optimization/120043, tree-optimization/120048,
tree-optimization/120074, tree-optimization/120089,
tree-optimization/120143, tree-optimization/120211
* Mon May 19 2025 Marek Polacek <polacek@redhat.com> 15.1.1-1
- update from releases/gcc-15 branch
- GCC 15.1 release
- PRs fortran/119836, target/119327, target/119873, tree-optimization/118407
* Mon May 12 2025 Siddhesh Poyarekar <siddhesh@redhat.com> 14.2.1-7.2
- Fix GTS version in package name.

View File

@ -1,754 +0,0 @@
--- libgfortran/Makefile.am.jj 2024-04-26 11:47:02.740161941 +0200
+++ libgfortran/Makefile.am 2024-07-19 16:22:00.633418680 +0200
@@ -50,6 +50,7 @@ LTLDFLAGS = $(shell $(SHELL) $(top_srcdi
$(lt_host_flags)
toolexeclib_LTLIBRARIES = libgfortran.la
+noinst_LTLIBRARIES = libgfortran_nonshared80.la libgfortran_nonshared110.la
toolexeclib_DATA = libgfortran.spec
libgfortran_la_LINK = $(LINK) $(libgfortran_la_LDFLAGS)
libgfortran_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` \
@@ -1128,6 +1129,98 @@ BUILT_SOURCES=$(gfor_built_src) $(gfor_b
libgfortran_la_SOURCES = $(gfor_src) $(gfor_built_src) $(gfor_io_src) \
$(gfor_helper_src) $(gfor_ieee_src) $(gfor_io_headers) $(gfor_specific_src)
+$(patsubst %.c,%.lo,$(nonshared_generated_C_SRC) $(nonshared)): \
+nonshared-%.lo: $(srcdir)/generated/%.c
+ $(LTCOMPILE) -c -o $@ $< -DLIBGFORTRAN_NONSHARED
+
+$(patsubst %.c,%.o,$(nonshared_generated_C_SRC) $(nonshared)): \
+nonshared-%.o: $(srcdir)/generated/%.c
+ $(COMPILE) -c -o $@ $< -DLIBGFORTRAN_NONSHARED
+
+$(patsubst %.c,%.lo,$(nonshared_intrinsics_C_SRC) $(nonshared)): \
+nonshared-%.lo: $(srcdir)/intrinsics/%.c
+ $(LTCOMPILE) -c -o $@ $< -DLIBGFORTRAN_NONSHARED
+
+$(patsubst %.c,%.o,$(nonshared_intrinsics_C_SRC) $(nonshared)): \
+nonshared-%.o: $(srcdir)/intrinsics/%.c
+ $(COMPILE) -c -o $@ $< -DLIBGFORTRAN_NONSHARED
+
+$(patsubst %.c,%.lo,$(nonshared_runtime_C_SRC) $(nonshared)): \
+nonshared-%.lo: $(srcdir)/runtime/%.c
+ $(LTCOMPILE) -c -o $@ $< -DLIBGFORTRAN_NONSHARED
+
+$(patsubst %.c,%.o,$(nonshared_runtime_C_SRC) $(nonshared)): \
+nonshared-%.o: $(srcdir)/runtime/%.c
+ $(COMPILE) -c -o $@ $< -DLIBGFORTRAN_NONSHARED
+
+$(patsubst %.f90,%.lo,$(nonshared_intrinsics_f90_SRC) $(nonshared)): \
+nonshared-%.lo: $(srcdir)/intrinsics/%.f90
+ $(LTPPFCCOMPILE) -c -o $@ $< -fallow-leading-underscore
+
+$(patsubst %.f90,%.o,$(nonshared_intrinsics_f90_SRC) $(nonshared)): \
+nonshared-%.o: $(srcdir)/intrinsics/%.f90
+ $(PPFCCOMPILE) -c -o $@ $< -fallow-leading-underscore
+
+nonshared_runtime_C_SRC = \
+nonshared-ISO_Fortran_binding.c
+
+nonshared_io_C_SRC = \
+$(srcdir)/io/nonshared-transfer.c
+
+nonshared_generated_C_SRC = \
+nonshared-findloc0_i1.c \
+nonshared-findloc0_i2.c \
+nonshared-findloc0_i4.c \
+nonshared-findloc0_i8.c \
+nonshared-findloc0_i16.c \
+nonshared-findloc0_r4.c \
+nonshared-findloc0_r8.c \
+nonshared-findloc0_r10.c \
+nonshared-findloc0_r16.c \
+nonshared-findloc0_c4.c \
+nonshared-findloc0_c8.c \
+nonshared-findloc0_c10.c \
+nonshared-findloc0_c16.c \
+nonshared-findloc0_s1.c \
+nonshared-findloc0_s4.c \
+nonshared-findloc1_i1.c \
+nonshared-findloc1_i2.c \
+nonshared-findloc1_i4.c \
+nonshared-findloc1_i8.c \
+nonshared-findloc1_i16.c \
+nonshared-findloc1_r4.c \
+nonshared-findloc1_r8.c \
+nonshared-findloc1_r10.c \
+nonshared-findloc1_r16.c \
+nonshared-findloc1_c4.c \
+nonshared-findloc1_c8.c \
+nonshared-findloc1_c10.c \
+nonshared-findloc1_c16.c \
+nonshared-findloc1_s1.c \
+nonshared-findloc1_s4.c \
+nonshared-findloc2_s1.c \
+nonshared-findloc2_s4.c
+
+nonshared_intrinsics_C_SRC = \
+nonshared-is_contiguous.c \
+nonshared-trigd.c
+
+nonshared_intrinsics_f90_SRC = \
+nonshared-random_init.f90
+
+libgfortran_nonshared80_la_SOURCES = \
+$(nonshared_runtime_C_SRC) \
+$(nonshared_generated_C_SRC) \
+$(nonshared_intrinsics_C_SRC) \
+$(nonshared_intrinsics_f90_SRC) \
+$(srcdir)/ieee/nonshared-ieee_arithmetic.c \
+$(srcdir)/ieee/nonshared-ieee_exceptions.c \
+$(srcdir)/io/nonshared-transfer.c \
+$(srcdir)/runtime/nonshared-error.c
+
+libgfortran_nonshared110_la_SOURCES = \
+$(srcdir)/ieee/nonshared-ieee_exceptions.c
+
I_M4_DEPS=m4/iparm.m4 m4/mtype.m4
I_M4_DEPS0=$(I_M4_DEPS) m4/iforeach.m4
I_M4_DEPS1=$(I_M4_DEPS) m4/ifunction.m4
--- libgfortran/ieee/nonshared-ieee_exceptions.c.jj 2024-07-19 16:22:00.655418401 +0200
+++ libgfortran/ieee/nonshared-ieee_exceptions.c 2024-07-19 16:22:00.655418401 +0200
@@ -0,0 +1,50 @@
+/* Helper functions in C for IEEE modules
+ Copyright (C) 2013-2023 Free Software Foundation, Inc.
+ Contributed by Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
+
+This file is part of the GNU Fortran runtime library (libgfortran).
+
+Libgfortran is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public
+License as published by the Free Software Foundation; either
+version 3 of the License, or (at your option) any later version.
+
+Libgfortran is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+Under Section 7 of GPL version 3, you are granted additional
+permissions described in the GCC Runtime Library Exception, version
+3.1, as published by the Free Software Foundation.
+
+You should have received a copy of the GNU General Public License and
+a copy of the GCC Runtime Library Exception along with this program;
+see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+<http://www.gnu.org/licenses/>. */
+
+#include "libgfortran.h"
+
+#define options ((const options_t) {})
+
+#include "fpu-target.h"
+
+struct ieee_modes_type {
+ GFC_INTEGER_4 rounding, underflow, halting;
+};
+
+void
+__ieee_exceptions_MOD_ieee_get_modes (struct ieee_modes_type *modes)
+{
+ modes->rounding = get_fpu_rounding_mode ();
+ modes->underflow = get_fpu_underflow_mode ();
+ modes->halting = get_fpu_trap_exceptions ();
+}
+
+void
+__ieee_exceptions_MOD_ieee_set_modes (struct ieee_modes_type *modes)
+{
+ set_fpu_rounding_mode (modes->rounding);
+ set_fpu_underflow_mode (modes->underflow);
+ set_fpu_trap_exceptions (modes->halting, ~modes->halting);
+}
--- libgfortran/ieee/nonshared-ieee_arithmetic.c.jj 2024-07-19 16:22:00.655418401 +0200
+++ libgfortran/ieee/nonshared-ieee_arithmetic.c 2024-07-19 16:22:00.655418401 +0200
@@ -0,0 +1,64 @@
+/* Helper functions in C for IEEE modules
+ Copyright (C) 2013-2023 Free Software Foundation, Inc.
+ Contributed by Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
+
+This file is part of the GNU Fortran runtime library (libgfortran).
+
+Libgfortran is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public
+License as published by the Free Software Foundation; either
+version 3 of the License, or (at your option) any later version.
+
+Libgfortran is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+Under Section 7 of GPL version 3, you are granted additional
+permissions described in the GCC Runtime Library Exception, version
+3.1, as published by the Free Software Foundation.
+
+You should have received a copy of the GNU General Public License and
+a copy of the GCC Runtime Library Exception along with this program;
+see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+<http://www.gnu.org/licenses/>. */
+
+#include "libgfortran.h"
+
+GFC_LOGICAL_4
+__ieee_arithmetic_MOD_ieee_support_subnormal_4 (gfc_array_r4 *arg)
+{
+ (void) arg;
+ return 1;
+}
+
+GFC_LOGICAL_4
+__ieee_arithmetic_MOD_ieee_support_subnormal_8 (gfc_array_r8 *arg)
+{
+ (void) arg;
+ return 1;
+}
+
+#ifdef HAVE_GFC_REAL_10
+GFC_LOGICAL_4
+__ieee_arithmetic_MOD_ieee_support_subnormal_10 (gfc_array_r10 *arg)
+{
+ (void) arg;
+ return 1;
+}
+#endif
+
+#ifdef HAVE_GFC_REAL_16
+GFC_LOGICAL_4
+__ieee_arithmetic_MOD_ieee_support_subnormal_16 (gfc_array_r16 *arg)
+{
+ (void) arg;
+ return 1;
+}
+#endif
+
+GFC_LOGICAL_4
+__ieee_arithmetic_MOD_ieee_support_subnormal_noarg (void)
+{
+ return 1;
+}
--- libgfortran/Makefile.in.jj 2024-04-26 11:47:02.744161886 +0200
+++ libgfortran/Makefile.in 2024-07-19 16:22:46.496837520 +0200
@@ -216,7 +216,8 @@ am__uninstall_files_from_dir = { \
am__installdirs = "$(DESTDIR)$(cafexeclibdir)" \
"$(DESTDIR)$(toolexeclibdir)" "$(DESTDIR)$(toolexeclibdir)" \
"$(DESTDIR)$(gfor_cdir)" "$(DESTDIR)$(fincludedir)"
-LTLIBRARIES = $(cafexeclib_LTLIBRARIES) $(toolexeclib_LTLIBRARIES)
+LTLIBRARIES = $(cafexeclib_LTLIBRARIES) $(noinst_LTLIBRARIES) \
+ $(toolexeclib_LTLIBRARIES)
libcaf_single_la_LIBADD =
am_libcaf_single_la_OBJECTS = single.lo
libcaf_single_la_OBJECTS = $(am_libcaf_single_la_OBJECTS)
@@ -484,6 +485,40 @@ am_libgfortran_la_OBJECTS = $(am__object
$(am__objects_55) $(am__objects_58) $(am__objects_59) \
$(am__objects_60) $(am__objects_64)
libgfortran_la_OBJECTS = $(am_libgfortran_la_OBJECTS)
+libgfortran_nonshared110_la_LIBADD =
+am_libgfortran_nonshared110_la_OBJECTS = nonshared-ieee_exceptions.lo
+libgfortran_nonshared110_la_OBJECTS = \
+ $(am_libgfortran_nonshared110_la_OBJECTS)
+AM_V_lt = $(am__v_lt_@AM_V@)
+am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
+am__v_lt_0 = --silent
+am__v_lt_1 =
+libgfortran_nonshared80_la_LIBADD =
+am__objects_65 = nonshared-ISO_Fortran_binding.lo
+am__objects_66 = nonshared-findloc0_i1.lo nonshared-findloc0_i2.lo \
+ nonshared-findloc0_i4.lo nonshared-findloc0_i8.lo \
+ nonshared-findloc0_i16.lo nonshared-findloc0_r4.lo \
+ nonshared-findloc0_r8.lo nonshared-findloc0_r10.lo \
+ nonshared-findloc0_r16.lo nonshared-findloc0_c4.lo \
+ nonshared-findloc0_c8.lo nonshared-findloc0_c10.lo \
+ nonshared-findloc0_c16.lo nonshared-findloc0_s1.lo \
+ nonshared-findloc0_s4.lo nonshared-findloc1_i1.lo \
+ nonshared-findloc1_i2.lo nonshared-findloc1_i4.lo \
+ nonshared-findloc1_i8.lo nonshared-findloc1_i16.lo \
+ nonshared-findloc1_r4.lo nonshared-findloc1_r8.lo \
+ nonshared-findloc1_r10.lo nonshared-findloc1_r16.lo \
+ nonshared-findloc1_c4.lo nonshared-findloc1_c8.lo \
+ nonshared-findloc1_c10.lo nonshared-findloc1_c16.lo \
+ nonshared-findloc1_s1.lo nonshared-findloc1_s4.lo \
+ nonshared-findloc2_s1.lo nonshared-findloc2_s4.lo
+am__objects_67 = nonshared-is_contiguous.lo nonshared-trigd.lo
+am__objects_68 = nonshared-random_init.lo
+am_libgfortran_nonshared80_la_OBJECTS = $(am__objects_65) \
+ $(am__objects_66) $(am__objects_67) $(am__objects_68) \
+ nonshared-ieee_arithmetic.lo nonshared-ieee_exceptions.lo \
+ nonshared-transfer.lo nonshared-error.lo
+libgfortran_nonshared80_la_OBJECTS = \
+ $(am_libgfortran_nonshared80_la_OBJECTS)
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
am__v_P_0 = false
@@ -500,10 +535,6 @@ DEFAULT_INCLUDES = -I.@am__isrc@
depcomp = $(SHELL) $(top_srcdir)/../depcomp
am__depfiles_maybe = depfiles
am__mv = mv -f
-AM_V_lt = $(am__v_lt_@AM_V@)
-am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
-am__v_lt_0 = --silent
-am__v_lt_1 =
PPFCCOMPILE = $(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS)
LTPPFCCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) \
@@ -547,7 +578,9 @@ AM_V_FC = $(am__v_FC_@AM_V@)
am__v_FC_ = $(am__v_FC_@AM_DEFAULT_V@)
am__v_FC_0 = @echo " FC " $@;
am__v_FC_1 =
-SOURCES = $(libcaf_single_la_SOURCES) $(libgfortran_la_SOURCES)
+SOURCES = $(libcaf_single_la_SOURCES) $(libgfortran_la_SOURCES) \
+ $(libgfortran_nonshared110_la_SOURCES) \
+ $(libgfortran_nonshared80_la_SOURCES)
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
@@ -753,6 +786,7 @@ LTLDFLAGS = $(shell $(SHELL) $(top_srcdi
$(lt_host_flags)
toolexeclib_LTLIBRARIES = libgfortran.la
+noinst_LTLIBRARIES = libgfortran_nonshared80.la libgfortran_nonshared110.la
toolexeclib_DATA = libgfortran.spec
libgfortran_la_LINK = $(LINK) $(libgfortran_la_LDFLAGS)
libgfortran_la_LDFLAGS = -version-info `grep -v '^\#' $(srcdir)/libtool-version` \
@@ -1655,6 +1689,66 @@ BUILT_SOURCES = $(gfor_built_src) $(gfor
libgfortran_la_SOURCES = $(gfor_src) $(gfor_built_src) $(gfor_io_src) \
$(gfor_helper_src) $(gfor_ieee_src) $(gfor_io_headers) $(gfor_specific_src)
+nonshared_runtime_C_SRC = \
+nonshared-ISO_Fortran_binding.c
+
+nonshared_io_C_SRC = \
+$(srcdir)/io/nonshared-transfer.c
+
+nonshared_generated_C_SRC = \
+nonshared-findloc0_i1.c \
+nonshared-findloc0_i2.c \
+nonshared-findloc0_i4.c \
+nonshared-findloc0_i8.c \
+nonshared-findloc0_i16.c \
+nonshared-findloc0_r4.c \
+nonshared-findloc0_r8.c \
+nonshared-findloc0_r10.c \
+nonshared-findloc0_r16.c \
+nonshared-findloc0_c4.c \
+nonshared-findloc0_c8.c \
+nonshared-findloc0_c10.c \
+nonshared-findloc0_c16.c \
+nonshared-findloc0_s1.c \
+nonshared-findloc0_s4.c \
+nonshared-findloc1_i1.c \
+nonshared-findloc1_i2.c \
+nonshared-findloc1_i4.c \
+nonshared-findloc1_i8.c \
+nonshared-findloc1_i16.c \
+nonshared-findloc1_r4.c \
+nonshared-findloc1_r8.c \
+nonshared-findloc1_r10.c \
+nonshared-findloc1_r16.c \
+nonshared-findloc1_c4.c \
+nonshared-findloc1_c8.c \
+nonshared-findloc1_c10.c \
+nonshared-findloc1_c16.c \
+nonshared-findloc1_s1.c \
+nonshared-findloc1_s4.c \
+nonshared-findloc2_s1.c \
+nonshared-findloc2_s4.c
+
+nonshared_intrinsics_C_SRC = \
+nonshared-is_contiguous.c \
+nonshared-trigd.c
+
+nonshared_intrinsics_f90_SRC = \
+nonshared-random_init.f90
+
+libgfortran_nonshared80_la_SOURCES = \
+$(nonshared_runtime_C_SRC) \
+$(nonshared_generated_C_SRC) \
+$(nonshared_intrinsics_C_SRC) \
+$(nonshared_intrinsics_f90_SRC) \
+$(srcdir)/ieee/nonshared-ieee_arithmetic.c \
+$(srcdir)/ieee/nonshared-ieee_exceptions.c \
+$(srcdir)/io/nonshared-transfer.c \
+$(srcdir)/runtime/nonshared-error.c
+
+libgfortran_nonshared110_la_SOURCES = \
+$(srcdir)/ieee/nonshared-ieee_exceptions.c
+
I_M4_DEPS = m4/iparm.m4 m4/mtype.m4
I_M4_DEPS0 = $(I_M4_DEPS) m4/iforeach.m4
I_M4_DEPS1 = $(I_M4_DEPS) m4/ifunction.m4
@@ -1765,6 +1859,17 @@ clean-cafexeclibLTLIBRARIES:
rm -f $${locs}; \
}
+clean-noinstLTLIBRARIES:
+ -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
+ @list='$(noinst_LTLIBRARIES)'; \
+ locs=`for p in $$list; do echo $$p; done | \
+ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
+ sort -u`; \
+ test -z "$$locs" || { \
+ echo rm -f $${locs}; \
+ rm -f $${locs}; \
+ }
+
install-toolexeclibLTLIBRARIES: $(toolexeclib_LTLIBRARIES)
@$(NORMAL_INSTALL)
@list='$(toolexeclib_LTLIBRARIES)'; test -n "$(toolexeclibdir)" || list=; \
@@ -1806,6 +1911,12 @@ libcaf_single.la: $(libcaf_single_la_OBJ
libgfortran.la: $(libgfortran_la_OBJECTS) $(libgfortran_la_DEPENDENCIES) $(EXTRA_libgfortran_la_DEPENDENCIES)
$(AM_V_GEN)$(libgfortran_la_LINK) -rpath $(toolexeclibdir) $(libgfortran_la_OBJECTS) $(libgfortran_la_LIBADD) $(LIBS)
+libgfortran_nonshared110.la: $(libgfortran_nonshared110_la_OBJECTS) $(libgfortran_nonshared110_la_DEPENDENCIES) $(EXTRA_libgfortran_nonshared110_la_DEPENDENCIES)
+ $(AM_V_CCLD)$(LINK) $(libgfortran_nonshared110_la_OBJECTS) $(libgfortran_nonshared110_la_LIBADD) $(LIBS)
+
+libgfortran_nonshared80.la: $(libgfortran_nonshared80_la_OBJECTS) $(libgfortran_nonshared80_la_DEPENDENCIES) $(EXTRA_libgfortran_nonshared80_la_DEPENDENCIES)
+ $(AM_V_FCLD)$(FCLINK) $(libgfortran_nonshared80_la_OBJECTS) $(libgfortran_nonshared80_la_LIBADD) $(LIBS)
+
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -2256,6 +2367,45 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minval_r8.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/move_alloc.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mvbits.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonshared-ISO_Fortran_binding.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonshared-error.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonshared-findloc0_c10.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonshared-findloc0_c16.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonshared-findloc0_c4.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonshared-findloc0_c8.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonshared-findloc0_i1.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonshared-findloc0_i16.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonshared-findloc0_i2.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonshared-findloc0_i4.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonshared-findloc0_i8.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonshared-findloc0_r10.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonshared-findloc0_r16.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonshared-findloc0_r4.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonshared-findloc0_r8.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonshared-findloc0_s1.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonshared-findloc0_s4.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonshared-findloc1_c10.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonshared-findloc1_c16.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonshared-findloc1_c4.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonshared-findloc1_c8.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonshared-findloc1_i1.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonshared-findloc1_i16.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonshared-findloc1_i2.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonshared-findloc1_i4.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonshared-findloc1_i8.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonshared-findloc1_r10.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonshared-findloc1_r16.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonshared-findloc1_r4.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonshared-findloc1_r8.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonshared-findloc1_s1.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonshared-findloc1_s4.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonshared-findloc2_s1.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonshared-findloc2_s4.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonshared-ieee_arithmetic.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonshared-ieee_exceptions.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonshared-is_contiguous.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonshared-transfer.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nonshared-trigd.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/norm2_r10.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/norm2_r16.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/norm2_r17.Plo@am__quote@
@@ -7300,6 +7450,34 @@ ieee_helper.lo: ieee/ieee_helper.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ieee_helper.lo `test -f 'ieee/ieee_helper.c' || echo '$(srcdir)/'`ieee/ieee_helper.c
+nonshared-ieee_exceptions.lo: $(srcdir)/ieee/nonshared-ieee_exceptions.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT nonshared-ieee_exceptions.lo -MD -MP -MF $(DEPDIR)/nonshared-ieee_exceptions.Tpo -c -o nonshared-ieee_exceptions.lo `test -f '$(srcdir)/ieee/nonshared-ieee_exceptions.c' || echo '$(srcdir)/'`$(srcdir)/ieee/nonshared-ieee_exceptions.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nonshared-ieee_exceptions.Tpo $(DEPDIR)/nonshared-ieee_exceptions.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/ieee/nonshared-ieee_exceptions.c' object='nonshared-ieee_exceptions.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o nonshared-ieee_exceptions.lo `test -f '$(srcdir)/ieee/nonshared-ieee_exceptions.c' || echo '$(srcdir)/'`$(srcdir)/ieee/nonshared-ieee_exceptions.c
+
+nonshared-ieee_arithmetic.lo: $(srcdir)/ieee/nonshared-ieee_arithmetic.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT nonshared-ieee_arithmetic.lo -MD -MP -MF $(DEPDIR)/nonshared-ieee_arithmetic.Tpo -c -o nonshared-ieee_arithmetic.lo `test -f '$(srcdir)/ieee/nonshared-ieee_arithmetic.c' || echo '$(srcdir)/'`$(srcdir)/ieee/nonshared-ieee_arithmetic.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nonshared-ieee_arithmetic.Tpo $(DEPDIR)/nonshared-ieee_arithmetic.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/ieee/nonshared-ieee_arithmetic.c' object='nonshared-ieee_arithmetic.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o nonshared-ieee_arithmetic.lo `test -f '$(srcdir)/ieee/nonshared-ieee_arithmetic.c' || echo '$(srcdir)/'`$(srcdir)/ieee/nonshared-ieee_arithmetic.c
+
+nonshared-transfer.lo: $(srcdir)/io/nonshared-transfer.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT nonshared-transfer.lo -MD -MP -MF $(DEPDIR)/nonshared-transfer.Tpo -c -o nonshared-transfer.lo `test -f '$(srcdir)/io/nonshared-transfer.c' || echo '$(srcdir)/'`$(srcdir)/io/nonshared-transfer.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nonshared-transfer.Tpo $(DEPDIR)/nonshared-transfer.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/io/nonshared-transfer.c' object='nonshared-transfer.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o nonshared-transfer.lo `test -f '$(srcdir)/io/nonshared-transfer.c' || echo '$(srcdir)/'`$(srcdir)/io/nonshared-transfer.c
+
+nonshared-error.lo: $(srcdir)/runtime/nonshared-error.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT nonshared-error.lo -MD -MP -MF $(DEPDIR)/nonshared-error.Tpo -c -o nonshared-error.lo `test -f '$(srcdir)/runtime/nonshared-error.c' || echo '$(srcdir)/'`$(srcdir)/runtime/nonshared-error.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/nonshared-error.Tpo $(DEPDIR)/nonshared-error.Plo
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(srcdir)/runtime/nonshared-error.c' object='nonshared-error.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o nonshared-error.lo `test -f '$(srcdir)/runtime/nonshared-error.c' || echo '$(srcdir)/'`$(srcdir)/runtime/nonshared-error.c
+
.f90.o:
$(AM_V_FC)$(FCCOMPILE) -c -o $@ $<
@@ -7494,7 +7672,8 @@ maintainer-clean-generic:
clean: clean-am
clean-am: clean-cafexeclibLTLIBRARIES clean-generic clean-libtool \
- clean-local clean-toolexeclibLTLIBRARIES mostlyclean-am
+ clean-local clean-noinstLTLIBRARIES \
+ clean-toolexeclibLTLIBRARIES mostlyclean-am
distclean: distclean-am
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
@@ -7574,14 +7753,15 @@ uninstall-am: uninstall-cafexeclibLTLIBR
.PHONY: CTAGS GTAGS TAGS all all-am all-local am--refresh check \
check-am clean clean-cafexeclibLTLIBRARIES clean-cscope \
clean-generic clean-libtool clean-local \
- clean-toolexeclibLTLIBRARIES cscope cscopelist-am ctags \
- ctags-am distclean distclean-compile distclean-generic \
- distclean-hdr distclean-libtool distclean-local distclean-tags \
- dvi dvi-am html html-am info info-am install install-am \
- install-cafexeclibLTLIBRARIES install-data install-data-am \
- install-dvi install-dvi-am install-exec install-exec-am \
- install-exec-local install-gfor_cHEADERS install-html \
- install-html-am install-info install-info-am install-man \
+ clean-noinstLTLIBRARIES clean-toolexeclibLTLIBRARIES cscope \
+ cscopelist-am ctags ctags-am distclean distclean-compile \
+ distclean-generic distclean-hdr distclean-libtool \
+ distclean-local distclean-tags dvi dvi-am html html-am info \
+ info-am install install-am install-cafexeclibLTLIBRARIES \
+ install-data install-data-am install-dvi install-dvi-am \
+ install-exec install-exec-am install-exec-local \
+ install-gfor_cHEADERS install-html install-html-am \
+ install-info install-info-am install-man \
install-nodist_fincludeHEADERS install-pdf install-pdf-am \
install-ps install-ps-am install-strip install-toolexeclibDATA \
install-toolexeclibLTLIBRARIES installcheck installcheck-am \
@@ -7649,6 +7829,38 @@ ieee_exceptions.mod: ieee_exceptions.lo
ieee_arithmetic.mod: ieee_arithmetic.lo
:
+$(patsubst %.c,%.lo,$(nonshared_generated_C_SRC) $(nonshared)): \
+nonshared-%.lo: $(srcdir)/generated/%.c
+ $(LTCOMPILE) -c -o $@ $< -DLIBGFORTRAN_NONSHARED
+
+$(patsubst %.c,%.o,$(nonshared_generated_C_SRC) $(nonshared)): \
+nonshared-%.o: $(srcdir)/generated/%.c
+ $(COMPILE) -c -o $@ $< -DLIBGFORTRAN_NONSHARED
+
+$(patsubst %.c,%.lo,$(nonshared_intrinsics_C_SRC) $(nonshared)): \
+nonshared-%.lo: $(srcdir)/intrinsics/%.c
+ $(LTCOMPILE) -c -o $@ $< -DLIBGFORTRAN_NONSHARED
+
+$(patsubst %.c,%.o,$(nonshared_intrinsics_C_SRC) $(nonshared)): \
+nonshared-%.o: $(srcdir)/intrinsics/%.c
+ $(COMPILE) -c -o $@ $< -DLIBGFORTRAN_NONSHARED
+
+$(patsubst %.c,%.lo,$(nonshared_runtime_C_SRC) $(nonshared)): \
+nonshared-%.lo: $(srcdir)/runtime/%.c
+ $(LTCOMPILE) -c -o $@ $< -DLIBGFORTRAN_NONSHARED
+
+$(patsubst %.c,%.o,$(nonshared_runtime_C_SRC) $(nonshared)): \
+nonshared-%.o: $(srcdir)/runtime/%.c
+ $(COMPILE) -c -o $@ $< -DLIBGFORTRAN_NONSHARED
+
+$(patsubst %.f90,%.lo,$(nonshared_intrinsics_f90_SRC) $(nonshared)): \
+nonshared-%.lo: $(srcdir)/intrinsics/%.f90
+ $(LTPPFCCOMPILE) -c -o $@ $< -fallow-leading-underscore
+
+$(patsubst %.f90,%.o,$(nonshared_intrinsics_f90_SRC) $(nonshared)): \
+nonshared-%.o: $(srcdir)/intrinsics/%.f90
+ $(PPFCCOMPILE) -c -o $@ $< -fallow-leading-underscore
+
kinds.h: $(srcdir)/mk-kinds-h.sh
$(SHELL) $(srcdir)/mk-kinds-h.sh '@LIBGOMP_CHECKED_INT_KINDS@' \
'@LIBGOMP_CHECKED_REAL_KINDS@' \
--- libgfortran/libgfortran.h.jj 2024-04-26 11:47:02.891159849 +0200
+++ libgfortran/libgfortran.h 2024-07-19 16:22:00.666418262 +0200
@@ -216,7 +216,7 @@ extern int __mingw_snprintf (char *, siz
# define internal_proto(x) sym_rename(x, IPREFIX(x))
#endif
-#if defined(HAVE_ATTRIBUTE_VISIBILITY) && defined(HAVE_ATTRIBUTE_ALIAS)
+#if defined(HAVE_ATTRIBUTE_VISIBILITY) && defined(HAVE_ATTRIBUTE_ALIAS) && !defined(LIBGFORTRAN_NONSHARED)
# define export_proto(x) sym_rename(x, PREFIX(x))
# define export_proto_np(x) extern char swallow_semicolon
# define iexport_proto(x) internal_proto(x)
@@ -291,6 +291,10 @@ typedef GFC_UINTEGER_4 gfc_char4_t;
simply equal to the kind parameter itself. */
#define GFC_SIZE_OF_CHAR_KIND(kind) (kind)
+#ifdef LIBGFORTRAN_NONSHARED
+#define big_endian (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
+#endif
+
#define GFOR_POINTER_TO_L1(p, kind) \
((__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ ? 1: 0) * (kind - 1) + (GFC_LOGICAL_1 *)(p))
@@ -2024,4 +2028,63 @@ extern int __snprintfieee128 (char *, si
#define HAVE_GFC_UINTEGER_1 1
#define HAVE_GFC_UINTEGER_4 1
+#ifdef LIBGFORTRAN_NONSHARED
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+
+#define internal_malloc_size nonshared_internal_malloc_size
+#define xmalloc nonshared_internal_xmalloc
+#define xmallocarray nonshared_internal_xmallocarray
+#define reshape_packed nonshared_reshape_packed
+static inline __attribute__((__always_inline__, __unused__))
+void *
+internal_malloc_size (size_t size)
+{
+ void *p;
+
+ if (size == 0)
+ return NULL;
+
+ p = (void *) malloc (size);
+ if (p == NULL)
+ os_error ("Memory allocation failed");
+ return p;
+}
+
+static inline __attribute__((__always_inline__, __unused__))
+void *
+xmalloc (size_t size)
+{
+ return internal_malloc_size (size ? size : 1);
+}
+
+static inline __attribute__((__always_inline__, __unused__))
+void *
+xmallocarray (size_t nmemb, size_t size)
+{
+ if (!nmemb || !size)
+ size = nmemb = 1;
+ else if (__builtin_expect ((nmemb | size)
+ >= (((size_t) 1) << (__CHAR_BIT__
+ * sizeof (size_t) / 2)), 0)
+ && nmemb > __SIZE_MAX__ / size)
+ {
+ errno = ENOMEM;
+ os_error ("Integer overflow in xmallocarray");
+ }
+
+ return internal_malloc_size (nmemb * size);
+}
+
+static inline __attribute__((__always_inline__, __unused__))
+#include "intrinsics/reshape_packed.c"
+
+struct no_bounds_check { int bounds_check; };
+#define compile_options ((struct no_bounds_check) { .bounds_check = 0 })
+
+#define internal_error(x, y...) runtime_error (y)
+
+#endif
+
#endif /* LIBGFOR_H */
--- libgfortran/runtime/nonshared-error.c.jj 2024-07-19 16:22:00.666418262 +0200
+++ libgfortran/runtime/nonshared-error.c 2024-07-19 16:22:00.666418262 +0200
@@ -0,0 +1,56 @@
+/* Copyright (C) 2020-2023 Free Software Foundation, Inc.
+
+This file is part of the GNU Fortran runtime library (libgfortran).
+
+Libgfortran is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3, or (at your option)
+any later version.
+
+Libgfortran is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+Under Section 7 of GPL version 3, you are granted additional
+permissions described in the GCC Runtime Library Exception, version
+3.1, as published by the Free Software Foundation.
+
+You should have received a copy of the GNU General Public License and
+a copy of the GCC Runtime Library Exception along with this program;
+see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+<http://www.gnu.org/licenses/>. */
+
+
+#define LIBGFORTRAN_NONSHARED
+#include "libgfortran.h"
+#include "io.h"
+#include "async.h"
+
+#include <string.h>
+#include <stdio.h>
+
+/* Improved version of os_error with a printf style format string and
+ a locus. */
+
+void
+os_error_at (const char *where, const char *message, ...)
+{
+ char buf[4096];
+ size_t len = strlen (where);
+ int written;
+ va_list ap;
+
+ if (len >= 2048)
+ os_error ("Unknown error");
+ memcpy (buf, where, len);
+ memcpy (buf + len, ": ", 2);
+ va_start (ap, message);
+ written = vsnprintf (buf + len + 2, 4095 - len - 2, message, ap);
+ va_end (ap);
+ if (written < 0)
+ written = 0;
+ buf[len + 2 + written] = '\0';
+ os_error (buf);
+}
+iexport(os_error_at);
--- libgfortran/io/nonshared-transfer.c.jj 2024-07-19 16:22:00.666418262 +0200
+++ libgfortran/io/nonshared-transfer.c 2024-07-19 16:22:00.666418262 +0200
@@ -0,0 +1,42 @@
+/* Copyright (C) 2002-2023 Free Software Foundation, Inc.
+ Contributed by Andy Vaught
+ Namelist transfer functions contributed by Paul Thomas
+ F2003 I/O support contributed by Jerry DeLisle
+
+This file is part of the GNU Fortran runtime library (libgfortran).
+
+Libgfortran is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3, or (at your option)
+any later version.
+
+Libgfortran is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+Under Section 7 of GPL version 3, you are granted additional
+permissions described in the GCC Runtime Library Exception, version
+3.1, as published by the Free Software Foundation.
+
+You should have received a copy of the GNU General Public License and
+a copy of the GCC Runtime Library Exception along with this program;
+see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+<http://www.gnu.org/licenses/>. */
+
+
+/* transfer.c -- Top level handling of data transfer statements. */
+
+#include "io.h"
+#include "fbuf.h"
+#include "format.h"
+#include "unix.h"
+#include "async.h"
+#include <string.h>
+#include <errno.h>
+
+void
+st_wait_async (st_parameter_wait *wtp)
+{
+ (void) wtp;
+}

View File

@ -1,76 +0,0 @@
Based on Richi's patch:
<https://gcc.gnu.org/pipermail/gcc-patches/2024-April/648725.html>
~~
The following avoids re-walking and re-combining the instructions
between i2 and i3 when the pattern of i2 doesn't change.
Bootstrap and regtest running ontop of a reversal of
r14-9692-g839bc42772ba7a.
It brings down memory use from 9GB to 400MB and compile-time from
80s to 3.5s. r14-9692-g839bc42772ba7a does better in both metrics
but has shown code generation regressions across architectures.
PR rtl-optimization/101523
* combine.cc (try_combine): When the pattern of i2 doesn't
change do not re-start combining at i2 or an earlier insn which
had links or notes added.
~~
But, since the patch affects code generation (for instance,
libstdc++-v3/src/c++17/floating_from_chars.o), we limit the bailing out
only when I2 hasn't been changed 1000x. I've measured how many times
at most is I2 unchanged during a bootstrap + regtest.
x86: 134
aarch64: 736 (gimple-match-1.cc)
s390x: 635 (gimple-match-*)
ppc64le: 620 (gimple-match-*)
while certain pathological testcases trigger it more than 10,000 times.
With the limit in place this patch doesn't affect common code.
--- a/gcc/combine.cc
+++ b/gcc/combine.cc
@@ -92,6 +92,11 @@ along with GCC; see the file COPYING3. If not see
#include "function-abi.h"
#include "rtlanal.h"
+/* Number of times I2 didn't change in try_combine. Used to prevent a
+ combinatorial explosion. */
+
+static int combine_i2_unchanged;
+
/* Number of attempts to combine instructions in this function. */
static int combine_attempts;
@@ -1127,6 +1132,7 @@ combine_instructions (rtx_insn *f, unsigned int nregs)
return false;
combine_attempts = 0;
+ combine_i2_unchanged = 0;
combine_merges = 0;
combine_extras = 0;
combine_successes = 0;
@@ -4196,6 +4201,10 @@ try_combine (rtx_insn *i3, rtx_insn *i2, rtx_insn *i1, rtx_insn *i0,
adjust_for_new_dest (i3);
}
+ bool i2_i2_unchanged = false;
+ if (rtx_equal_p (newi2pat, PATTERN (i2)))
+ i2_i2_unchanged = true;
+
/* We now know that we can do this combination. Merge the insns and
update the status of registers and LOG_LINKS. */
@@ -4762,6 +4771,13 @@ try_combine (rtx_insn *i3, rtx_insn *i2, rtx_insn *i1, rtx_insn *i0,
combine_successes++;
undo_commit ();
+ if (i2_i2_unchanged)
+ {
+ if (combine_i2_unchanged == 1000)
+ return i3;
+ ++combine_i2_unchanged;
+ }
+
rtx_insn *ret = newi2pat ? i2 : i3;
if (added_links_insn && DF_INSN_LUID (added_links_insn) < DF_INSN_LUID (ret))
ret = added_links_insn;

View File

@ -1,56 +0,0 @@
2025-01-20 Jakub Jelinek <jakub@redhat.com>
PR c++/118509
* typeck.cc (get_member_function_from_ptrfunc): Wrap force_target_expr
with save_expr.
* g++.dg/expr/pmf-4.C: New test.
--- gcc/cp/typeck.cc.jj 2025-01-09 10:10:28.042651891 +0100
+++ gcc/cp/typeck.cc 2025-01-20 15:09:24.200053590 +0100
@@ -4187,8 +4187,8 @@ get_member_function_from_ptrfunc (tree *
&& !DECL_P (instance_ptr)
&& !TREE_CONSTANT (instance_ptr)))
instance_ptr = instance_save_expr
- = force_target_expr (TREE_TYPE (instance_ptr), instance_ptr,
- complain);
+ = save_expr (force_target_expr (TREE_TYPE (instance_ptr),
+ instance_ptr, complain));
/* See above comment. */
if (TREE_SIDE_EFFECTS (function)
@@ -4196,7 +4196,8 @@ get_member_function_from_ptrfunc (tree *
&& !DECL_P (function)
&& !TREE_CONSTANT (function)))
function
- = force_target_expr (TREE_TYPE (function), function, complain);
+ = save_expr (force_target_expr (TREE_TYPE (function), function,
+ complain));
/* Start by extracting all the information from the PMF itself. */
e3 = pfn_from_ptrmemfunc (function);
--- gcc/testsuite/g++.dg/expr/pmf-4.C.jj
+++ gcc/testsuite/g++.dg/expr/pmf-4.C
@@ -0,0 +1,22 @@
+// PR c++/118509
+// { dg-do run }
+// { dg-options "-Wall -O2" }
+
+struct A { void foo () { a = 1; } int a; A () : a (0) {} };
+struct B : virtual A {};
+typedef void (A::*C) ();
+
+__attribute__((noipa)) void
+foo (C x, B *y)
+{
+ (y->*x) ();
+}
+
+int
+main ()
+{
+ B b;
+ foo (&A::foo, &b);
+ if (b.a != 1)
+ __builtin_abort ();
+}

View File

@ -9,15 +9,15 @@
* configure: Regenerated.
--- gcc/configure.ac.jj 2017-02-13 12:20:53.000000000 +0100
+++ gcc/configure.ac 2017-02-25 12:42:32.859175403 +0100
@@ -570,7 +570,7 @@ AC_ARG_ENABLE(build-format-warnings,
+++ gcc/configure.ac 2024-11-30 13:34:11.100296256 +0100
@@ -592,7 +592,7 @@ AC_ARG_ENABLE(build-format-warnings,
AS_HELP_STRING([--disable-build-format-warnings],[don't use -Wformat while building GCC]),
[],[enable_build_format_warnings=yes])
AS_IF([test $enable_build_format_warnings = no],
- [wf_opt=-Wno-format],[wf_opt=])
+ [wf_opt="-Wno-format -Wno-format-security"],[wf_opt=])
ACX_PROG_CXX_WARNING_OPTS(
m4_quote(m4_do([-W -Wall -Wno-narrowing -Wwrite-strings ],
m4_quote(m4_do([-W -Wall -Wno-error=narrowing -Wwrite-strings ],
[-Wcast-qual $wf_opt])),
--- gcc/configure.jj 2017-02-13 12:20:52.000000000 +0100
+++ gcc/configure 2017-02-25 12:42:50.041946391 +0100
@ -31,8 +31,8 @@
wf_opt=
fi
--- Makefile.tpl.jj 2023-11-29 13:21:41.680292662 +0100
+++ Makefile.tpl 2023-11-29 13:23:24.677839321 +0100
@@ -448,9 +448,9 @@ LDFLAGS = @LDFLAGS@
+++ Makefile.tpl 2024-11-30 13:35:29.303196246 +0100
@@ -450,9 +450,9 @@ LDFLAGS = @LDFLAGS@
LIBCFLAGS = $(CFLAGS)
CXXFLAGS = @CXXFLAGS@
LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates
@ -43,11 +43,11 @@
+GDCFLAGS = $(filter-out -Wformat-security,@GDCFLAGS@)
+GM2FLAGS = $(filter-out -Wformat-security,$(CFLAGS))
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
CRAB1_LIBS = @CRAB1_LIBS@
--- Makefile.in.jj 2023-11-29 13:21:41.691292507 +0100
+++ Makefile.in 2023-11-29 13:24:01.254323180 +0100
@@ -445,9 +445,9 @@ LDFLAGS = @LDFLAGS@
+++ Makefile.in 2024-11-30 13:36:12.113594079 +0100
@@ -447,9 +447,9 @@ LDFLAGS = @LDFLAGS@
LIBCFLAGS = $(CFLAGS)
CXXFLAGS = @CXXFLAGS@
LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates
@ -58,5 +58,5 @@
+GDCFLAGS = $(filter-out -Wformat-security,@GDCFLAGS@)
+GM2FLAGS = $(filter-out -Wformat-security,$(CFLAGS))
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
CRAB1_LIBS = @CRAB1_LIBS@

View File

@ -66,61 +66,117 @@
GDCFLAGS="$(GDCFLAGS) $${flags}" \
CXXFLAGS="$(CXXFLAGS) $${flags}" \
--- libcpp/macro.cc.jj 2019-01-09 13:01:21.420552123 +0100
+++ libcpp/macro.cc 2019-01-11 18:18:17.736876285 +0100
@@ -3256,8 +3256,6 @@ static cpp_macro *
+++ libcpp/macro.cc 2024-11-30 13:16:41.163056391 +0100
@@ -3680,8 +3680,6 @@ static cpp_macro *
create_iso_definition (cpp_reader *pfile)
{
bool following_paste_op = false;
- const char *paste_op_error_msg =
- N_("'##' cannot appear at either end of a macro expansion");
- N_("%<##%> cannot appear at either end of a macro expansion");
unsigned int num_extra_tokens = 0;
unsigned nparms = 0;
cpp_hashnode **params = NULL;
@@ -3382,7 +3380,9 @@ create_iso_definition (cpp_reader *pfile
@@ -3809,7 +3807,9 @@ create_iso_definition (cpp_reader *pfile
function-like macros, but not at the end. */
if (following_paste_op)
{
- cpp_error (pfile, CPP_DL_ERROR, paste_op_error_msg);
+ cpp_error (pfile, CPP_DL_ERROR,
+ "'##' cannot appear at either end of a macro "
+ "%<##%> cannot appear at either end of a macro "
+ "expansion");
goto out;
}
if (!vaopt_tracker.completed ())
@@ -3397,7 +3397,9 @@ create_iso_definition (cpp_reader *pfile
@@ -3824,7 +3824,9 @@ create_iso_definition (cpp_reader *pfile
function-like macros, but not at the beginning. */
if (macro->count == 1)
{
- cpp_error (pfile, CPP_DL_ERROR, paste_op_error_msg);
+ cpp_error (pfile, CPP_DL_ERROR,
+ "'##' cannot appear at either end of a macro "
+ "%<##%> cannot appear at either end of a macro "
+ "expansion");
goto out;
}
--- libcpp/expr.cc.jj 2019-01-09 13:01:22.415535734 +0100
+++ libcpp/expr.cc 2019-01-11 18:16:23.444726882 +0100
@@ -803,16 +803,17 @@ cpp_classify_number (cpp_reader *pfile,
+++ libcpp/expr.cc 2024-11-30 13:14:52.468583689 +0100
@@ -874,50 +874,54 @@ cpp_classify_number (cpp_reader *pfile,
if ((result & CPP_N_WIDTH) == CPP_N_LARGE
&& CPP_OPTION (pfile, cpp_warn_long_long))
{
- const char *message = CPP_OPTION (pfile, cplusplus)
- const char *message = CPP_OPTION (pfile, cplusplus)
- ? N_("use of C++11 long long integer constant")
- : N_("use of C99 long long integer constant");
-
if (CPP_OPTION (pfile, c99))
cpp_warning_with_line (pfile, CPP_W_LONG_LONG, virtual_location,
- cpp_warning_with_line (pfile, CPP_W_LONG_LONG, virtual_location,
- 0, message);
+ 0, CPP_OPTION (pfile, cplusplus)
+ ? N_("use of C++11 long long integer constant")
+ : N_("use of C99 long long integer constant"));
+ cpp_warning_with_line (pfile, CPP_W_LONG_LONG, virtual_location, 0,
+ CPP_OPTION (pfile, cplusplus)
+ ? N_("use of C++11 long long integer "
+ "constant")
+ : N_("use of C99 long long integer "
+ "constant"));
else
cpp_pedwarning_with_line (pfile, CPP_W_LONG_LONG,
- virtual_location, 0, message);
+ virtual_location, 0,
+ CPP_OPTION (pfile, cplusplus)
+ ? N_("use of C++11 long long integer constant")
+ : N_("use of C99 long long integer constant"));
+ ? N_("use of C++11 long long integer "
+ "constant")
+ : N_("use of C99 long long integer "
+ "constant"));
}
if ((result & CPP_N_SIZE_T) == CPP_N_SIZE_T
&& !CPP_OPTION (pfile, size_t_literals))
- {
- const char *message
- = (result & CPP_N_UNSIGNED) == CPP_N_UNSIGNED
- ? N_("use of C++23 %<size_t%> integer constant")
- : N_("use of C++23 %<make_signed_t<size_t>%> integer constant");
- cpp_warning_with_line (pfile, CPP_W_SIZE_T_LITERALS,
- virtual_location, 0, message);
- }
+ cpp_warning_with_line (pfile, CPP_W_SIZE_T_LITERALS,
+ virtual_location, 0,
+ (result & CPP_N_UNSIGNED) == CPP_N_UNSIGNED
+ ? N_("use of C++23 %<size_t%> integer "
+ "constant")
+ : N_("use of C++23 %<make_signed_t<size_t>%> "
+ "integer constant"));
if ((result & CPP_N_BITINT) != 0
&& CPP_OPTION (pfile, cpp_warn_c11_c23_compat) != 0)
{
if (CPP_OPTION (pfile, cpp_warn_c11_c23_compat) > 0)
{
- const char *message = N_("ISO C does not support literal "
- "%<wb%> suffixes before C23");
if (CPP_PEDANTIC (pfile) && !CPP_OPTION (pfile, true_false))
cpp_pedwarning_with_line (pfile, CPP_W_C11_C23_COMPAT,
- virtual_location, 0, message);
+ virtual_location, 0,
+ "ISO C does not support literal "
+ "%<wb%> suffixes before C23");
else
cpp_warning_with_line (pfile, CPP_W_C11_C23_COMPAT,
- virtual_location, 0, message);
- }
- else if (!CPP_OPTION (pfile, true_false))
- {
- const char *message = N_("ISO C does not support literal "
+ virtual_location, 0,
+ "ISO C does not support literal "
"%<wb%> suffixes before C23");
- cpp_pedwarning_with_line (pfile, CPP_W_PEDANTIC,
- virtual_location, 0, message);
}
+ else if (!CPP_OPTION (pfile, true_false))
+ cpp_pedwarning_with_line (pfile, CPP_W_PEDANTIC,
+ virtual_location, 0,
+ "ISO C does not support literal "
+ "%<wb%> suffixes before C23");
}
result |= CPP_N_INTEGER;

View File

@ -696,16 +696,16 @@
static void
--- gcc/toplev.cc.jj 2017-02-19 13:02:31.000000000 +0100
+++ gcc/toplev.cc 2017-02-19 16:50:25.536301350 +0100
@@ -94,6 +94,7 @@ along with GCC; see the file COPYING3.
+++ gcc/toplev.cc 2024-11-30 13:22:34.175096117 +0100
@@ -100,6 +100,7 @@ along with GCC; see the file COPYING3.
#ifdef HAVE_isl
#include <isl/version.h>
+extern const char *get_isl_version (bool);
#endif
static void general_init (const char *, bool);
@@ -683,7 +684,7 @@ print_version (FILE *file, const char *i
static void general_init (const char *, bool, unique_argv original_argv);
@@ -652,7 +653,7 @@ print_version (FILE *file, const char *i
#ifndef HAVE_isl
"none"
#else

View File

@ -6,8 +6,8 @@
directory.
--- gcc/toplev.cc.jj 2008-12-09 23:59:10.000000000 +0100
+++ gcc/toplev.cc 2009-01-27 14:33:52.000000000 +0100
@@ -113,6 +113,8 @@ static void finalize (bool);
+++ gcc/toplev.cc 2024-11-30 13:26:05.085132543 +0100
@@ -112,6 +112,8 @@ static void finalize ();
static void crash_signal (int) ATTRIBUTE_NORETURN;
static void compile_file (void);
@ -16,14 +16,14 @@
/* Decoded options, and number of such options. */
struct cl_decoded_option *save_decoded_options;
unsigned int save_decoded_options_count;
@@ -2239,6 +2241,8 @@ toplev::main (int argc, char **argv)
@@ -2296,6 +2298,8 @@ toplev::main (int argc, char **argv)
expandargv (&argc, &argv);
+ toplev_main_argv = CONST_CAST2 (const char **, char **, argv);
+
/* Initialization of GCC's environment, and diagnostics. */
general_init (argv[0], m_init_signals);
general_init (argv[0], m_init_signals, std::move (original_argv));
--- gcc/graphite.cc.jj 2010-12-01 10:24:32.000000000 -0500
+++ gcc/graphite.cc 2010-12-01 11:46:07.832118193 -0500

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -4,21 +4,21 @@
<a class="link" href="https://www.fsf.org" target="_top">FSF
</a>
</p><p>
+ Release 14.2.1
+ Release 15.1.1
+ </p><p>
Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU Free Documentation
License, Version 1.2 or any later version published by the
--- libstdc++-v3/doc/html/api.html.jj 2011-01-03 12:53:21.000000000 +0100
+++ libstdc++-v3/doc/html/api.html 2011-01-04 18:12:01.672757784 +0100
+++ libstdc++-v3/doc/html/api.html 2024-11-30 13:30:16.607594623 +0100
@@ -20,7 +20,9 @@
member functions for the library classes, finding out what is in a
particular include file, looking at inheritance diagrams, etc.
</p><p>
- The API documentation, rendered into HTML, can be viewed online
+ The API documentation, rendered into HTML, can be viewed locally
+ <a class="link" href="api/index.html" target="_top">for the 14.2.1 release</a>,
+ <a class="link" href="api/index.html" target="_top">for the 15.1.1 release</a>,
+ online
<a class="link" href="http://gcc.gnu.org/onlinedocs/" target="_top">for each GCC release</a>
<a class="link" href="https://gcc.gnu.org/onlinedocs/" target="_top">for each GCC release</a>
and
<a class="link" href="http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/index.html" target="_top">
<a class="link" href="https://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/index.html" target="_top">

76
gcc15-pr119006.patch Normal file
View File

@ -0,0 +1,76 @@
2025-02-27 Jakub Jelinek <jakub@redhat.com>
PR ipa/119006
* ipa-icf-gimple.cc (func_checker::compare_operand): If t1 and t2
are ADDR_EXPRs, call operand_equal_p on their operands rather than on
the ADDR_EXPRs themselves. Formatting fix.
* g++.dg/opt/pr119006.C: New test.
--- gcc/ipa-icf-gimple.cc.jj 2025-02-01 00:50:02.080774328 +0100
+++ gcc/ipa-icf-gimple.cc 2025-02-27 14:35:19.931183246 +0100
@@ -437,12 +437,23 @@ func_checker::compare_operand (tree t1,
("compare_ao_refs failed (dependence clique difference)");
gcc_unreachable ();
}
+ else if (TREE_CODE (t1) == ADDR_EXPR && TREE_CODE (t2) == ADDR_EXPR)
+ {
+ /* For ADDR_EXPR compare the operands of the ADDR_EXPR rather than
+ the ADDR_EXPRs themselves. operand_equal_p will compare the
+ operands with OEP_ADDRESS_OF and only care about the value
+ of the ADDR_EXPR, rather than e.g. types of MEM_REFs in there.
+ Some optimizations use such details though, see PR119006. */
+ if (operand_equal_p (TREE_OPERAND (t1, 0), TREE_OPERAND (t2, 0),
+ OEP_MATCH_SIDE_EFFECTS))
+ return true;
+ return return_false_with_msg ("operand_equal_p failed");
+ }
else
{
if (operand_equal_p (t1, t2, OEP_MATCH_SIDE_EFFECTS))
return true;
- return return_false_with_msg
- ("operand_equal_p failed");
+ return return_false_with_msg ("operand_equal_p failed");
}
}
--- gcc/testsuite/g++.dg/opt/pr119006.C.jj 2025-02-27 14:37:05.952707350 +0100
+++ gcc/testsuite/g++.dg/opt/pr119006.C 2025-02-27 14:36:29.251218260 +0100
@@ -0,0 +1,36 @@
+// PR ipa/119006
+// { dg-do run { target c++11 } }
+// { dg-options "-O2 -fwhole-program" }
+
+struct A {
+ bool operator== (const char *x) const { return x && !__builtin_strcmp (a, x); }
+ char a[11];
+};
+
+struct B {
+ bool operator== (const char *x) const { return x && !__builtin_strcmp (a, x); }
+ bool operator!= (const char *x) const { return !(*this == x); }
+ char a[128];
+};
+
+[[gnu::noinline,gnu::used]] int
+foo (const A& lhs, const char* rhs)
+{
+ return lhs == rhs;
+}
+
+constexpr const char *t = "abcdefghijklmno";
+
+[[gnu::noinline,gnu::used]] void
+bar (B x)
+{
+ if (x != t) __builtin_abort ();
+}
+
+int
+main ()
+{
+ B b;
+ __builtin_strcpy (b.a, t);
+ bar (b);
+}

View File

@ -1,4 +1,4 @@
SHA512 (gcc-14.2.1-20250110.tar.xz) = 9de1009fd87d3734361a3c451e0d8faac984a38b2c064bea228b1a04738e870d7dcca2ee98182be5423579b8caa5f762cd06a6576e2fe797559620619ae4e169
SHA512 (gcc-15.1.1-20250521.tar.xz) = 86b06902e10aa6eba4ccbe54e97fee17838e21484e4f6d4aef2e93d0687b04e82f00655828ac0233f4026cd0d2df08bbdfe7dc2eeafc8908cab183584d2fb8ee
SHA512 (isl-0.24.tar.bz2) = aab3bddbda96b801d0f56d2869f943157aad52a6f6e6a61745edd740234c635c38231af20bc3f1a08d416a5e973a90e18249078ed8e4ae2f1d5de57658738e95
SHA512 (newlib-cygwin-d45261f62a15f8abd94a1031020b9a9f455e4eed.tar.xz) = 31bfc19429797236e268e22b752c5abeabb9c0f39b1058634af8dab329b4f028fc72a35888193c9575f6cee5cf2c069669d79fcb4d4e3a4318f57413452f707d
SHA512 (newlib-cygwin-d35cc82b5ec15bb8a5fe0fe11e183d1887992e99.tar.xz) = ef9495745a96d1d76f9f425c4a48c807fface36a1aa92351c5d024103678d144d046e8de55d195103784472c14874e29e4b9284d5d6a2e7bb27fd98c8455a881
SHA512 (nvptx-tools-87ce9dc5999e5fca2e1d3478a30888d9864c9804.tar.xz) = 941e763af8601b89f0e4ec48a2d68ae0a8e70ee1e6ba6859394b021ad7bd7d143cc529f3c35c08d7f84e5554980ddcc97cf05b6c4755c2bc36c91161b79e8cea