[Git][ghc/ghc][wip/ghc-9.4.5-backports] 4 commits: darwin ci: Explicitly pass desired build triple to configure

Zubin (@wz1000) gitlab at gitlab.haskell.org
Sat Apr 15 11:42:34 UTC 2023



Zubin pushed to branch wip/ghc-9.4.5-backports at Glasgow Haskell Compiler / GHC


Commits:
8b5d4df0 by Matthew Pickering at 2023-04-15T17:12:01+05:30
darwin ci: Explicitly pass desired build triple to configure

On the zw3rk machines for some reason the build machine was inferred to
be arm64. Setting the build triple appropiately resolve this confusion
and we produce x86 binaries.

- - - - -
8608657c by Matthew Pickering at 2023-04-15T17:12:01+05:30
Store bootstrap_llvm_target and use it to set LlvmTarget in bindists

This mirrors some existing logic for the bootstrap_target which
influences how TargetPlatform is set.

As described on #21970 not storing this led to `LlvmTarget` being set incorrectly
and hence the wrong `--target` flag being passed to the C compiler.

Towards #21970

(cherry picked from commit 64286132cc0db4e227637887f98f5a3ecf7d326a)
(cherry picked from commit 48a9e688331fbc2ac91392c654bb7457c5f8a876)

- - - - -
768caef1 by Matthew Pickering at 2023-04-15T17:12:02+05:30
Check for FP_LD_NO_FIXUP_CHAINS in installation configure script

Otherwise, when installing from a bindist the C flag isn't passed to the
C compiler.

This completes the fix for #22429

(cherry picked from commit 926cd4ee097106cf9c6d1ae1fc32375e7fc45ff2)

- - - - -
403470cf by Zubin Duggal at 2023-04-15T17:12:02+05:30
Prepare release 9.4.5

Metric Decrease:
  T13035
  T15164
  T1969
  T9961
  WWRec
  T12707
  T13379

Metric Increase:
  T17123

- - - - -


8 changed files:

- .gitlab/darwin/toolchain.nix
- configure.ac
- distrib/configure.ac.in
- + docs/users_guide/9.4.5-notes.rst
- docs/users_guide/release-notes.rst
- libraries/base/changelog.md
- m4/ghc_llvm_target.m4
- testsuite/tests/rts/all.T


Changes:

=====================================
.gitlab/darwin/toolchain.nix
=====================================
@@ -98,6 +98,6 @@ pkgs.writeTextFile {
     export CABAL="$CABAL_INSTALL"
 
     sdk_path="$(xcrun --sdk macosx --show-sdk-path)"
-    export CONFIGURE_ARGS="$CONFIGURE_ARGS --with-ffi-libraries=$sdk_path/usr/lib --with-ffi-includes=$sdk_path/usr/include/ffi"
+    export CONFIGURE_ARGS="$CONFIGURE_ARGS --with-ffi-libraries=$sdk_path/usr/lib --with-ffi-includes=$sdk_path/usr/include/ffi --build=${targetTriple}"
   '';
 }


=====================================
configure.ac
=====================================
@@ -13,7 +13,7 @@ dnl
 # see what flags are available. (Better yet, read the documentation!)
 #
 
-AC_INIT([The Glorious Glasgow Haskell Compilation System], [9.4.4], [glasgow-haskell-bugs at haskell.org], [ghc-AC_PACKAGE_VERSION])
+AC_INIT([The Glorious Glasgow Haskell Compilation System], [9.4.5], [glasgow-haskell-bugs at haskell.org], [ghc-AC_PACKAGE_VERSION])
     # Version on master must be X.Y (not X.Y.Z) for ProjectVersionMunged variable
     # to be useful (cf #19058). However, the version must have three components
     # (X.Y.Z) on stable branches (e.g. ghc-9.2) to ensure that pre-releases are
@@ -22,7 +22,7 @@ AC_INIT([The Glorious Glasgow Haskell Compilation System], [9.4.4], [glasgow-has
 AC_CONFIG_MACRO_DIRS([m4])
 
 # Set this to YES for a released version, otherwise NO
-: ${RELEASE=NO}
+: ${RELEASE=YES}
 
 # The primary version (e.g. 7.5, 7.4.1) is set in the AC_INIT line
 # above.  If this is not a released version, then we will append the
@@ -694,6 +694,8 @@ GHC_LLVM_TARGET_SET_VAR
 # we intend to pass trough --targets to llvm as is.
 LLVMTarget_CPP=`    echo "$LlvmTarget"`
 AC_SUBST(LLVMTarget_CPP)
+# The target is substituted into the distrib/configure.ac file
+AC_SUBST(LlvmTarget)
 
 dnl ** See whether cc supports --target=<triple> and set
 dnl CONF_CC_OPTS_STAGE[012] accordingly.


=====================================
distrib/configure.ac.in
=====================================
@@ -18,6 +18,8 @@ dnl--------------------------------------------------------------------
 dnl Various things from the source distribution configure
 bootstrap_target=@TargetPlatform@
 
+bootstrap_llvm_target=@LlvmTarget@
+
 TargetHasRTSLinker=@TargetHasRTSLinker@
 AC_SUBST(TargetHasRTSLinker)
 
@@ -165,6 +167,11 @@ FPTOOLS_SET_C_LD_FLAGS([target],[CONF_CC_OPTS_STAGE1],[CONF_GCC_LINKER_OPTS_STAG
 # Stage 3 won't be supported by cross-compilation
 FPTOOLS_SET_C_LD_FLAGS([target],[CONF_CC_OPTS_STAGE2],[CONF_GCC_LINKER_OPTS_STAGE2],[CONF_LD_LINKER_OPTS_STAGE2],[CONF_CPP_OPTS_STAGE2])
 
+FP_LD_NO_FIXUP_CHAINS([target], [LDFLAGS])
+FP_LD_NO_FIXUP_CHAINS([build], [CONF_GCC_LINKER_OPTS_STAGE0])
+FP_LD_NO_FIXUP_CHAINS([target], [CONF_GCC_LINKER_OPTS_STAGE1])
+FP_LD_NO_FIXUP_CHAINS([target], [CONF_GCC_LINKER_OPTS_STAGE2])
+
 AC_SUBST(CONF_CC_OPTS_STAGE0)
 AC_SUBST(CONF_CC_OPTS_STAGE1)
 AC_SUBST(CONF_CC_OPTS_STAGE2)


=====================================
docs/users_guide/9.4.5-notes.rst
=====================================
@@ -0,0 +1,220 @@
+.. _release-9-4-5:
+
+Version 9.4.5
+==============
+
+The significant changes to the various parts of the compiler are listed in the
+following sections.
+
+The :ghc-flag:`LLVM backend <-fllvm>` of this release is to be used with LLVM
+10, 11, 12, 13, or 14.
+
+Significant Changes
+~~~~~~~~~~~~~~~~~~~~
+
+Issues fixed in this release include:
+
+Compiler
+--------
+
+- Fix a compiler bug where programs using Template Haskell involving Constant
+  Applicative forms could be garbage collected too early (:ghc-ticket:`22417`).
+
+- Fix a shadowing related bug in the occurence analysis phase of the simplifier
+  (:ghc-ticket:`22623`).
+
+- Fix a regression in the typechecker where certain typeclass instances
+  involving type and data familes would fail to resolve (:ghc-ticket:`22647`,
+  :ghc-ticket:`23134`).
+
+- Fix a regression in the constrain solver which resulted in a loop when trying
+  to expand superclasses (:ghc-ticket:`22516`).
+
+- Fix the linker warning about chained fixups on Darwin platforms for programs
+  compiled with GHC (:ghc-ticket:`22429`).
+
+- Fix a compiler panic in the demand analyser due to a bug involving shadowing
+  (:ghc-ticket:`22718`).
+
+- Fix a driver bug where certain non-fatal Safe Haskell related warnings were
+  being marked as fatal (:ghc-ticket:`22728`).
+
+- Fix a bug to do with missing parenthesis while printing splices with
+  ``-ddump-splices`` (:ghc-ticket:`22784`).
+
+- Fix a bug with the graph-colouring register allocater leading to compiler
+  panics when compiling with ``-fregs-graph`` (:ghc-ticket:`22798`, 
+ :ghc-ticket:`23002`).
+
+- Fix a bug to do with code emitted on Darwin platforms using
+  relocations not supported on the platform (:ghc-ticket:`21972`).
+
+- Improve performance for code generated by the native code generator on
+  x86 for programs involving atomic counters (:ghc-ticket:`22764`).
+
+- Fix core lint errors arising from incorrect scoping of type variables
+  within ``SPECIALISE`` pragmas occuring in ``instance`` definitions
+  (:ghc-ticket:`22913`).
+
+- Fix core lint errors arising from an incorrect type given to the
+  ``decodeDouble_Int64`` rule (:ghc-ticket:`23019`).
+
+- Improve code generation for bitmasks on AArch64 with the native code
+  generator (:ghc-ticket:`23030`).
+
+- Many improvements to recompilation checking with multiple home units
+  (:ghc-ticket:`22675`, :ghc-ticket:`22677`, :ghc-ticket:`22669`, :ghc-ticket:`22678`,
+   :ghc-ticket:`22679`, :ghc-ticket:`22680`).
+
+- Fix a spurious warning with ``-Wmissing-home-modules`` (:ghc-ticket:`22676`).
+
+- Fix a typechecker panic on certain programs involving representation polymorphism
+  (:ghc-ticket:`22743`). 
+
+- Fix bugs to do with GHCi and compiler loops pariticularly when using ``-dppr-debug``
+  (:ghc-ticket:`22695`).
+
+- Fix memory leak in the compiler and in GHCi, including a bug where old
+  environments would persist on reloading (:ghc-ticket:`22530`, :ghc-ticket:`22833`).
+
+- Fix a miscompilation due to a simplifier bug (:ghc-ticket:`23184`).
+
+- Fix a miscompilation to do with unlifted bindings due to a bug in the specialiser
+  (:ghc-ticket:`22998`).
+
+- Fix a compiler panic during the "Float In" optimsation pass due to improper
+  handling of shadowing (:ghc-ticket:`22662`).
+
+- Fix a compiler panic when compiling certain programs involving representation
+  polymoprhism with optimisation (:ghc-ticet:`22725`).
+
+Runtime system
+--------------
+
+- Fix a GC bug where a race condition in the parallel GC could cause it to
+  garbage collect live sparks (:ghc-ticket:`22528`).
+
+- Truncate eventlog events with a large payload (:ghc-ticket:`20221`).
+
+- Fix a bug with the alignment of RTS data structures that could result in
+  segfaults when compiled with high optimisation settings on certain platforms
+  (:ghc-ticket:`22975` , :ghc-ticket:`22965`).
+
+- Take section alignment into account in the RTS linker (:ghc-ticket:`23066`).
+
+- Fix a bug causing segfaults where certain sections of the RTS would assume
+  that the number of capabilites was equal to the number passed via the command
+  line, even though the number of capabilites can be dynamically changed
+  (:ghc-ticket:`23088`).
+
+- Fix a race with the nonmoving GC (:ghc-ticket:`23170`).
+
+- A bug in the nonmoving garbage collector regarding the treatment of
+  zero-length ``SmallArray#``\ s has been fixed (:ghc-ticket:`22264`).
+
+- A number of bugs regarding the non-moving garbage collector's treatment of
+  ``Weak#`` pointers have been fixed (:ghc-ticket:`22327`).
+
+- A few race conditions between the non-moving collector and
+  ``setNumCapabilities`` which could result in undefined behavior have been
+  fixed (:ghc-ticket:`22926`, :ghc-ticket:`22927`).
+
+- The non-moving collector is now able to better schedule marking work during
+  the post-mark synchronization phase of collection, significantly reducing
+  pause times in some workloads (:ghc-ticket:`22929`).
+
+- Various bugs in the non-moving collector's implementation of the selector
+  optimisation have been fixed (:ghc-ticket:`22930`).
+
+- Accounting for live bytes is now performed accurately when using the
+  non-moving GC (:ghc-ticket:`17574`).
+
+- Allow performing memory inventory with the non-moving GC (:ghc-ticket:`21840`).
+
+Build system and packaging
+--------------------------
+
+- Bump ``gmp-tarballs`` to a version which doesn't use the reserved ``x18``
+  register on AArch64/Darwin systems, and also has fixes for CVE-2021-43618
+  (:ghc-ticket:`22497`, :ghc-ticket:`22789`).
+
+- Remove quarantine attribute when installing binary distribution on MacOS
+  (:ghc-ticket:`21506`, :ghc-ticket:`23009`).
+
+- Fail in the binary distribution ``configure`` script if ``find`` is not
+  available (:ghc-ticket:`22691`).
+
+- Install manpages with the binary distribution (:ghc-ticket:`22371`).
+
+- Fix a bug to do with merging of archives causing GHC to fail to bootstrap
+  on Windows (:ghc-ticket:`21990`).
+
+- Hadrian bug fixes to do with building a Windows cross compiler
+  (:ghc-ticket:`20697`, :ghc-ticket:`22805`).
+
+- Fix escaping of ``$tooldir`` in the ``configure`` script (:ghc-ticket:`22561`).
+
+- Allow LLVM 14 and use it for the Windows toolchain (:ghc-ticket:`21964`).
+
+Core libraries
+--------------
+
+- Bump ``base`` to 4.17.1.0
+
+- base: Remove ``mingwex`` dependency on Windows (:ghc-ticket:`22166`).
+
+- base: Fix inconsistency with decoding terminal input on Windows (:ghc-ticket:`21488`).
+
+- Bump ``bytestring`` to 0.11.4.0
+
+- Bump``parsec`` to 3.1.16.1
+
+- Bump ``text`` to 2.0.2
+
+- Bump ``containers`` to 0.6.7
+
+Included libraries
+------------------
+
+The package database provided with this distribution also contains a number of
+packages other than GHC itself. See the changelogs provided with these packages
+for further change information.
+
+.. ghc-package-list::
+
+    libraries/array/array.cabal:             Dependency of ``ghc`` library
+    libraries/base/base.cabal:               Core library
+    libraries/binary/binary.cabal:           Dependency of ``ghc`` library
+    libraries/bytestring/bytestring.cabal:   Dependency of ``ghc`` library
+    libraries/Cabal/Cabal/Cabal.cabal:       Dependency of ``ghc-pkg`` utility
+    libraries/Cabal/Cabal-syntax/Cabal-syntax.cabal:  Dependency of ``ghc-pkg`` utility
+    libraries/containers/containers/containers.cabal: Dependency of ``ghc`` library
+    libraries/deepseq/deepseq.cabal:         Dependency of ``ghc`` library
+    libraries/directory/directory.cabal:     Dependency of ``ghc`` library
+    libraries/exceptions/exceptions.cabal:   Dependency of ``ghc`` and ``haskeline`` library
+    libraries/filepath/filepath.cabal:       Dependency of ``ghc`` library
+    compiler/ghc.cabal:                      The compiler itself
+    libraries/ghci/ghci.cabal:               The REPL interface
+    libraries/ghc-boot/ghc-boot.cabal:       Internal compiler library
+    libraries/ghc-boot-th/ghc-boot-th.cabal: Internal compiler library
+    libraries/ghc-compact/ghc-compact.cabal: Core library
+    libraries/ghc-heap/ghc-heap.cabal:       GHC heap-walking library
+    libraries/ghc-prim/ghc-prim.cabal:       Core library
+    libraries/haskeline/haskeline.cabal:     Dependency of ``ghci`` executable
+    libraries/hpc/hpc.cabal:                 Dependency of ``hpc`` executable
+    libraries/integer-gmp/integer-gmp.cabal: Core library
+    libraries/libiserv/libiserv.cabal:       Internal compiler library
+    libraries/mtl/mtl.cabal:                 Dependency of ``Cabal`` library
+    libraries/parsec/parsec.cabal:           Dependency of ``Cabal`` library
+    libraries/pretty/pretty.cabal:           Dependency of ``ghc`` library
+    libraries/process/process.cabal:         Dependency of ``ghc`` library
+    libraries/stm/stm.cabal:                 Dependency of ``haskeline`` library
+    libraries/template-haskell/template-haskell.cabal: Core library
+    libraries/terminfo/terminfo.cabal:       Dependency of ``haskeline`` library
+    libraries/text/text.cabal:               Dependency of ``Cabal`` library
+    libraries/time/time.cabal:               Dependency of ``ghc`` library
+    libraries/transformers/transformers.cabal: Dependency of ``ghc`` library
+    libraries/unix/unix.cabal:               Dependency of ``ghc`` library
+    libraries/Win32/Win32.cabal:             Dependency of ``ghc`` library
+    libraries/xhtml/xhtml.cabal:             Dependency of ``haddock`` executable
+


=====================================
docs/users_guide/release-notes.rst
=====================================
@@ -4,6 +4,7 @@ Release notes
 .. toctree::
    :maxdepth: 1
 
+   9.4.5-notes
    9.4.4-notes
    9.4.3-notes
    9.4.2-notes


=====================================
libraries/base/changelog.md
=====================================
@@ -4,7 +4,7 @@
 
    * Remove `mingwex` dependency on Windows (#22166).
 
-   * Fix inconcistency with decoding terminal input on Windows (#21488).
+   * Fix inconsistency with decoding terminal input on Windows (#21488).
 
 ## 4.17.0.0 *August 2022*
 


=====================================
m4/ghc_llvm_target.m4
=====================================
@@ -50,5 +50,10 @@ AC_DEFUN([GHC_LLVM_TARGET], [
 # require it.
 AC_DEFUN([GHC_LLVM_TARGET_SET_VAR], [
   AC_REQUIRE([FPTOOLS_SET_PLATFORMS_VARS])
-  GHC_LLVM_TARGET([$target],[$target_cpu],[$target_vendor],[$target_os],[LlvmTarget])
+  if test "$bootstrap_llvm_target" != ""
+  then
+    LlvmTarget=$bootstrap_llvm_target
+  else
+    GHC_LLVM_TARGET([$target],[$target_cpu],[$target_vendor],[$target_os],[LlvmTarget])
+  fi
 ])


=====================================
testsuite/tests/rts/all.T
=====================================
@@ -356,7 +356,7 @@ test('T10904', [ omit_ways(['ghci']), extra_run_opts('20000') ],
 test('T10728', [extra_run_opts('+RTS -maxN3 -RTS'), only_ways(['threaded2'])],
                compile_and_run, [''])
 
-test('T9405', [when(opsys('mingw32'), expect_broken(21361))], makefile_test, ['T9405'])
+test('T9405', normal, makefile_test, ['T9405'])
 
 test('T11788', when(ghc_dynamic(), skip),
               makefile_test, ['T11788'])



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/08a41807a17e5060f24a2a1e4dcd56aec9800fea...403470cf056b24fb9e7a82f42fe35afb0e60d9a6

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/08a41807a17e5060f24a2a1e4dcd56aec9800fea...403470cf056b24fb9e7a82f42fe35afb0e60d9a6
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20230415/2f1b9ad0/attachment-0001.html>


More information about the ghc-commits mailing list