public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Susi Lehtola <jussilehtola@fedoraproject.org>
To: git-commits@fedoraproject.org
Subject: [rpms/OpenMolcas] rawhide: The trampoline flag didn't work on all archs; retry
Date: Fri, 24 Jul 2026 13:59:46 GMT [thread overview]
Message-ID: <178490158644.1.7398890149414075706.rpms-OpenMolcas-cc1e60f70b2f@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/OpenMolcas
Branch : rawhide
Commit : cc1e60f70b2ff1b9490ea39ee19d892b8ca5c4f5
Author : Susi Lehtola <jussilehtola@fedoraproject.org>
Date : 2026-07-24T13:59:39+00:00
Stats : +31/-27 in 3 file(s)
URL : https://src.fedoraproject.org/rpms/OpenMolcas/c/cc1e60f70b2ff1b9490ea39ee19d892b8ca5c4f5?branch=rawhide
Log:
The trampoline flag didn't work on all archs; retry
---
diff --git a/OpenMolcas-25.06-python3.patch b/OpenMolcas-25.06-python3.patch
deleted file mode 100644
index 54029a3..0000000
--- a/OpenMolcas-25.06-python3.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-diff -up OpenMolcas-v25.06-805c93ebfa2cd5fa185ca03cf965580ebdfeb352/sbin/extract_xmldoc.py.python3 OpenMolcas-v25.06-805c93ebfa2cd5fa185ca03cf965580ebdfeb352/sbin/extract_xmldoc.py
---- OpenMolcas-v25.06-805c93ebfa2cd5fa185ca03cf965580ebdfeb352/sbin/extract_xmldoc.py.python3 2025-06-14 17:40:50.000000000 +0000
-+++ OpenMolcas-v25.06-805c93ebfa2cd5fa185ca03cf965580ebdfeb352/sbin/extract_xmldoc.py 2025-06-16 07:53:31.022599574 +0000
-@@ -73,7 +73,7 @@ for root, subdirs, files in os.walk(os.p
- xmldocs[f.name] = docs
-
- # Create Help file
--with codecs.open(os.path.join(datadir, 'keyword.db'), 'w', 'utf-8') as keywordsfile:
-+with open(os.path.join(datadir, 'keyword.db'), 'w', encoding='utf-8') as keywordsfile:
- keywordsfile.write('#This file is generated automatically from the OpenMolcas documentation\n')
- keywordsfile.write('#\n')
- # Sort by filename
-@@ -86,7 +86,7 @@ with codecs.open(os.path.join(datadir, '
- keywordsfile.write('\n'.join(text)+'\n')
-
- # Create XML file
--with codecs.open(os.path.join(datadir, 'keyword.xml'), 'w', 'utf-8') as keywordsfile:
-+with open(os.path.join(datadir, 'keyword.xml'), 'w', encoding='utf-8') as keywordsfile:
- keywordsfile.write('<!-- This file is generated automatically from the OpenMolcas documentation -->\n')
- keywordsfile.write('<ROOT>\n')
- # Sort by filename
diff --git a/OpenMolcas-26.06-intprocarg.patch b/OpenMolcas-26.06-intprocarg.patch
new file mode 100644
index 0000000..c79d222
--- /dev/null
+++ b/OpenMolcas-26.06-intprocarg.patch
@@ -0,0 +1,22 @@
+--- OpenMolcas-v26.06/src/Include/compiler_features.h.orig 2026-06-14 18:08:35.000000000 +0000
++++ OpenMolcas-v26.06/src/Include/compiler_features.h 2026-07-24 13:49:52.689601972 +0000
+@@ -61,12 +61,13 @@ incomplete.
+ #endif
+
+ /* Internal procedures as arguments.
+-With PGI 20 ( __PGIC__ >= 20 ) it compiles, but it appears to be buggy at runtime! */
+-#if (( __SUNPRO_F90 ) || ( __PGI ))
+-# undef INTERNAL_PROC_ARG
+-#else
+-# define INTERNAL_PROC_ARG
+-#endif
++With PGI 20 ( __PGIC__ >= 20 ) it compiles, but it appears to be buggy at runtime!
++Fedora: gfortran implements internal procedures passed as actual arguments with
++stack trampolines, which force an executable stack and break the hardened link.
++Heap trampolines (-ftrampoline-impl=heap) would avoid that, but libgcc only
++provides them on x86_64 and aarch64, so use the trampoline-free code path on
++every architecture instead. */
++#undef INTERNAL_PROC_ARG
+
+ /* Allows files with no compilable instructions */
+ #if (( NAGFOR ) || ( __PGI ))
diff --git a/OpenMolcas.spec b/OpenMolcas.spec
index 1e794ef..e2feb25 100644
--- a/OpenMolcas.spec
+++ b/OpenMolcas.spec
@@ -10,6 +10,10 @@ Source0: https://gitlab.com/Molcas/OpenMolcas/-/archive/v%{version}/%{nam
Patch0: OpenMolcas-26.06-fedora.patch
# Read python modules from system directory
Patch1: OpenMolcas-19.11-pymodule.patch
+# Don't pass internal procedures as actual arguments; gfortran implements
+# these with stack trampolines, which force an executable stack and break
+# the hardened link.
+Patch2: OpenMolcas-26.06-intprocarg.patch
# https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval
ExcludeArch: %{ix86}
@@ -50,6 +54,7 @@ therefore not included in OpenMolcas.
%setup -q -n %{name}-v%{version}
%patch -P 0 -p1 -b .fedora
%patch -P 1 -p1 -b .pymodule
+%patch -P 2 -p1 -b .intprocarg
# Name of OpenBLAS library to use is
%if 0%{?__isa_bits} == 64
@@ -66,12 +71,10 @@ sed -i 's|@MOLCAS_PYTHON@|%{_libdir}/%{name}/python|g' Tools/pymolcas/pymolcas.p
%build
-# Nested internal procedures used as actual arguments (e.g. sorting.F90,
-# desym.F90) make gfortran emit stack trampolines, which force an executable
-# stack and break the hardened link. Allocate the trampolines on the heap
-# instead (GCC >= 14) to keep the reentrant closure code path.
-export CFLAGS="%{optflags} -fopenmp -std=gnu99 -fPIC -ftrampoline-impl=heap"
-export FFLAGS="%{optflags} -cpp -fopenmp -fdefault-integer-8 -fPIC -I%{_libdir}/gfortran/modules -ftrampoline-impl=heap"
+# Warn if any trampolines slip through Patch2; they force an executable stack
+# and break the hardened link
+export CFLAGS="%{optflags} -fopenmp -std=gnu99 -fPIC -Wtrampolines"
+export FFLAGS="%{optflags} -cpp -fopenmp -fdefault-integer-8 -fPIC -I%{_libdir}/gfortran/modules -Wtrampolines"
# GCC10 compatibility
%if 0%{?fedora} > 31
reply other threads:[~2026-07-24 13:59 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178490158644.1.7398890149414075706.rpms-OpenMolcas-cc1e60f70b2f@fedoraproject.org \
--to=jussilehtola@fedoraproject.org \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox