Hi,

On Mon, Feb 27, 2017 at 09:06:22PM +0100, Jeremie Courreges-Anglas wrote:
> TODO
> ====
[...]
> >> lang/ghc

This one is weird. It has "autodetection", but just setting CC="${CC}"
doesn't work, so I've added --with-ghc="${CC}", which seems to work
(with /usr/bin/gcc and /usr/bin/g++ removed). For the switch to
clang, I also added --with-clang="${CC}", but I've no idea wether
this will work or not.

Anyway, when my ghc build finishes sucessfully, I'll put the diff
below in.

Ciao,
        Kili

Index: Makefile
===================================================================
RCS file: /cvs/ports/lang/ghc/Makefile,v
retrieving revision 1.143
diff -u -p -r1.143 Makefile
--- Makefile    1 Nov 2016 18:14:05 -0000       1.143
+++ Makefile    27 Feb 2017 22:42:12 -0000
@@ -106,7 +106,9 @@ CFLAGS +=           -fno-pie
 
 CONFIGURE_STYLE =      gnu
 CONFIGURE_ARGS +=      --with-iconv-includes=${LOCALBASE}/include \
-                       --with-iconv-libraries=${LOCALBASE}/lib
+                       --with-iconv-libraries=${LOCALBASE}/lib \
+                       --with-gcc="${CC}" \
+                       --with-clang="${CC}"
 # XXX: wxneeded is a hack. Fix rts/Linker.c, mmapForLinker() and
 #      loadObj_() instead.
 CONFIGURE_ENV +=       CONF_CC_OPTS_STAGE0="-fno-pie -nopie" \
@@ -161,7 +163,9 @@ post-patch:
 # - Install a precompiled binary.
        cd ${WRKDIR}/ghc-${BIN_VER} && \
        LD_LIBRARY_PATH=${BOOTSTRAP_SHLIBS} \
-       ./configure --prefix=${WRKDIR}/bootstrap && \
+       ./configure --prefix=${WRKDIR}/bootstrap \
+           --with-gcc="${CC}" \
+           --with-clang="${CC}" && \
        LD_LIBRARY_PATH=${BOOTSTRAP_SHLIBS} \
        ${MAKE_PROGRAM} install
        rm -rf ${WRKDIR}/ghc-${BIN_VER}

Reply via email to