[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 2 commits: distrib: Rediscover otool and install_name_tool on Darwin

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Tue Nov 28 22:14:24 UTC 2023



Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC


Commits:
2565b85e by Ben Gamari at 2023-11-28T17:14:20-05:00
distrib: Rediscover otool and install_name_tool on Darwin

In the bindist configure script we must rediscover the `otool` and
`install_name_tool`s since they may be different from the build
environment.

Fixes #24211.

- - - - -
27634ffe by Stefan Schulze Frielinghaus at 2023-11-28T17:14:21-05:00
llvmGen: Align objects in the data section

Objects in the data section may be referenced via tagged pointers.
Thus, align those objects to a 4- or 8-byte boundary for 32- or 64-bit
platforms, respectively.  Note, this may need to be reconsidered if
objects with a greater natural alignment requirement are emitted as e.g.
128-bit atomics.

Fixes #24163.

- - - - -


2 changed files:

- compiler/GHC/CmmToLlvm/Data.hs
- distrib/configure.ac.in


Changes:

=====================================
compiler/GHC/CmmToLlvm/Data.hs
=====================================
@@ -89,6 +89,7 @@ genLlvmData (sec, CmmStaticsRaw lbl xs) = do
         align          = case sec of
                             Section CString _ -> if (platformArch platform == ArchS390X)
                                                     then Just 2 else Just 1
+                            Section Data _    -> Just $ platformWordSizeInBytes platform
                             _                 -> Nothing
         const          = if sectionProtection sec == ReadOnlySection
                             then Constant else Global


=====================================
distrib/configure.ac.in
=====================================
@@ -206,6 +206,18 @@ dnl Identify C++ standard library flavour and location
 FP_FIND_CXX_STD_LIB
 AC_CONFIG_FILES([mk/system-cxx-std-lib-1.0.conf])
 
+dnl ** Which otool to use on macOS
+dnl --------------------------------------------------------------
+AC_CHECK_TARGET_TOOL([OTOOL], [otool])
+OtoolCmd="$OTOOL"
+AC_SUBST(OtoolCmd)
+
+dnl ** Which install_name_tool to use on macOS
+dnl --------------------------------------------------------------
+AC_CHECK_TARGET_TOOL([INSTALL_NAME_TOOL], [install_name_tool])
+InstallNameToolCmd="$INSTALL_NAME_TOOL"
+AC_SUBST(InstallNameToolCmd)
+
 # Check that we have the same emsdk version as the one we were built with.
 ConfiguredEmsdkVersion=@ConfiguredEmsdkVersion@
 EMSDK_VERSION("", "", ${ConfiguredEmsdkVersion})



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/827fafc81419e4a0203cd37e6806440e5d7d60ca...27634ffe516db1c6862e0b6fbfb748878654b3e0

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/827fafc81419e4a0203cd37e6806440e5d7d60ca...27634ffe516db1c6862e0b6fbfb748878654b3e0
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/20231128/5d0bd6e7/attachment-0001.html>


More information about the ghc-commits mailing list