[Git][ghc/ghc][wip/rts-configure-new-cabal] Get newer Cabal for Hadrian, use for `findPtr`

John Ericson (@Ericson2314) gitlab at gitlab.haskell.org
Thu Jan 19 14:26:03 UTC 2023



John Ericson pushed to branch wip/rts-configure-new-cabal at Glasgow Haskell Compiler / GHC


Commits:
00a57dc1 by John Ericson at 2023-01-19T09:25:46-05:00
Get newer Cabal for Hadrian, use for `findPtr`

There are many more things we would use this for, this is just a first
simple example to ensure the Cabal bump is working as intended.

- - - - -


6 changed files:

- hadrian/cabal.project
- hadrian/hadrian.cabal
- libraries/Cabal
- rts/configure.ac
- rts/external-symbols.list.in
- rts/rts.cabal.in


Changes:

=====================================
hadrian/cabal.project
=====================================
@@ -1,4 +1,6 @@
 packages: ./
+-- N.B. This could be removed once Cabal 3.9 is released.
+packages: ../libraries/Cabal/Cabal, ../libraries/Cabal/Cabal-syntax
 
 -- This essentially freezes the build plan for hadrian
 index-state: 2022-11-19T22:13:06Z


=====================================
hadrian/hadrian.cabal
=====================================
@@ -149,7 +149,7 @@ executable hadrian
                        , TypeOperators
     other-extensions:    MultiParamTypeClasses
                        , TypeFamilies
-    build-depends:       Cabal                >= 3.2     && < 3.9
+    build-depends:       Cabal                >= 3.9     && < 3.10
                        , base                 >= 4.11    && < 5
                        , bytestring           >= 0.10    && < 0.12
                        , containers           >= 0.5     && < 0.7


=====================================
libraries/Cabal
=====================================
@@ -1 +1 @@
-Subproject commit 6cd29789ca866464dc3af89f62c98c41264ce3cd
+Subproject commit 30f8a46008d164b5c4c6ce0b4453eb93eb5ef46c


=====================================
rts/configure.ac
=====================================
@@ -62,8 +62,13 @@ dnl ######################################################################
 
 dnl See Note [Undefined symbols in the RTS]
 
+symbolExtraDefs=''
+if [[ $CABAL_FLAG_find_ptr == 1 ]];
+symbolExtraDefs+=' -DFIND_PTR'
+fi
+
 cat $srcdir/external-symbols.list.in \
-    | "$CC" -E -P -traditional -Iinclude - -o - \
+    | "$CC" $symbolExtraDefs -E -P -traditional -Iinclude - -o - \
     | sed '/^$/d' \
     > external-symbols.list \
     || exit 1


=====================================
rts/external-symbols.list.in
=====================================
@@ -19,6 +19,10 @@ hs_atomicwrite64
 base_GHCziEventziWindows_processRemoteCompletion_closure
 #endif
 
+#if FIND_PTR
+findPtr
+#endif
+
 base_GHCziTopHandler_runIO_closure
 base_GHCziTopHandler_runNonIO_closure
 ghczmprim_GHCziTupleziPrim_Z0T_closure


=====================================
rts/rts.cabal.in
=====================================
@@ -295,23 +295,6 @@ library
                         stg/Ticky.h
                         stg/Types.h
 
-      -- See Note [Undefined symbols in the RTS]
-      --
-      -- We should handle this symbol with the others in the configure script
-      -- once we are using Cabal containing
-      -- https://github.com/haskell/cabal/pull/8565 /
-      -- 30f8a46008d164b5c4c6ce0b4453eb93eb5ef46c.
-      if flag(leading-underscore)
-        if flag(find-ptr)
-          -- This symbol is useful in gdb, but not referred to anywhere,
-          -- so we need to force it to be included in the binary.
-          ld-options: "-Wl,-u,_findPtr"
-      else
-        if flag(find-ptr)
-          -- This symbol is useful in gdb, but not referred to anywhere,
-          -- so we need to force it to be included in the binary.
-          ld-options: "-Wl,-u,findPtr"
-
       if os(osx)
         ld-options: "-Wl,-search_paths_first"
                     -- See Note [fd_set_overflow]



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/00a57dc13094305c497b7d57dcc484caefb0260f

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/00a57dc13094305c497b7d57dcc484caefb0260f
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/20230119/9ab55309/attachment-0001.html>


More information about the ghc-commits mailing list