Tue Feb 7 10:45:25 2023 UTC ()
ghc94: Fix build with SunOS ld.

Some part of ar(1) support for "@" is leaking into LdHasFilelist, which while
set to no is still being called with "@" and breaking the build.  Just disable
ar "@" support for now, this is a regression in 9.4.x.


(jperkin)
diff -r1.4 -r1.5 pkgsrc/lang/ghc94/Makefile

cvs diff -r1.4 -r1.5 pkgsrc/lang/ghc94/Makefile (expand / switch to unified diff)

--- pkgsrc/lang/ghc94/Makefile 2023/02/07 01:20:57 1.4
+++ pkgsrc/lang/ghc94/Makefile 2023/02/07 10:45:25 1.5
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: Makefile,v 1.4 2023/02/07 01:20:57 pho Exp $ 1# $NetBSD: Makefile,v 1.5 2023/02/07 10:45:25 jperkin Exp $
2# ----------------------------------------------------------------------------- 2# -----------------------------------------------------------------------------
3# Package metadata 3# Package metadata
4# 4#
5DISTNAME= ghc-9.4.4-src 5DISTNAME= ghc-9.4.4-src
6PKGNAME= ${DISTNAME:S/-src$//} 6PKGNAME= ${DISTNAME:S/-src$//}
7PKGREVISION= 2 7PKGREVISION= 2
8CATEGORIES= lang 8CATEGORIES= lang
9MASTER_SITES= https://downloads.haskell.org/~ghc/${PKGVERSION_NOREV}/ 9MASTER_SITES= https://downloads.haskell.org/~ghc/${PKGVERSION_NOREV}/
10EXTRACT_SUFX= .tar.xz 10EXTRACT_SUFX= .tar.xz
11 11
12MAINTAINER= pkgsrc-users@NetBSD.org 12MAINTAINER= pkgsrc-users@NetBSD.org
13HOMEPAGE= https://www.haskell.org/ghc/ 13HOMEPAGE= https://www.haskell.org/ghc/
14COMMENT= Compiler for the functional language Haskell - 9.4 Release Series 14COMMENT= Compiler for the functional language Haskell - 9.4 Release Series
@@ -72,26 +72,30 @@ CONFIGURE_ARGS.common+= \ @@ -72,26 +72,30 @@ CONFIGURE_ARGS.common+= \
72 --with-iconv-includes=${BUILDLINK_PREFIX.iconv}/${BUILDLINK_INCDIRS.iconv:Q} \ 72 --with-iconv-includes=${BUILDLINK_PREFIX.iconv}/${BUILDLINK_INCDIRS.iconv:Q} \
73 --with-iconv-libraries=${BUILDLINK_PREFIX.iconv}/${BUILDLINK_LIBDIRS.iconv:Q} \ 73 --with-iconv-libraries=${BUILDLINK_PREFIX.iconv}/${BUILDLINK_LIBDIRS.iconv:Q} \
74 --with-ffi-includes=${BUILDLINK_PREFIX.libffi}/${BUILDLINK_INCDIRS.libffi:Q} \ 74 --with-ffi-includes=${BUILDLINK_PREFIX.libffi}/${BUILDLINK_INCDIRS.libffi:Q} \
75 --with-ffi-libraries=${BUILDLINK_PREFIX.libffi}/${BUILDLINK_LIBDIRS.libffi:Q} 75 --with-ffi-libraries=${BUILDLINK_PREFIX.libffi}/${BUILDLINK_LIBDIRS.libffi:Q}
76 76
77.include "../../mk/bsd.prefs.mk" 77.include "../../mk/bsd.prefs.mk"
78 78
79# We must pass non-wrapper tools to ./configure because they will be 79# We must pass non-wrapper tools to ./configure because they will be
80# embedded in the compiler (actually ${WRKSRC}/settings). 80# embedded in the compiler (actually ${WRKSRC}/settings).
81CONFIGURE_ENV+= ac_cv_prog_fp_prog_ar=${AR:Q} 81CONFIGURE_ENV+= ac_cv_prog_fp_prog_ar=${AR:Q}
82CONFIGURE_ENV+= ac_cv_prog_LIBTOOL=libtool 82CONFIGURE_ENV+= ac_cv_prog_LIBTOOL=libtool
83CONFIGURE_ARGS.common+= LD=${LD:Q} 83CONFIGURE_ARGS.common+= LD=${LD:Q}
84 84
 85# While we use binutils ar which supports "@", this appears to be leaking
 86# somewhere into assuming that SunOS ld also supports "@" which it does not.
 87CONFIGURE_ENV.SunOS+= fp_cv_prog_ar_supports_atfile=no
 88
85# If there is HsColour in the PATH, GHC's build system tries to use it 89# If there is HsColour in the PATH, GHC's build system tries to use it
86# without checking if it really works. That's not what we appreciate. 90# without checking if it really works. That's not what we appreciate.
87CONFIGURE_ENV+= ac_cv_path_HSCOLOUR= 91CONFIGURE_ENV+= ac_cv_path_HSCOLOUR=
88 92
89CONFIGURE_ARGS+= ${CONFIGURE_ARGS.common} 93CONFIGURE_ARGS+= ${CONFIGURE_ARGS.common}
90CONFIGURE_ARGS+= --with-system-libffi 94CONFIGURE_ARGS+= --with-system-libffi
91 95
92# CFLAGS and LDFLAGS are currently not honored by "./configure". Since 96# CFLAGS and LDFLAGS are currently not honored by "./configure". Since
93# LDFLAGS contains rpath flags it's very important to force GHC to honor 97# LDFLAGS contains rpath flags it's very important to force GHC to honor
94# it. Otherwise neither GHC itself nor executables it produces will have 98# it. Otherwise neither GHC itself nor executables it produces will have
95# any rpaths so users will have to put "${PREFIX}/lib" into their 99# any rpaths so users will have to put "${PREFIX}/lib" into their
96# "/etc/ld-elf.so.conf". See 100# "/etc/ld-elf.so.conf". See
97# http://hackage.haskell.org/trac/ghc/ticket/2933 101# http://hackage.haskell.org/trac/ghc/ticket/2933