Skip to content
Snippets Groups Projects
Commit ede9c368 authored by Steve Lhomme's avatar Steve Lhomme Committed by Marvin Scholz
Browse files

vlc-debian-llvm-msvcrt: build breakpad

If we're going to make the LLVM builds the official one, we will need breakpad support.
parent 3b6a1d98
No related branches found
No related tags found
No related merge requests found
......@@ -16,7 +16,7 @@ RUN apt-get update -qq && mkdir -p /usr/share/man/man1 && \
automake yasm gettext autopoint vim ninja-build ant \
winbind flex ragel bison zip dos2unix p7zip-full gperf nsis nasm cmake \
python3 python3-venv python3-setuptools python3-mako locales meson help2man libltdl-dev \
ca-certificates curl default-jdk-headless gnupg procps && \
ca-certificates curl default-jdk-headless gnupg procps libcurl4-gnutls-dev && \
dpkg --add-architecture i386 && \
wget -nc -O /etc/apt/keyrings/winehq.asc https://dl.winehq.org/wine-builds/winehq.key && \
echo "deb [ signed-by=/etc/apt/keyrings/winehq.asc ] https://dl.winehq.org/wine-builds/debian/ bookworm main" > /etc/apt/sources.list.d/winehq.list && \
......@@ -37,7 +37,19 @@ ENV TOOLCHAIN_PREFIX=/opt/llvm-mingw
ARG CORES=4
RUN cd /build && \
COPY patches /patches
RUN cd /build/ && \
BREAKPAD_VERSION=0.1.4 && \
BREAKPAD_SHA256=020953390cce3a04ba859801bf863689a74e2aca0bd48ff256055f1c9af0e33a && \
wget -q https://download.videolan.org/pub/contrib/breakpad/breakpad-$BREAKPAD_VERSION.tar.gz && \
echo $BREAKPAD_SHA256 breakpad-$BREAKPAD_VERSION.tar.gz | sha256sum -c && \
tar xzf breakpad-$BREAKPAD_VERSION.tar.gz && \
cd breakpad-$BREAKPAD_VERSION && patch -p1 < /patches/0001-Fix-for-non-constant-SIGSTKSZ.patch && patch -p1 < /patches/0001-Fix-compilation-with-recent-gcc.patch && \
autoreconf -vif && mkdir build && cd build && \
../configure --enable-tools --disable-processor --prefix=/opt/breakpad && \
make -j$CORES && make install && \
cd /build && \
PROTOBUF_VERSION=3.4.1 && \
PROTOBUF_SHA256=2bb34b4a8211a30d12ef29fd8660995023d119c99fbab2e5fe46f17528c9cc78 && \
wget -q https://github.com/google/protobuf/releases/download/v$PROTOBUF_VERSION/protobuf-cpp-$PROTOBUF_VERSION.tar.gz && \
......
From 7e24569a63d552740140ce80bcb89baf8c92401b Mon Sep 17 00:00:00 2001
From: Steve Lhomme <robux4@ycbcr.xyz>
Date: Tue, 29 Nov 2022 12:53:18 +0100
Subject: [PATCH] Fix compilation with recent gcc
In recent C++ compiler using the proper header is enforced. This is the
compilation error it fixes:
../src/common/linux/guid_creator.cc: In static member function 'static void GUIDGenerator::CreateGuidFromArc4Random(GUID*)':
../src/common/linux/guid_creator.cc:112:7: error: 'memcpy' was not declared in this scope
112 | memcpy(buf + i, &random_data, sizeof(uint32_t));
| ^~~~~~
../src/common/linux/guid_creator.cc:48:1: note: 'memcpy' is defined in header '<cstring>'; did you forget to '#include <cstring>'?
47 | #include <sys/random.h>
+++ |+#include <cstring>
48 | #endif
make: *** [Makefile:5701: src/common/linux/guid_creator.o] Error 1
---
src/common/linux/guid_creator.cc | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/common/linux/guid_creator.cc b/src/common/linux/guid_creator.cc
index f81c2911..09b64926 100644
--- a/src/common/linux/guid_creator.cc
+++ b/src/common/linux/guid_creator.cc
@@ -42,6 +42,7 @@
#include <sys/stat.h>
#include <time.h>
#include <unistd.h>
+#include <cstring>
#if defined(HAVE_SYS_RANDOM_H)
#include <sys/random.h>
--
2.37.3.windows.1
From 70f201a418a90cb6e0af87b33467f13884ef836a Mon Sep 17 00:00:00 2001
From: David Faure <david.faure@kdab.com>
Date: Wed, 15 Dec 2021 21:26:40 +0100
Subject: [PATCH] Fix for non-constant SIGSTKSZ
On glibc > 2.33, `SIGSTKSZ` might not be constant (in which case
it expands to a call to `sysconf` which returns a `long int`); see
https://sourceware.org/pipermail/libc-alpha/2020-October/118513.html
Pass unsigned explicitly to std::max, to avoid relying on template
argument deduction. This works both with the old-style constant
`SIGSTKSZ` and the new configurable one.
Initially based on https://chromium-review.googlesource.com/c/2776379
Change-Id: I9fc95337f973e871b84735ce822b5e11ba73ea8c
Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/3340721
Reviewed-by: Mark Mentovai <mark@chromium.org>
---
src/client/linux/handler/exception_handler.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/client/linux/handler/exception_handler.cc b/src/client/linux/handler/exception_handler.cc
index a41e8c58..c9ab9e0f 100644
--- a/src/client/linux/handler/exception_handler.cc
+++ b/src/client/linux/handler/exception_handler.cc
@@ -138,7 +138,7 @@ void InstallAlternateStackLocked() {
// SIGSTKSZ may be too small to prevent the signal handlers from overrunning
// the alternative stack. Ensure that the size of the alternative stack is
// large enough.
- static const unsigned kSigStackSize = std::max(16384, SIGSTKSZ);
+ const unsigned kSigStackSize = std::max<unsigned>(16384, SIGSTKSZ);
// Only set an alternative stack if there isn't already one, or if the current
// one is too small.
--
2.37.3.windows.1
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment