Skip to content
Snippets Groups Projects
Commit 8178a8c6 authored by Olivier Benz's avatar Olivier Benz
Browse files

Update latest.Dockerfile

- Add patch for rts/RtsSymbols.c
parent 26b3b540
Branches
No related tags found
No related merge requests found
......@@ -3,6 +3,8 @@ ARG CABAL_VERSION_BUILD
FROM registry.gitlab.b-data.ch/ghc/ghc4pandoc:9.0.1 as bootstrap
COPY patches/* /tmp/
ENV GHC_VERSION=${GHC_VERSION_BUILD:-9.2.1}
ENV CABAL_VERSION=${CABAL_VERSION_BUILD:-3.6.0.0}
......@@ -31,6 +33,9 @@ RUN cd /tmp \
&& gpg --verify ghc-$GHC_VERSION-src.tar.xz.sig ghc-$GHC_VERSION-src.tar.xz \
&& tar xf ghc-$GHC_VERSION-src.tar.xz \
&& cd ghc-$GHC_VERSION \
# Apply patches
&& mv /tmp/*.patch . \
&& patch -p0 <ghc-9.2.1-RtsSymbols.patch \
# Use the LLVM backend
&& cp mk/build.mk.sample mk/build.mk \
&& echo 'BuildFlavour=perf-llvm' >> mk/build.mk \
......
--- rts/RtsSymbols.c 2021-10-28 22:41:34.000000000 +0200
+++ rts/RtsSymbols.c.patched 2021-12-01 17:04:02.000000000 +0100
@@ -33,6 +33,11 @@
#include <elf.h> /* _DYNAMIC */
#endif
+/* We must provide a prototype for environ since depending upon the libc
+ * version it may or may not be provided by unistd.h. See #20577.
+ */
+extern char **environ;
+
/* -----------------------------------------------------------------------------
* Symbols to be inserted into the RTS symbol table.
*/
@@ -60,7 +65,6 @@
SymI_HasProto(stg_sig_install) \
SymI_HasProto(rtsTimerSignal) \
SymI_HasProto_redirect(atexit, atexit, STRENGTH_STRONG) /* See Note [Strong symbols] */ \
- SymI_NeedsDataProto(environ) \
SymI_NeedsDataProto(nocldstop)
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment