[Git][ghc/ghc][wip/9.6.5-backports] 14 commits: Escape multiple arguments in the settings file

Zubin (@wz1000) gitlab at gitlab.haskell.org
Mon Apr 15 07:01:37 UTC 2024



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


Commits:
d74ffbbb by Fendor at 2024-04-15T12:31:20+05:30
Escape multiple arguments in the settings file

Uses responseFile syntax.

The issue arises when GHC is installed on windows into a location that
has a space, for example the user name is 'Fake User'.
The $topdir will also contain a space, consequentially.
When we resolve the top dir in the string `-I$topdir/mingw/include`,
then `words` will turn this single argument into `-I/C/Users/Fake` and
`User/.../mingw/include` which trips up the flag argument parser of
various tools such as gcc or clang.
We avoid this by escaping the $topdir before replacing it in
`initSettngs`.
Additionally, we allow to escape spaces and quotation marks for
arguments in `settings` file.

Add regression test case to count the number of options after variable
expansion and argument escaping took place.
Additionally, we check that escaped spaces and double quotation marks are
correctly parsed.

(cherry picked from commit 31bf85ee49fe2ca0b17eaee0774e395f017a9373)

- - - - -
a5a7a0ce by Florian Weimer at 2024-04-15T12:31:20+05:30
Fix C output for modern C initiative

GCC 14 on aarch64 rejects the C code written by GHC with this kind of
error:

   error: assignment to ‘ffi_arg’ {aka ‘long unsigned int’} from ‘HsPtr’ {aka ‘void *’} makes integer from pointer without a cast [-Wint-conversion]
         68 | *(ffi_arg*)resp = cret;
            |                 ^

Add the correct cast.

For more information on this see:
https://fedoraproject.org/wiki/Changes/PortingToModernC

Tested-by: Richard W.M. Jones <rjones at redhat.com>
(cherry picked from commit 1f534c2e7388273e70534680212c1357614c11ed)

- - - - -
af368514 by Rodrigo Mesquita at 2024-04-15T12:31:20+05:30
configure: Use LDFLAGS when trying linkers

A user may configure `LDFLAGS` but not `LD`. When choosing a linker, we
will prefer `ldd`, then `ld.gold`, then `ld.bfd` -- however, we have to
check for a working linker. If either of these fail, we try the next in
line.

However, we were not considering the `$LDFLAGS` when checking if these
linkers worked. So we would pick a linker that does not support the
current $LDFLAGS and fail further down the line when we used that linker
with those flags.

Fixes #24565, where `LDFLAGS=-Wl,-z,pack-relative-relocs` is not
supported by `ld.gold` but that was being picked still.

(cherry picked from commit 32a8103f3b3e22907fdd67b69c919c5251d8cc20)

- - - - -
7ca2ca58 by Cheng Shao at 2024-04-15T12:31:21+05:30
libffi-tarballs: bump libffi-tarballs submodule to libffi 3.4.6

This commit bumps the libffi-tarballs submodule to libffi 3.4.6, which
includes numerous upstream libffi fixes, especially
https://github.com/libffi/libffi/issues/760.

(cherry picked from commit 810660b780e1111b36c91326bcd0041e1f62706b)

- - - - -
291db356 by Cheng Shao at 2024-04-15T12:31:21+05:30
rts: fix clang compilation on aarch64

This patch fixes function prototypes in ARMOutlineAtomicsSymbols.h
which causes "error: address argument to atomic operation must be a
pointer to _Atomic type" when compiling with clang on aarch64.

(cherry picked from commit 7db8c9927fae3369fc4ecff68f80c4cb32eea757)

- - - - -
014e9ad9 by Cheng Shao at 2024-04-15T12:31:21+05:30
testsuite: add the req_process predicate

This patch adds the req_process predicate to the testsuite to assert
the platform has a process model, also marking tests that involve
spawning processes as req_process. Also bumps hpc & process submodule.

(cherry picked from commit ce580426ce3052e3b3d2847d0312652ea9087994)

- - - - -
cd3a199f by Jade at 2024-04-15T12:31:21+05:30
Improve documentation of Semigroup & Monoid

This commit aims to improve the documentation of various symbols
exported from Data.Semigroup and Data.Monoid

(cherry picked from commit fa4e5913251786f2b535b31abd3fad39da8b3602)

- - - - -
b895d534 by Simon Peyton Jones at 2024-04-15T12:31:21+05:30
Make decomposeRuleLhs a bit more clever

This fixes #24370 by making decomposeRuleLhs undertand
dictionary /functions/ as well as plain /dictionaries/

(cherry picked from commit ca2e919ecca35db412e772d7eadd6a7c4fb20e4b)

- - - - -
49c2986e by Teo Camarasu at 2024-04-15T12:31:21+05:30
rts: avoid checking bdescr of value outside of Haskell heap

In nonmovingTidyWeaks we want to check if the key of a weak pointer
lives in the non-moving heap. We do this by checking the flags of the
block the key lives in. But we need to be careful with values that live
outside the Haskell heap, since they will lack a block descriptor and
looking for one may lead to a segfault. In this case we should just
accept that it isn't on the non-moving heap.

Resolves #24492

(cherry picked from commit 74b24a9b0084459b8aa426a502956bd332b4d0fb)

- - - - -
3a2dfe28 by Zubin Duggal at 2024-04-15T12:31:21+05:30
Bump filepath submodule to 1.4.300.1
Bump directory submodule to 1.3.8.4
Bump process submodule to 1.6.18.0

- - - - -
753131c5 by Zubin Duggal at 2024-04-15T12:31:21+05:30
Bump process submodule to 1.6.19.0

- - - - -
940fda51 by Zubin Duggal at 2024-04-15T12:31:28+05:30
Prepare release 9.6.5

- - - - -
11d09a10 by Zubin Duggal at 2024-04-15T12:31:28+05:30
Disable `-fasm-shortcutting` on -O2 and warn about its usage.

This flag is known to result in unsound optimisations potentially resulting in
incorrect runtime behaviour (#24507).

(cherry picked from commit 4ae8d89e376d79b4188c61e6469c7f01d8445768)

- - - - -
3ead9102 by Zubin Duggal at 2024-04-15T12:31:28+05:30
Bump Cabal submodule to 3.10.3.0

- - - - -


30 changed files:

- compiler/GHC.hs
- compiler/GHC/Core/Predicate.hs
- compiler/GHC/Driver/Config/CmmToAsm.hs
- compiler/GHC/Driver/Session.hs
- compiler/GHC/HsToCore/Binds.hs
- compiler/GHC/HsToCore/Foreign/C.hs
- compiler/GHC/Settings/IO.hs
- configure.ac
- + docs/users_guide/9.6.5-notes.rst
- docs/users_guide/bugs.rst
- docs/users_guide/release-notes.rst
- docs/users_guide/using-optimisation.rst
- hadrian/src/Rules/Generate.hs
- libffi-tarballs
- libraries/Cabal
- libraries/base/Data/Monoid.hs
- libraries/base/Data/Semigroup.hs
- libraries/base/Data/Semigroup/Internal.hs
- libraries/base/GHC/Base.hs
- libraries/base/base.cabal
- libraries/base/changelog.md
- libraries/base/tests/IO/all.T
- libraries/base/tests/System/all.T
- libraries/base/tests/all.T
- libraries/directory
- libraries/filepath
- libraries/process
- m4/fp_cc_linker_flag_try.m4
- rts/ARMOutlineAtomicsSymbols.h
- rts/sm/NonMovingMark.c


The diff was not included because it is too large.


View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/3a1d8bb2a1ddf4f692e2bcdd1b84060fa8a3a0de...3ead91020194ab36ad5c0658fbd2ae8e5797b8bf

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/3a1d8bb2a1ddf4f692e2bcdd1b84060fa8a3a0de...3ead91020194ab36ad5c0658fbd2ae8e5797b8bf
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/20240415/1642cce7/attachment-0001.html>


More information about the ghc-commits mailing list