Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 1 | gcc6 has fixed a long standing c++ include issue where <cheader> |
| 2 | was different from <header.h> inclusion via |
| 3 | |
| 4 | https://gcc.gnu.org/ml/libstdc++/2016-01/msg00025.html |
| 5 | |
| 6 | and its also descibed in https://gcc.gnu.org/gcc-6/porting_to.html |
| 7 | rpmio component uses some .cpp and .cc fies which need to use |
| 8 | C stdlib.h from C library and not the C++ libstdc++ header |
| 9 | therefore we pass _GLIBCXX_INCLUDE_NEXT_C_HEADERS so that it |
| 10 | keeps 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 | ^~~~~~ |
| 15 | In 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 | |
| 20 | Upstream-Status: Pending |
| 21 | Signed-off-by: Khem Raj <raj.khem@gmail.com> |
| 22 | |
| 23 | Index: 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 |