diff --git a/handle-Werror-return-type.patch b/handle-Werror-return-type.patch new file mode 100644 index 0000000..c8c8b14 --- /dev/null +++ b/handle-Werror-return-type.patch @@ -0,0 +1,10 @@ +--- libtool-2.4.7/tests/resident.at ++++ libtool-2.4.7/tests/resident.at +@@ -117,6 +117,7 @@ + setup_plugin (void) + { + atexit (bye); ++ return 0; + } + ]]) + diff --git a/libtool.changes b/libtool.changes index ace3aab..161a197 100644 --- a/libtool.changes +++ b/libtool.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Mar 29 13:46:49 UTC 2022 - Dirk Müller + +- add handle-Werror-return-type.patch +- disable lto, breaks libtool as seen in testsuite + ------------------------------------------------------------------- Sun Mar 20 20:47:49 UTC 2022 - Dirk Müller diff --git a/libtool.spec b/libtool.spec index 14ead83..ddc047a 100644 --- a/libtool.spec +++ b/libtool.spec @@ -36,6 +36,8 @@ Source3: baselibs.conf Source4: libtool-rpmlintrc # PATCH-FIX-OPENSUSE -- do not add build host name boo#1084909 Patch0: libtool-reproducible-hostname.patch +# PATCH-FIX-OPENSUSE: workaround irrelevant compiler warning +Patch1: handle-Werror-return-type.patch BuildRequires: automake BuildRequires: gcc-c++ BuildRequires: gcc-fortran @@ -65,22 +67,19 @@ Group: Development/Libraries/C and C++ Library needed by programs that use the ltdl interface of GNU libtool. %prep -%setup -q -n libtool-%{version} -%patch0 -p1 +%autosetup -p1 -n libtool-%{version} %build -%global _lto_cflags %{_lto_cflags} -ffat-lto-objects -# FIXME: you should use the %%configure macro -./configure CFLAGS="%{optflags}" \ - --prefix=%{_prefix} --infodir=%{_infodir} --libdir=%{_libdir} -# force rebuild with non-broken makeinfo +%define _lto_cflags %{nil} +export CFLAGS="%{optflags} -fno-strict-aliasing" +%configure rm -f doc/libtool.info %make_build %if "%{flavor}" == "testsuite" %check trap 'test $? -ne 0 && cat tests/testsuite.log' EXIT -%make_build check || : +%make_build check %install %else