summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2016-05-11 10:35:08 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-05-13 13:41:29 +0100
commitb8e70ce2044b3f88b0d49bde31fd68dc57c10e86 (patch)
tree5502de13cd8cddc4424f4bebe7054ea865bd69d4 /meta/recipes-devtools
parent24d99279c582878901ccff36eb059e4786b124da (diff)
downloadpoky-b8e70ce2044b3f88b0d49bde31fd68dc57c10e86.tar.gz
rpm: Fix build with gcc6
(From OE-Core rev: e9c86d85460f45011bd978e1495a2b802d733020) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r--meta/recipes-devtools/rpm/rpm/gcc6-stdlib.patch54
-rw-r--r--meta/recipes-devtools/rpm/rpm_5.4.16.bb3
2 files changed, 56 insertions, 1 deletions
diff --git a/meta/recipes-devtools/rpm/rpm/gcc6-stdlib.patch b/meta/recipes-devtools/rpm/rpm/gcc6-stdlib.patch
new file mode 100644
index 0000000000..0a372c6dad
--- /dev/null
+++ b/meta/recipes-devtools/rpm/rpm/gcc6-stdlib.patch
@@ -0,0 +1,54 @@
1gcc6 has fixed a long standing c++ include issue where <cheader>
2was different from <header.h> inclusion via
3
4https://gcc.gnu.org/ml/libstdc++/2016-01/msg00025.html
5
6and its also descibed in https://gcc.gnu.org/gcc-6/porting_to.html
7rpmio component uses some .cpp and .cc fies which need to use
8C stdlib.h from C library and not the C++ libstdc++ header
9therefore we pass _GLIBCXX_INCLUDE_NEXT_C_HEADERS so that it
10keeps the old behavior
11
12/a/build/tmp/sysroots/raspberrypi2/usr/include/c++/6.0.1/cstdlib:143:11: error: '::getenv' has not been declared
13 using ::getenv;
14 ^~~~~~
15In file included from ../../rpm-5.4.15/system.h:201:0,
16 from ../../rpm-5.4.15/rpmio/rpmjs.cpp:1:
17/a/build/tmp/sysroots/raspberrypi2/usr/include/c++/6.0.1/stdlib.h:62:12: error: 'std::getenv' has not been declared
18 using std::getenv;
19
20Upstream-Status: Pending
21Signed-off-by: Khem Raj <raj.khem@gmail.com>
22
23Index: rpm-5.4.15/rpmio/Makefile.am
24===================================================================
25--- rpm-5.4.15.orig/rpmio/Makefile.am
26+++ rpm-5.4.15/rpmio/Makefile.am
27@@ -151,7 +151,7 @@ librpmio_la_SOURCES = \
28 groestl.c hamsi.c jh.c keccak.c lane.c luffa.c md2.c md6.c radiogatun.c\
29 salsa10.c salsa20.c shabal.c shavite3.c simd.c skein.c tib3.c tiger.c \
30 rpmgit.c rpmio-stub.c \
31- rpmjs.cpp rpmjsio.c rpmkeyring.c \
32+ rpmjni.cc rpmjs.cpp rpmjsio.c rpmkeyring.c \
33 rpmnix.c rpmodbc.c rpmsql.c set.c \
34 ar.c \
35 argv.c \
36@@ -195,7 +195,6 @@ librpmio_la_SOURCES = \
37 rpmhook.c \
38 rpmio.c \
39 rpmiob.c \
40- rpmjni.cc \
41 rpmku.c \
42 rpmlog.c \
43 rpmltc.c \
44@@ -279,7 +278,9 @@ keccak.lo: $(top_srcdir)/rpmio/keccak.c
45 #rpmjs.lo: $(top_srcdir)/rpmio/rpmjs.c
46 # @$(LTCOMPILE) -O0 -c $<
47 rpmjs.lo: $(top_srcdir)/rpmio/rpmjs.cpp
48- @$(LTCOMPILE) -O0 -c $<
49+ @$(LTCOMPILE) -O0 -c -D_GLIBCXX_INCLUDE_NEXT_C_HEADERS $<
50+rpmjni.lo: $(top_srcdir)/rpmio/rpmjni.cc
51+ @$(LTCOMPILE) -O0 -c -D_GLIBCXX_INCLUDE_NEXT_C_HEADERS $<
52
53 YACC = byacc -d
54 getdate.c: getdate.y
diff --git a/meta/recipes-devtools/rpm/rpm_5.4.16.bb b/meta/recipes-devtools/rpm/rpm_5.4.16.bb
index f2c12d2de1..7ebd5e9359 100644
--- a/meta/recipes-devtools/rpm/rpm_5.4.16.bb
+++ b/meta/recipes-devtools/rpm/rpm_5.4.16.bb
@@ -116,6 +116,7 @@ SRC_URI += " \
116 file://rpm-fix-lua-tests-compilation-failure.patch \ 116 file://rpm-fix-lua-tests-compilation-failure.patch \
117 file://rpmqv.c-check-_gpg_passphrase-before-ask-for-input.patch \ 117 file://rpmqv.c-check-_gpg_passphrase-before-ask-for-input.patch \
118 file://0001-Disable-__sync_add_and_fetch_8-on-nios2.patch \ 118 file://0001-Disable-__sync_add_and_fetch_8-on-nios2.patch \
119 file://gcc6-stdlib.patch \
119" 120"
120 121
121# OE specific changes 122# OE specific changes
@@ -344,7 +345,7 @@ EXTRA_OECONF += "--verbose \
344 --program-prefix= \ 345 --program-prefix= \
345 YACC=byacc" 346 YACC=byacc"
346 347
347CFLAGS_append = " -DRPM_VENDOR_WINDRIVER -DRPM_VENDOR_POKY -DRPM_VENDOR_OE" 348CFLAGS_append = " -DRPM_VENDOR_WINDRIVER -DRPM_VENDOR_POKY -DRPM_VENDOR_OE -D_GLIBCXX_INCLUDE_NEXT_C_HEADERS"
348 349
349LDFLAGS_append_libc-uclibc = "-lrt -lpthread" 350LDFLAGS_append_libc-uclibc = "-lrt -lpthread"
350 351