The package rpms/gap.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/gap.git/commit/?id=45b2b55dd12400....
Change:
+%ifarch aarch64
Thanks.
Full change:
============
commit 45b2b55dd12400c031ef4f1d5b95bce2beb20094
Author: Jerry James <loganjerry(a)gmail.com>
Date: Mon Mar 23 17:10:40 2020 -0600
Turn off all inlining on aarch64 to work around possible GCC bug.
diff --git a/gap-aarch64.patch b/gap-aarch64.patch
index e779051..e7217c2 100644
--- a/gap-aarch64.patch
+++ b/gap-aarch64.patch
@@ -1,163 +1,3 @@
---- src/calls.h.orig 2020-02-29 02:02:10.000000000 -0700
-+++ src/calls.h 2020-03-21 08:20:20.695757397 -0600
-@@ -45,6 +45,7 @@
- #ifndef GAP_CALLS_H
- #define GAP_CALLS_H
-
-+#include "funcs.h"
- #include "gaputils.h"
- #include "objects.h"
-
-@@ -312,42 +313,66 @@ EXPORT_INLINE int IS_FUNC(Obj obj)
- */
- EXPORT_INLINE Obj CALL_0ARGS(Obj f)
- {
-- return HDLR_0ARGS(f)(f);
-+ CheckRecursionBefore();
-+ Obj o = HDLR_0ARGS(f)(f);
-+ DecRecursionDepth();
-+ return o;
- }
-
- EXPORT_INLINE Obj CALL_1ARGS(Obj f, Obj a1)
- {
-- return HDLR_1ARGS(f)(f, a1);
-+ CheckRecursionBefore();
-+ Obj o = HDLR_1ARGS(f)(f, a1);
-+ DecRecursionDepth();
-+ return o;
- }
-
- EXPORT_INLINE Obj CALL_2ARGS(Obj f, Obj a1, Obj a2)
- {
-- return HDLR_2ARGS(f)(f, a1, a2);
-+ CheckRecursionBefore();
-+ Obj o = HDLR_2ARGS(f)(f, a1, a2);
-+ DecRecursionDepth();
-+ return o;
- }
-
- EXPORT_INLINE Obj CALL_3ARGS(Obj f, Obj a1, Obj a2, Obj a3)
- {
-- return HDLR_3ARGS(f)(f, a1, a2, a3);
-+ CheckRecursionBefore();
-+ Obj o = HDLR_3ARGS(f)(f, a1, a2, a3);
-+ DecRecursionDepth();
-+ return o;
- }
-
- EXPORT_INLINE Obj CALL_4ARGS(Obj f, Obj a1, Obj a2, Obj a3, Obj a4)
- {
-- return HDLR_4ARGS(f)(f, a1, a2, a3, a4);
-+ CheckRecursionBefore();
-+ Obj o = HDLR_4ARGS(f)(f, a1, a2, a3, a4);
-+ DecRecursionDepth();
-+ return o;
- }
-
- EXPORT_INLINE Obj CALL_5ARGS(Obj f, Obj a1, Obj a2, Obj a3, Obj a4, Obj a5)
- {
-- return HDLR_5ARGS(f)(f, a1, a2, a3, a4, a5);
-+ CheckRecursionBefore();
-+ Obj o = HDLR_5ARGS(f)(f, a1, a2, a3, a4, a5);
-+ DecRecursionDepth();
-+ return o;
- }
-
- EXPORT_INLINE Obj CALL_6ARGS(Obj f, Obj a1, Obj a2, Obj a3, Obj a4, Obj a5, Obj a6)
- {
-- return HDLR_6ARGS(f)(f, a1, a2, a3, a4, a5, a6);
-+ CheckRecursionBefore();
-+ Obj o = HDLR_6ARGS(f)(f, a1, a2, a3, a4, a5, a6);
-+ DecRecursionDepth();
-+ return o;
- }
-
- EXPORT_INLINE Obj CALL_XARGS(Obj f, Obj as)
- {
-- return HDLR_XARGS(f)(f, as);
-+ CheckRecursionBefore();
-+ Obj o = HDLR_XARGS(f)(f, as);
-+ DecRecursionDepth();
-+ return o;
- }
-
-
-@@ -368,42 +393,66 @@ EXPORT_INLINE Obj CALL_XARGS(Obj f, Obj
- */
- EXPORT_INLINE Obj CALL_0ARGS_PROF(Obj f)
- {
-- return HDLR_0ARGS(PROF_FUNC(f))(f);
-+ CheckRecursionBefore();
-+ Obj o = HDLR_0ARGS(PROF_FUNC(f))(f);
-+ DecRecursionDepth();
-+ return o;
- }
-
- EXPORT_INLINE Obj CALL_1ARGS_PROF(Obj f, Obj a1)
- {
-- return HDLR_1ARGS(PROF_FUNC(f))(f, a1);
-+ CheckRecursionBefore();
-+ Obj o = HDLR_1ARGS(PROF_FUNC(f))(f, a1);
-+ DecRecursionDepth();
-+ return o;
- }
-
- EXPORT_INLINE Obj CALL_2ARGS_PROF(Obj f, Obj a1, Obj a2)
- {
-- return HDLR_2ARGS(PROF_FUNC(f))(f, a1, a2);
-+ CheckRecursionBefore();
-+ Obj o = HDLR_2ARGS(PROF_FUNC(f))(f, a1, a2);
-+ DecRecursionDepth();
-+ return o;
- }
-
- EXPORT_INLINE Obj CALL_3ARGS_PROF(Obj f, Obj a1, Obj a2, Obj a3)
- {
-- return HDLR_3ARGS(PROF_FUNC(f))(f, a1, a2, a3);
-+ CheckRecursionBefore();
-+ Obj o = HDLR_3ARGS(PROF_FUNC(f))(f, a1, a2, a3);
-+ DecRecursionDepth();
-+ return o;
- }
-
- EXPORT_INLINE Obj CALL_4ARGS_PROF(Obj f, Obj a1, Obj a2, Obj a3, Obj a4)
- {
-- return HDLR_4ARGS(PROF_FUNC(f))(f, a1, a2, a3, a4);
-+ CheckRecursionBefore();
-+ Obj o = HDLR_4ARGS(PROF_FUNC(f))(f, a1, a2, a3, a4);
-+ DecRecursionDepth();
-+ return o;
- }
-
- EXPORT_INLINE Obj CALL_5ARGS_PROF(Obj f, Obj a1, Obj a2, Obj a3, Obj a4, Obj a5)
- {
-- return HDLR_5ARGS(PROF_FUNC(f))(f, a1, a2, a3, a4, a5);
-+ CheckRecursionBefore();
-+ Obj o = HDLR_5ARGS(PROF_FUNC(f))(f, a1, a2, a3, a4, a5);
-+ DecRecursionDepth();
-+ return o;
- }
-
- EXPORT_INLINE Obj CALL_6ARGS_PROF(Obj f, Obj a1, Obj a2, Obj a3, Obj a4, Obj a5, Obj
a6)
- {
-- return HDLR_6ARGS(PROF_FUNC(f))(f, a1, a2, a3, a4, a5, a6);
-+ CheckRecursionBefore();
-+ Obj o = HDLR_6ARGS(PROF_FUNC(f))(f, a1, a2, a3, a4, a5, a6);
-+ DecRecursionDepth();
-+ return o;
- }
-
- EXPORT_INLINE Obj CALL_XARGS_PROF(Obj f, Obj as)
- {
-- return HDLR_XARGS(PROF_FUNC(f))(f, as);
-+ CheckRecursionBefore();
-+ Obj o = HDLR_XARGS(PROF_FUNC(f))(f, as);
-+ DecRecursionDepth();
-+ return o;
- }
-
-
--- src/funcs.c.orig 2020-02-29 02:02:10.000000000 -0700
+++ src/funcs.c 2020-03-21 08:22:21.264432840 -0600
@@ -53,8 +53,7 @@ extern inline struct FuncsModuleState *F
@@ -170,75 +10,6 @@
}
void DecRecursionDepth(void)
-@@ -403,14 +402,6 @@ void RecursionDepthTrap( void )
- }
- }
-
--#define CHECK_RECURSION_BEFORE \
-- HookedLineIntoFunction(func); \
-- CheckRecursionBefore();
--
--#define CHECK_RECURSION_AFTER \
-- DecRecursionDepth(); \
-- HookedLineOutFunction(func);
--
- #ifdef HPCGAP
-
- #define REMEMBER_LOCKSTACK() \
-@@ -464,7 +455,7 @@ static ALWAYS_INLINE Obj DoExecFunc(Obj
- {
- Bag oldLvars; /* old values bag */
- Obj result;
-- CHECK_RECURSION_BEFORE
-+ HookedLineIntoFunction(func);
-
- #ifdef HPCGAP
- REMEMBER_LOCKSTACK();
-@@ -488,7 +479,7 @@ static ALWAYS_INLINE Obj DoExecFunc(Obj
- /* switch back to the old values bag */
- SWITCH_TO_OLD_LVARS_AND_FREE( oldLvars );
-
-- CHECK_RECURSION_AFTER
-+ HookedLineOutFunction(func);
-
- /* return the result */
- return result;
-@@ -542,7 +533,7 @@ static Obj DoExecFuncXargs(Obj func, Obj
- UInt i; /* loop variable */
- Obj result;
-
-- CHECK_RECURSION_BEFORE
-+ HookedLineIntoFunction(func);
-
- /* check the number of arguments */
- len = NARG_FUNC( func );
-@@ -573,7 +564,7 @@ static Obj DoExecFuncXargs(Obj func, Obj
- /* switch back to the old values bag */
- SWITCH_TO_OLD_LVARS_AND_FREE( oldLvars );
-
-- CHECK_RECURSION_AFTER
-+ HookedLineOutFunction(func);
-
- /* return the result */
- return result;
-@@ -588,7 +579,7 @@ static Obj DoPartialUnWrapFunc(Obj func,
- UInt len;
- Obj result;
-
-- CHECK_RECURSION_BEFORE
-+ HookedLineIntoFunction(func);
-
- named = ((UInt)-NARG_FUNC(func))-1;
- len = LEN_PLIST(args);
-@@ -625,7 +616,7 @@ static Obj DoPartialUnWrapFunc(Obj func,
- /* switch back to the old values bag */
- SWITCH_TO_OLD_LVARS_AND_FREE( oldLvars );
-
-- CHECK_RECURSION_AFTER
-+ HookedLineOutFunction(func);
-
- /* return the result */
- return result;
--- src/funcs.h.orig 2020-02-29 02:02:10.000000000 -0700
+++ src/funcs.h 2020-03-21 08:15:52.136455354 -0600
@@ -55,7 +55,7 @@ void RecursionDepthTrap(void);
@@ -261,3 +32,14 @@
struct InterpreterHooks * hook; \
for (i = 0; i < HookCount; ++i) { \
hook = activeHooks[i]; \
+--- src/system.h.orig 2020-02-29 02:02:10.000000000 -0700
++++ src/system.h 2020-03-23 16:33:30.583638125 -0600
+@@ -101,7 +101,7 @@ enum {
+ *T Wrappers for various compiler attributes
+ **
+ */
+-#if defined(HAVE_FUNC_ATTRIBUTE_ALWAYS_INLINE) && !defined(GAP_KERNEL_DEBUG)
++#if 0
+ #define ALWAYS_INLINE __attribute__((always_inline)) inline
+ #else
+ #define ALWAYS_INLINE inline
diff --git a/gap.spec b/gap.spec
index 94ce88b..e2b843c 100644
--- a/gap.spec
+++ b/gap.spec
@@ -31,7 +31,7 @@
Name: gap
Version: 4.11.0
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Computational discrete algebra
%global majver %(cut -d. -f1-2 <<< %{version})
@@ -207,6 +207,11 @@ cp -p %{SOURCE1} README.fedora
export LDFLAGS="-Wl,-z,relro -Wl,--as-needed"
export CPPFLAGS='-DSYS_DEFAULT_PATHS="\"%{gapdir}\""'
export STRIP=%{_bindir}/true
+%ifarch aarch64
+# Work around an apparent GCC inlining bug
+export CFLAGS="%{optflags} -fno-inline"
+export CXXFLAGS="%{optflags} -fno-inline"
+%endif
%configure
# Get rid of undesirable hardcoded rpaths
@@ -455,6 +460,9 @@ make check
%{_libdir}/libgap.so
%changelog
+* Mon Mar 23 2020 Jerry James <loganjerry(a)gmail.com> - 4.11.0-2
+- Turn off all inlining on aarch64 to work around possible GCC bug
+
* Fri Mar 13 2020 Jerry James <loganjerry(a)gmail.com> - 4.11.0-1
- Version 4.11.0
- Drop upstreamed -immutable patch