pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/lang/ghc90



Module Name:    pkgsrc
Committed By:   pho
Date:           Sat May  1 09:04:57 UTC 2021

Modified Files:
        pkgsrc/lang/ghc90: Makefile distinfo
Added Files:
        pkgsrc/lang/ghc90/patches: patch-compiler_GHC_Driver_Pipeline.hs
            patch-compiler_GHC_SysTools_Process.hs

Log Message:
Don't use "response file" while invoking CC and LD

Our tool wrappers don't look into response files, so common mistakes
such as forgetting to declare dependencies have been overlooked by
our buildlink framework. With the change that will no longer happen.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 pkgsrc/lang/ghc90/Makefile \
    pkgsrc/lang/ghc90/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/lang/ghc90/patches/patch-compiler_GHC_Driver_Pipeline.hs \
    pkgsrc/lang/ghc90/patches/patch-compiler_GHC_SysTools_Process.hs

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/lang/ghc90/Makefile
diff -u pkgsrc/lang/ghc90/Makefile:1.11 pkgsrc/lang/ghc90/Makefile:1.12
--- pkgsrc/lang/ghc90/Makefile:1.11     Fri Apr 30 03:05:30 2021
+++ pkgsrc/lang/ghc90/Makefile  Sat May  1 09:04:57 2021
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.11 2021/04/30 03:05:30 pho Exp $
+# $NetBSD: Makefile,v 1.12 2021/05/01 09:04:57 pho Exp $
 # -----------------------------------------------------------------------------
 # Package metadata
 #
 DISTNAME=      ghc-9.0.1-src
-PKGREVISION=   3
+PKGREVISION=   4
 PKGNAME=       ${DISTNAME:S/-src$//}
 CATEGORIES=    lang
 MASTER_SITES=  https://downloads.haskell.org/~ghc/${PKGVERSION_NOREV}/
Index: pkgsrc/lang/ghc90/distinfo
diff -u pkgsrc/lang/ghc90/distinfo:1.11 pkgsrc/lang/ghc90/distinfo:1.12
--- pkgsrc/lang/ghc90/distinfo:1.11     Fri Apr 30 15:14:30 2021
+++ pkgsrc/lang/ghc90/distinfo  Sat May  1 09:04:57 2021
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.11 2021/04/30 15:14:30 pho Exp $
+$NetBSD: distinfo,v 1.12 2021/05/01 09:04:57 pho Exp $
 
 SHA1 (ghc-8.10.4-boot-x86_64-unknown-netbsd.tar.xz) = 3ff01d768393b3866e7a7543f9f55646aaffce7a
 RMD160 (ghc-8.10.4-boot-x86_64-unknown-netbsd.tar.xz) = 39bf10b13054a6316c8477609fb98abe4277fa6c
@@ -29,24 +29,26 @@ RMD160 (netbsd-9.0-amd64-libterminfo.tar
 SHA512 (netbsd-9.0-amd64-libterminfo.tar.gz) = 79288d44b84df8848afc2cdfee628cc4fd1ec0334159403ef8ba994d617bc56a7114af3031198afb5f3b8f45c0463a848099431e32bc6725042908576b6f95b8
 Size (netbsd-9.0-amd64-libterminfo.tar.gz) = 27744 bytes
 SHA1 (patch-aclocal.m4) = 66d27cc50de048beeebee31302107501d5802388
+SHA1 (patch-compiler_GHC_Driver_Pipeline.hs) = cc2c53f14420b8b75bd70b73e2c95bb52a10cd0c
+SHA1 (patch-compiler_GHC_SysTools_Process.hs) = 36d7171e571d56c4e6ae1ed99d2851c0b0dac084
 SHA1 (patch-configure.ac) = 0905a0e5358d8c3f3f8366b597a59dd824f294d8
 SHA1 (patch-ghc.mk) = fdcbc5b0c48b616eb96868e49681536d773eaddd
-SHA1 (patch-libraries_base_configure) = f06a961a6507f635aafe50dab3ff4396c012bdec
+SHA1 (patch-libraries_Cabal_Cabal_Distribution_Simple_GHC.hs) = a4c82b1282c0580a7945be8c3b9d38bc760db99f
 SHA1 (patch-libraries_base_GHC_Event_KQueue.hsc) = 8ee5da667a241a05fde3c580d3dc9bdc05aa5f00
 SHA1 (patch-libraries_base_System_CPUTime_Posix_Times.hsc) = 2bfb779d534d12073287274ce5e90b99e457a860
 SHA1 (patch-libraries_base_System_Environment.hs) = 7d79a91f295915b4408d5f41d5405739d7189215
-SHA1 (patch-libraries_Cabal_Cabal_Distribution_Simple_GHC.hs) = a4c82b1282c0580a7945be8c3b9d38bc760db99f
+SHA1 (patch-libraries_base_configure) = f06a961a6507f635aafe50dab3ff4396c012bdec
 SHA1 (patch-libraries_time_lib_Data_Time_Clock_Internal_CTimespec.hsc) = 588270767f8a9cbde0648fc99807891fef65d721
 SHA1 (patch-libraries_time_lib_Data_Time_Clock_Internal_CTimeval.hs) = b2811ec4a845e6b2b44414e940b6108178b597c5
-SHA1 (patch-libraries_unix_include_execvpe.h) = 67dd9720a71a6a55bbe2b50e61621ca60187ef00
-SHA1 (patch-libraries_unix_System_Posix_Env_ByteString.hsc) = 3f675fc5d6bf5cc59a2d5ccffeb9ccd51521645a
 SHA1 (patch-libraries_unix_System_Posix_Env.hsc) = e94936c139ca15d45cac4a7feb74a601567913ab
+SHA1 (patch-libraries_unix_System_Posix_Env_ByteString.hsc) = 3f675fc5d6bf5cc59a2d5ccffeb9ccd51521645a
 SHA1 (patch-libraries_unix_System_Posix_Files_Common.hsc) = 6efef280832d376915a8987e4e8aac283408f607
 SHA1 (patch-libraries_unix_System_Posix_Signals.hsc) = 49215dce493a6bbc440f91a3959e592f86fc779b
+SHA1 (patch-libraries_unix_include_execvpe.h) = 67dd9720a71a6a55bbe2b50e61621ca60187ef00
+SHA1 (patch-rts_ProfHeap.c) = 38b0623effbe46e04b98fb221591b4ec329a1b37
 SHA1 (patch-rts_ghc.mk) = 6e3daf71fb7e656131aa2aeeb0346c651520216a
 SHA1 (patch-rts_posix_GetTime.c) = a0e94043a270697f3754c8e97461fbee36ca78ed
 SHA1 (patch-rts_posix_OSThreads.c) = d5873aad8836067b5f29b37250666e37db67a4be
-SHA1 (patch-rts_ProfHeap.c) = 38b0623effbe46e04b98fb221591b4ec329a1b37
 SHA1 (patch-rules_build-package-way.mk) = ec73df0bbc85e962f76a9068683879a1a1ba1815
 SHA1 (patch-rules_distdir-way-opts.mk) = a058c6428faf02ef94aab3336d2d2874f2726f4e
 SHA1 (patch-utils_haddock_driver_Main.hs) = 26b015d3aef9fdff66e66c8e3d9a370a2dbd7067

Added files:

Index: pkgsrc/lang/ghc90/patches/patch-compiler_GHC_Driver_Pipeline.hs
diff -u /dev/null pkgsrc/lang/ghc90/patches/patch-compiler_GHC_Driver_Pipeline.hs:1.1
--- /dev/null   Sat May  1 09:04:57 2021
+++ pkgsrc/lang/ghc90/patches/patch-compiler_GHC_Driver_Pipeline.hs     Sat May  1 09:04:57 2021
@@ -0,0 +1,19 @@
+$NetBSD: patch-compiler_GHC_Driver_Pipeline.hs,v 1.1 2021/05/01 09:04:57 pho Exp $
+
+Do not use -Xpreprocessor to pass options to CPP. Our tool wrappers
+may remove some of them, and if that happens an unpaired
+-Xpreprocessor will be left behind and confuses CC.
+
+--- compiler/GHC/Driver/Pipeline.hs.orig       2021-05-01 06:52:42.897138372 +0000
++++ compiler/GHC/Driver/Pipeline.hs
+@@ -1293,8 +1293,8 @@ runPhase (RealPhase cc_phase) input_fn d
+         -- (#16737). Doing it in this way is simpler and also enable the C
+         -- compiler to perform preprocessing and parsing in a single pass,
+         -- but it may introduce inconsistency if a different pgm_P is specified.
+-        let more_preprocessor_opts = concat
+-              [ ["-Xpreprocessor", i]
++        let more_preprocessor_opts =
++              [ i
+               | not hcc
+               , i <- getOpts dflags opt_P
+               ]
Index: pkgsrc/lang/ghc90/patches/patch-compiler_GHC_SysTools_Process.hs
diff -u /dev/null pkgsrc/lang/ghc90/patches/patch-compiler_GHC_SysTools_Process.hs:1.1
--- /dev/null   Sat May  1 09:04:57 2021
+++ pkgsrc/lang/ghc90/patches/patch-compiler_GHC_SysTools_Process.hs    Sat May  1 09:04:57 2021
@@ -0,0 +1,45 @@
+$NetBSD: patch-compiler_GHC_SysTools_Process.hs,v 1.1 2021/05/01 09:04:57 pho Exp $
+
+This is more like pkgsrc-specific than an upstream issue. Unless we
+are on Windows, don't use "response file", the @FILE syntax while
+invoking CC or LD. Our tool wrappers don't look into response files,
+and therefore can't detect mistakes like depending on Cabal packages
+that aren't declared as pkgsrc dependency.
+
+The reason why GHC does it is due to some limitation on the length of
+argv on Windows. So maybe the patch is worth sending to the upstream.
+
+Note that this patch would break the package if we didn't have its
+$ORIGIN use eliminated because our wrappers hate relative rpaths.
+
+--- compiler/GHC/SysTools/Process.hs.orig      2021-05-01 04:49:05.262346202 +0000
++++ compiler/GHC/SysTools/Process.hs
+@@ -30,7 +30,9 @@ import System.IO
+ import System.IO.Error as IO
+ import System.Process
+ 
++#if defined(mingw32_HOST_OS)
+ import GHC.SysTools.FileCleanup
++#endif
+ 
+ -- | Enable process jobs support on Windows if it can be expected to work (e.g.
+ -- @process >= 1.6.9.0@).
+@@ -141,6 +143,7 @@ runSomethingResponseFile
+   :: DynFlags -> (String->String) -> String -> String -> [Option]
+   -> Maybe [(String,String)] -> IO ()
+ 
++#if defined(mingw32_HOST_OS)
+ runSomethingResponseFile dflags filter_fn phase_name pgm args mb_env =
+     runSomethingWith dflags phase_name pgm args $ \real_args -> do
+         fp <- getResponseFile real_args
+@@ -183,6 +186,10 @@ runSomethingResponseFile dflags filter_f
+             x
+         , "\""
+         ]
++#else
++runSomethingResponseFile dflags filter_fn phase_name pgm args mb_env =
++    runSomethingFiltered dflags filter_fn phase_name pgm args Nothing mb_env
++#endif
+ 
+ runSomethingFiltered
+   :: DynFlags -> (String->String) -> String -> String -> [Option]



Home | Main Index | Thread Index | Old Index