From 2e4bea0e7924557f08c46a752ddd0f361ddc4f1688a8208a195a210b0c1940be Mon Sep 17 00:00:00 2001 From: Dave Plater Date: Mon, 8 Jun 2020 12:19:53 +0000 Subject: [PATCH] Accepting request 812587 from home:plater:lilypond - Fix build with gcc10 by removing optimization from the build flags Thanks to the lilypond devs. OBS-URL: https://build.opensuse.org/request/show/812587 OBS-URL: https://build.opensuse.org/package/show/devel:languages:misc/guile1?expand=0&rev=38 --- guile1.changes | 5 +++-- guile1.spec | 12 ++++++++++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/guile1.changes b/guile1.changes index b855b08..65b3db2 100644 --- a/guile1.changes +++ b/guile1.changes @@ -1,7 +1,8 @@ ------------------------------------------------------------------- -Sun Jun 7 07:16:07 UTC 2020 - Dave Plater +Mon Jun 8 12:03:54 UTC 2020 - Dave Plater -- Fix build against gcc10 with -fcommon flag. +- Fix build with gcc10 by removing optimization from the build flags + Thanks to the lilypond devs. ------------------------------------------------------------------- Sat Nov 23 12:19:17 UTC 2019 - Dave Plater diff --git a/guile1.spec b/guile1.spec index 3b481a1..204df2f 100644 --- a/guile1.spec +++ b/guile1.spec @@ -24,6 +24,7 @@ Summary: GNU's Ubiquitous Intelligent Language for Extension License: LGPL-2.1-or-later Group: Development/Languages/Scheme URL: https://www.gnu.org/software/guile/ +#https://github.com/texmacs/guile/archive/texmacs.zip Source0: https://ftp.gnu.org/gnu/guile/guile-%{version}.tar.gz Source1: https://ftp.gnu.org/gnu/guile/guile-%{version}.tar.gz.sig Source2: %{name}.keyring @@ -169,7 +170,14 @@ sed -i s/-Werror// configure.in configure %build %define _lto_cflags %{nil} -export CFLAGS="%{optflags} -fcommon" +# NOTE: GCC 10 succeeds in rewriting a +#particular tail call into jumps. This avoids stack frames from the +#recursive call which the check relies on. Funnily enough, a comment +#says: "If the code could be inlined, that might cause the test to give +#an incorrect answer." - indeed. +# As a result the guile executable causes a segfault when built with -02 +export CFLAGS="`echo %optflags|tr 02 00`" +echo $CFLAGS sed -i "s:GUILE_:GUILE1_:" guile-config/guile.m4 sed -i "s:guile:guile1:" guile-config/guile.m4 # automake 1.13: do not run test simultaneously @@ -182,7 +190,7 @@ autoreconf -fi --with-pic \ --with-threads \ --program-transform-name="s:guile:%{binpref}:" -make %{?_smp_mflags} +make --trace %{?_smp_mflags} %check # 47 of 11930 tests are failing now