From fe11b5492705084d8c1cefcd7a5869a59acf54ac Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Jan 17 2020 18:39:40 +0000 Subject: - Fix autoconf generated configure tests that are compromised by LTO. --- diff --git a/configure.patch b/configure.patch new file mode 100644 index 0000000..bbb4ce4 --- /dev/null +++ b/configure.patch @@ -0,0 +1,32 @@ +diff -Nrup a/configure b/configure +--- a/configure 2019-08-24 19:04:36.000000000 -0600 ++++ b/configure 2019-12-19 14:22:22.305194031 -0700 +@@ -14479,7 +14479,7 @@ nocrash_init (void) + + float x = (float)1.2; + float y = (float)1.3; +- float fun () { return x*y; } ++ __attribute__ ((noinline,noclone) float fun () { return x*y; } + int main() + { nocrash_init(); + {int val = (* (int (*) ()) fun) (); +@@ -15364,7 +15364,7 @@ fi + + mprotect_prog="$mprotect_prog"' + char* area = (char*) malloc(6*pagesize); +- char* fault_address = area + pagesize*7/2; ++ volatile char* fault_address = area + pagesize*7/2; + ' + if test -z "$no_mprotect"; then + if test "$cross_compiling" = yes; then : +@@ -16534,8 +16534,8 @@ else + { + unsigned int pagesize = getpagesize (); + int fd; +- char *pw; +- char *px; ++ volatile char *pw; ++ volatile char *px; + fd = open ("$filename", O_CREAT | O_RDWR | O_TRUNC, 0700); + if (fd < 0) + return 1; diff --git a/ffcall.spec b/ffcall.spec index 348bd08..b2dea8a 100644 --- a/ffcall.spec +++ b/ffcall.spec @@ -1,11 +1,12 @@ Name: ffcall Version: 2.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Libraries for foreign function call interfaces License: GPLv2+ URL: http://www.gnu.org/software/libffcall/ Source0: https://ftp.gnu.org/gnu/libffcall/lib%{name}-%{version}.tar.gz +Patch0: configure.patch BuildRequires: gcc BuildRequires: gnulib-devel @@ -37,6 +38,7 @@ Static libraries for foreign function call interfaces. %prep %setup -q -n lib%{name}-%{version} +%patch0 -p1 %build %configure CFLAGS="%{optflags} -fno-strict-aliasing" @@ -90,6 +92,10 @@ popd %changelog +* Fri Jan 17 2020 Jeff Law - 2.2-2 +- Fix autoconf generated configure tests that are compromised + by LTO. + * Mon Aug 26 2019 Jerry James - 2.2-1 - New upstream release