From 5e33cb4869539fd62679c4cfa4e99394a75ba9f2ef736bea6a7a632e21b9211c Mon Sep 17 00:00:00 2001 From: Richard Biener Date: Thu, 19 Feb 2015 09:26:50 +0000 Subject: [PATCH] Accepting request 286723 from home:rguenther:branches:Base:System - Add libgpg-error-1.18-gcc5.patch to pass -P to the preprocessor when generating files to deal with C preprocessor changes in GCC 4.9 and up. OBS-URL: https://build.opensuse.org/request/show/286723 OBS-URL: https://build.opensuse.org/package/show/Base:System/libgpg-error?expand=0&rev=38 --- libgpg-error-1.18-gcc5.patch | 59 ++++++++++++++++++++++++++++++++++++ libgpg-error.changes | 6 ++++ libgpg-error.spec | 4 ++- 3 files changed, 68 insertions(+), 1 deletion(-) create mode 100644 libgpg-error-1.18-gcc5.patch diff --git a/libgpg-error-1.18-gcc5.patch b/libgpg-error-1.18-gcc5.patch new file mode 100644 index 0000000..cd32f1e --- /dev/null +++ b/libgpg-error-1.18-gcc5.patch @@ -0,0 +1,59 @@ +Index: src/Makefile.am +=================================================================== +--- src/Makefile.am.orig 2014-10-25 14:42:43.000000000 +0200 ++++ src/Makefile.am 2015-02-19 10:22:03.273114977 +0100 +@@ -204,14 +204,14 @@ code-to-errno.h: Makefile mkerrnos.awk e + # It is correct to use $(CPP). We want the host's idea of the error codes. + mkerrcodes.h: Makefile mkerrcodes.awk $(gpg_extra_headers) + $(AWK) -f $(srcdir)/mkerrcodes1.awk $(srcdir)/errnos.in >_$@ +- $(CPP) $(CPPFLAGS) $(extra_cppflags) _$@ | grep GPG_ERR_ | \ ++ $(CPP) -P $(CPPFLAGS) $(extra_cppflags) _$@ | grep GPG_ERR_ | \ + $(AWK) -f $(srcdir)/mkerrcodes.awk >$@ + -rm _$@ + + if HAVE_W32CE_SYSTEM + # It is correct to use $(CPP). We want the host's idea of the error codes. + mkw32errmap.tab.h: Makefile mkw32errmap.c +- $(CPP) -DRESOLVE_MACROS $(srcdir)/mkw32errmap.c | \ ++ $(CPP) -P -DRESOLVE_MACROS $(srcdir)/mkw32errmap.c | \ + grep '{&mkw32errmap_marker' >$@ + mkw32errmap.map.c: mkw32errmap + ./mkw32errmap --map > $@ +@@ -227,7 +227,7 @@ endif + # the data is really to be preprocessed. + gpg-error.def: Makefile gpg-error.def.in + cat $(srcdir)/gpg-error.def.in >_$@.h +- $(CPP) $(DEFAULT_INCLUDES) $(INCLUDES) $(extra_cppflags) _$@.h | \ ++ $(CPP) -P $(DEFAULT_INCLUDES) $(INCLUDES) $(extra_cppflags) _$@.h | \ + grep -v '^#' >$@ + -rm _$@.h + +Index: src/Makefile.in +=================================================================== +--- src/Makefile.in.orig 2015-01-26 10:34:10.000000000 +0100 ++++ src/Makefile.in 2015-02-19 10:22:42.318558424 +0100 +@@ -1227,13 +1227,13 @@ code-to-errno.h: Makefile mkerrnos.awk e + # It is correct to use $(CPP). We want the host's idea of the error codes. + mkerrcodes.h: Makefile mkerrcodes.awk $(gpg_extra_headers) + $(AWK) -f $(srcdir)/mkerrcodes1.awk $(srcdir)/errnos.in >_$@ +- $(CPP) $(CPPFLAGS) $(extra_cppflags) _$@ | grep GPG_ERR_ | \ ++ $(CPP) -P $(CPPFLAGS) $(extra_cppflags) _$@ | grep GPG_ERR_ | \ + $(AWK) -f $(srcdir)/mkerrcodes.awk >$@ + -rm _$@ + + # It is correct to use $(CPP). We want the host's idea of the error codes. + @HAVE_W32CE_SYSTEM_TRUE@mkw32errmap.tab.h: Makefile mkw32errmap.c +-@HAVE_W32CE_SYSTEM_TRUE@ $(CPP) -DRESOLVE_MACROS $(srcdir)/mkw32errmap.c | \ ++@HAVE_W32CE_SYSTEM_TRUE@ $(CPP) -P -DRESOLVE_MACROS $(srcdir)/mkw32errmap.c | \ + @HAVE_W32CE_SYSTEM_TRUE@ grep '{&mkw32errmap_marker' >$@ + @HAVE_W32CE_SYSTEM_TRUE@mkw32errmap.map.c: mkw32errmap + @HAVE_W32CE_SYSTEM_TRUE@ ./mkw32errmap --map > $@ +@@ -1247,7 +1247,7 @@ mkerrcodes.h: Makefile mkerrcodes.awk $( + # the data is really to be preprocessed. + gpg-error.def: Makefile gpg-error.def.in + cat $(srcdir)/gpg-error.def.in >_$@.h +- $(CPP) $(DEFAULT_INCLUDES) $(INCLUDES) $(extra_cppflags) _$@.h | \ ++ $(CPP) -P $(DEFAULT_INCLUDES) $(INCLUDES) $(extra_cppflags) _$@.h | \ + grep -v '^#' >$@ + -rm _$@.h + diff --git a/libgpg-error.changes b/libgpg-error.changes index c383788..d69e520 100644 --- a/libgpg-error.changes +++ b/libgpg-error.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Feb 19 09:24:12 UTC 2015 - rguenther@suse.com + +- Add libgpg-error-1.18-gcc5.patch to pass -P to the preprocessor + when generating files to deal with C preprocessor changes in GCC 4.9 and up. + ------------------------------------------------------------------- Mon Jan 26 13:42:03 UTC 2015 - andreas.stieger@gmx.de diff --git a/libgpg-error.spec b/libgpg-error.spec index 851b8a3..a842730 100644 --- a/libgpg-error.spec +++ b/libgpg-error.spec @@ -1,7 +1,7 @@ # # spec file for package libgpg-error # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -28,6 +28,7 @@ Source1: ftp://ftp.gnupg.org/gcrypt/libgpg-error/%{name}-%{version}.tar.b # http://www.gnupg.org/signature_key.en.html Source2: %{name}.keyring Source3: baselibs.conf +Patch1: libgpg-error-1.18-gcc5.patch BuildRequires: libtool BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -72,6 +73,7 @@ Files needed for software development using libgpg-error. %prep %setup -q -n libgpg-error-%{version} +%patch1 %build %configure \