From 8617c99e86f9b872d02798eeee32143e0776e56d6b582af07eb5b14aae2bd930 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Thu, 22 Aug 2019 12:51:23 +0000 Subject: [PATCH] Accepting request 724046 from home:michel_mno:branches:graphics - Add potrace_configure_chg_for_lto.patch to avoid PowerPC and ARM build failure when LTO enabled. OBS-URL: https://build.opensuse.org/request/show/724046 OBS-URL: https://build.opensuse.org/package/show/graphics/potrace?expand=0&rev=25 --- potrace.changes | 6 ++++++ potrace.spec | 10 +++++++--- potrace_configure_chg_for_lto.patch | 26 ++++++++++++++++++++++++++ 3 files changed, 39 insertions(+), 3 deletions(-) create mode 100644 potrace_configure_chg_for_lto.patch diff --git a/potrace.changes b/potrace.changes index 7883b68..ff03912 100644 --- a/potrace.changes +++ b/potrace.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Aug 16 12:41:48 UTC 2019 - Michel Normand + +- Add potrace_configure_chg_for_lto.patch + to avoid PowerPC and ARM build failure when LTO enabled. + ------------------------------------------------------------------- Wed Dec 13 09:48:27 UTC 2017 - dimstar@opensuse.org diff --git a/potrace.spec b/potrace.spec index 5b2733a..3cb85d4 100644 --- a/potrace.spec +++ b/potrace.spec @@ -1,7 +1,7 @@ # # spec file for package potrace # -# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,7 +12,7 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # @@ -20,11 +20,13 @@ Name: potrace Version: 1.15 Release: 0 Summary: Utility for Tracing a Bitmap to Scalable Outline Image -License: GPL-2.0+ +License: GPL-2.0-or-later Group: Productivity/Graphics/Convertors Url: http://potrace.sourceforge.net/ Source: http://potrace.sourceforge.net/download/%{version}/%{name}-%{version}.tar.gz +BuildRequires: libtool BuildRequires: zlib-devel +Patch1: potrace_configure_chg_for_lto.patch Provides: bitmap_tracing %description @@ -65,6 +67,7 @@ at any resolution. %prep %setup -q +%patch1 -p1 %build %define warn_flags -Wall -Wstrict-prototypes -Wpointer-arith -Wformat-security @@ -77,6 +80,7 @@ export CFLAGS="${CFLAGS/-fstack-protector /}" %endif # clang does not support that yet... export CFLAGS="${CFLAGS/-fstack-clash-protection /}" +autoreconf -fvi %configure\ --docdir=%{_docdir}/%{name}\ --with-libpotrace\ diff --git a/potrace_configure_chg_for_lto.patch b/potrace_configure_chg_for_lto.patch new file mode 100644 index 0000000..fa43fca --- /dev/null +++ b/potrace_configure_chg_for_lto.patch @@ -0,0 +1,26 @@ +From: Michel Normand +Subject: potrace configure chg for lto +Date: Fri, 16 Aug 2019 14:39:23 +0200 + +potrace configure chg for lto + +For asm inline checking. + +Signed-off-by: Michel Normand +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: potrace-1.15/configure.ac +=================================================================== +--- potrace-1.15.orig/configure.ac ++++ potrace-1.15/configure.ac +@@ -250,7 +250,7 @@ AC_CHECK_FUNC(strncasecmp, , + dnl ---------------------------------------------------------------------- + dnl Check whether we have i386 features + AC_MSG_CHECKING([for Intel 386]) +-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[int x; ++AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[int x; + asm("bsf %1,%0\njnz 0f\nmovl $32,%0\n0:":"=r"(x):"r"(x)); + return x; /* need this so that -O2 does not optimize the asm away */ + ]])],[AC_MSG_RESULT(yes)