From 69bc3ae7980dc9dabba30ec5469775b4bc8ad99e Mon Sep 17 00:00:00 2001 From: Jakub Jirutka Date: Sat, 22 Apr 2017 13:20:56 +0200 Subject: testing/lldb: fix build with clang --- testing/lldb/APKBUILD | 2 ++ testing/lldb/musl-include-limits.h.patch | 24 ++++++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 testing/lldb/musl-include-limits.h.patch (limited to 'testing/lldb') diff --git a/testing/lldb/APKBUILD b/testing/lldb/APKBUILD index f879bc1365..45da34b2fa 100644 --- a/testing/lldb/APKBUILD +++ b/testing/lldb/APKBUILD @@ -13,6 +13,7 @@ makedepends="clang-dev clang-static cmake doxygen libedit-dev libffi-dev python2-dev swig" subpackages="$pkgname-dev py2-$pkgname:py2" source="http://llvm.org/releases/$pkgver/$pkgname-$pkgver.src.tar.xz + musl-include-limits.h.patch musl-include-ptrace.aarch64.patch" builddir="$srcdir/$pkgname-$pkgver.src" @@ -56,4 +57,5 @@ py2() { } sha512sums="931e8c6e74b66c4ac1c56c9d067309a319aa9a9f4c72d4ed9703be3decefeb8730084ad8c3581e4e31d61cdd4074518d2ed72bacce1e689e087b2f62ad4bb2e8 lldb-4.0.0.src.tar.xz +200b3628f091bd5c4e5de8ebd4f0f4d4746553df50db82704381ece7ae7d4d50b9766a53dd972cd04aea4ea664dbe45ca5ac23a341d436dd8366a591a0c96722 musl-include-limits.h.patch 1613a1cb042edd430aba6b86e4971ebb01f7d2bc3f13a5a1264cb94da7612188897e9dcaaa9233be8af5c8f4bad013dd0cfb821e323cd73dfe07fe125869ccef musl-include-ptrace.aarch64.patch" diff --git a/testing/lldb/musl-include-limits.h.patch b/testing/lldb/musl-include-limits.h.patch new file mode 100644 index 0000000000..3cc0dd6325 --- /dev/null +++ b/testing/lldb/musl-include-limits.h.patch @@ -0,0 +1,24 @@ +This patch fixes error when building with clang++: + + [159/862] Building CXX object source/Host/CMakeFiles/lldbHost.dir/common/FileSpec.cpp.o + FAILED: source/Host/CMakeFiles/lldbHost.dir/common/FileSpec.cpp.o + /usr/bin/clang++ -DHAVE_PROCESS_VM_READV -DHAVE_ROUND -DLIBXML2_DEFINED -DLLDB_DISABLE_LIBEDIT -DLLDB_USE_BUILTIN_DEMANGLER -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Isource/Host -I../source/Host -I../include -Iinclude -I/usr/lib/llvm4/include -I/usr/include/python2.7 -I../tools/clang/include -I../clang/include -I/usr/include/libxml2 -I../source/. -I../source/Plugins/Process/Linux -I../source/Plugins/Process/POSIX -Os -fomit-frame-pointer -fPIC -fvisibility-inlines-hidden -Werror=date-time -std=c++11 -fcolor-diagnostics -ffunction-sections -fdata-sections -Wno-deprecated-declarations -Wno-unknown-pragmas -Wno-strict-aliasing -Wno-deprecated-register -Wno-vla-extension -O3 -DNDEBUG -fno-exceptions -MD -MT source/Host/CMakeFiles/lldbHost.dir/common/FileSpec.cpp.o -MF source/Host/CMakeFiles/lldbHost.dir/common/FileSpec.cpp.o.d -o source/Host/CMakeFiles/lldbHost.dir/common/FileSpec.cpp.o -c ../source/Host/common/FileSpec.cpp + ../source/Host/common/FileSpec.cpp:92:22: error: use of undeclared identifier 'PATH_MAX' + char resolved_path[PATH_MAX]; + ^ + ../source/Host/common/FileSpec.cpp:675:17: error: use of undeclared identifier 'PATH_MAX' + char path_buf[PATH_MAX]; + ^ + ... + 8 errors generated. + +--- a/source/Host/common/FileSpec.cpp ++++ b/source/Host/common/FileSpec.cpp +@@ -9,6 +9,7 @@ + + #ifndef _WIN32 + #include ++#include + #else + #include "lldb/Host/windows/windows.h" + #endif -- cgit v1.2.3