]> git.pld-linux.org Git - packages/rpm.git/commitdiff
gcc6 fix
authorElan Ruusamäe <glen@pld-linux.org>
Sun, 25 Jun 2017 14:06:23 +0000 (17:06 +0300)
committerElan Ruusamäe <glen@pld-linux.org>
Sun, 25 Jun 2017 15:46:57 +0000 (18:46 +0300)
/usr/include/c++/6.3.0/cstdlib:143:11: error: ‘::getenv’ has not been declared
    using ::getenv;
            ^~~~~~

gcc6-stdlib.patch [new file with mode: 0644]
rpm.spec

diff --git a/gcc6-stdlib.patch b/gcc6-stdlib.patch
new file mode 100644 (file)
index 0000000..4274a97
--- /dev/null
@@ -0,0 +1,31 @@
+gcc6 hack
+
+http://lists.pld-linux.org/mailman/pipermail/pld-devel-en/2017-June/025365.html
+https://patchwork.openembedded.org/patch/122245/
+
+ ---
+
+gcc6 has fixed a long standing c++ include issue where <cheader>
+was different from <header.h> inclusion via
+
+https://gcc.gnu.org/ml/libstdc++/2016-01/msg00025.html
+
+and its also descibed in https://gcc.gnu.org/gcc-6/porting_to.html
+rpmio component uses some .cpp and .cc fies which need to use
+C stdlib.h from C library and not the C++ libstdc++ header
+therefore we pass _GLIBCXX_INCLUDE_NEXT_C_HEADERS so that it
+keeps the old behavior
+--- rpm-5.4.15/rpmio/rpmjni.cc~        2014-08-09 01:08:50.000000000 +0300
++++ rpm-5.4.15/rpmio/rpmjni.cc 2017-06-25 16:42:23.383464974 +0300
+@@ -1,3 +1,4 @@
++#define _GLIBCXX_INCLUDE_NEXT_C_HEADERS
+ #include "system.h"
+ #include <rpmlog.h>
+ #include <rpmmacro.h>
+--- rpm-5.4.15/rpmqv.cc~       2017-06-25 17:37:53.000000000 +0300
++++ rpm-5.4.15/rpmqv.cc        2017-06-25 18:01:37.158939691 +0300
+@@ -1,3 +1,4 @@
++#define _GLIBCXX_INCLUDE_NEXT_C_HEADERS
+ #include "system.h"
+ extern const char *__progname;
index 086e21360cb1c73f9376162c76dd6f6e3cbf7e3e..f22537a999d57bebf52100a4f717403b2192914b 100644 (file)
--- a/rpm.spec
+++ b/rpm.spec
@@ -151,6 +151,7 @@ Patch55:    %{name}-disable-hmac-verify.patch
 Patch56:       %{name}-macros.patch
 Patch57:       %{name}-db5.2.patch
 Patch58:       %{name}-preserve-iterator.patch
 Patch56:       %{name}-macros.patch
 Patch57:       %{name}-db5.2.patch
 Patch58:       %{name}-preserve-iterator.patch
+Patch59:       gcc6-stdlib.patch
 Patch60:       %{name}-python-sitescriptdir.patch
 Patch61:       %{name}-clean-docdir.patch
 Patch62:       %{name}-DB_CONFIG.patch
 Patch60:       %{name}-python-sitescriptdir.patch
 Patch61:       %{name}-clean-docdir.patch
 Patch62:       %{name}-DB_CONFIG.patch
@@ -944,6 +945,7 @@ cd -
 %patch56 -p1
 %{!?with_db61:%patch57 -p1}
 %patch58 -p1
 %patch56 -p1
 %{!?with_db61:%patch57 -p1}
 %patch58 -p1
+%patch59 -p1
 %patch60 -p1
 %patch61 -p1
 %patch62 -p1
 %patch60 -p1
 %patch61 -p1
 %patch62 -p1
This page took 0.035116 seconds and 4 git commands to generate.