mirror of
https://github.com/linuxkit/linuxkit.git
synced 2026-04-25 05:17:59 +00:00
ebpf: fix ebpf compile error
Some/most of the samples/tools throw and error, e.g.: LLVM ERROR: Cannot select: 0x56049b79dcb0: ch,glue = BPFISD::CALL 0x56049a93ad60, TargetExternalSymbol:i64'__stack_chk_fail' 0x56049b391500: i64 = TargetExternalSymbol'__stack_chk_fail' In function: waker bcc-stack-protector.patch adds -fno-stack-protector to the CFLAGS which fixes this error. Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
This commit is contained in:
@@ -6,7 +6,7 @@ COPY cdefs.h /usr/include/sys/
|
||||
ADD kernel-headers.tar /
|
||||
ADD kernel-dev.tar /
|
||||
ADD kernel-modules.tar /
|
||||
ADD 100-musl-compat.patch decl.patch intl.patch bcc-gnuism.patch ./
|
||||
ADD 100-musl-compat.patch decl.patch intl.patch bcc-gnuism.patch bcc-stack-protector.patch ./
|
||||
RUN cat elfutils-$ELFUTILS_VERSION.tar.bz2 | tar xjf -
|
||||
RUN cd elfutils-$ELFUTILS_VERSION && \
|
||||
patch -p1 < ../100-musl-compat.patch && \
|
||||
@@ -15,7 +15,7 @@ RUN cd elfutils-$ELFUTILS_VERSION && \
|
||||
automake && \
|
||||
./configure --prefix=/usr CFLAGS=-Wno-strict-aliasing && \
|
||||
make -C libelf && make -C libelf install
|
||||
RUN cd bcc && patch -p0 < ../bcc-gnuism.patch
|
||||
RUN cd bcc && patch -p0 < ../bcc-gnuism.patch && patch -p0 < ../bcc-stack-protector.patch
|
||||
RUN mkdir -p bcc/build && cd bcc/build && \
|
||||
cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DLUAJIT_INCLUDE_DIR=/usr/include/luajit-2.1 && \
|
||||
make && \
|
||||
|
||||
Reference in New Issue
Block a user