* [Buildroot] [PATCH 1/1] package/leveldb: fix build for gcc < 5.x
@ 2019-10-26 19:27 Bernd Kuhls
2019-10-27 9:18 ` Thomas Petazzoni
0 siblings, 1 reply; 2+ messages in thread
From: Bernd Kuhls @ 2019-10-26 19:27 UTC (permalink / raw)
To: buildroot
Without defining LEVELDB_HAS_PORT_CONFIG_H port/port_config.h will not
be included:
https://github.com/google/leveldb/blob/master/port/port_stdcxx.h#L8
which breaks endian detection. Add the define to our memenv patch to fix
building with gcc < 5.
__has_include was added in gcc5: https://gcc.gnu.org/gcc-5/changes.html
Fixes:
http://autobuild.buildroot.net/results/4ac/4ac8fbed79307326086ab294eba9e68cf208e6ac/
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
---
package/leveldb/0002-CMake-install-libmemenv.a.patch | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/package/leveldb/0002-CMake-install-libmemenv.a.patch b/package/leveldb/0002-CMake-install-libmemenv.a.patch
index 85ee8a824b..f2e88a8a6c 100644
--- a/package/leveldb/0002-CMake-install-libmemenv.a.patch
+++ b/package/leveldb/0002-CMake-install-libmemenv.a.patch
@@ -32,6 +32,12 @@ index a65afbf..83b2425 100644
+ # Used by port/port.h.
+ ${LEVELDB_PLATFORM_NAME}=1
+)
++if (NOT HAVE_CXX17_HAS_INCLUDE)
++ target_compile_definitions(memenv
++ PRIVATE
++ LEVELDB_HAS_PORT_CONFIG_H=1
++ )
++endif(NOT HAVE_CXX17_HAS_INCLUDE)
+target_include_directories(memenv
+ PUBLIC
+ $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
--
2.20.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Buildroot] [PATCH 1/1] package/leveldb: fix build for gcc < 5.x
2019-10-26 19:27 [Buildroot] [PATCH 1/1] package/leveldb: fix build for gcc < 5.x Bernd Kuhls
@ 2019-10-27 9:18 ` Thomas Petazzoni
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2019-10-27 9:18 UTC (permalink / raw)
To: buildroot
On Sat, 26 Oct 2019 21:27:07 +0200
Bernd Kuhls <bernd.kuhls@t-online.de> wrote:
> Without defining LEVELDB_HAS_PORT_CONFIG_H port/port_config.h will not
> be included:
> https://github.com/google/leveldb/blob/master/port/port_stdcxx.h#L8
>
> which breaks endian detection. Add the define to our memenv patch to fix
> building with gcc < 5.
> __has_include was added in gcc5: https://gcc.gnu.org/gcc-5/changes.html
>
> Fixes:
> http://autobuild.buildroot.net/results/4ac/4ac8fbed79307326086ab294eba9e68cf208e6ac/
>
> Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
> ---
> package/leveldb/0002-CMake-install-libmemenv.a.patch | 6 ++++++
> 1 file changed, 6 insertions(+)
Applied, thanks. Could you work with leveldb upstream to find a
solution to install the memenv library that they can accept ?
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-10-27 9:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-26 19:27 [Buildroot] [PATCH 1/1] package/leveldb: fix build for gcc < 5.x Bernd Kuhls
2019-10-27 9:18 ` Thomas Petazzoni
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.