[Git][ghc/ghc][wip/romes/T26166] 3 commits: Move atomic.c from ghc-internal to rts
Rodrigo Mesquita pushed to branch wip/romes/T26166 at Glasgow Haskell Compiler / GHC Commits: 8914693f by Rodrigo Mesquita at 2025-09-29T19:30:55+01:00 Move atomic.c from ghc-internal to rts - - - - - 6445ca93 by Rodrigo Mesquita at 2025-09-29T22:18:41+01:00 Fix link failure in Cabal check assertion due to -u[_]init_ghc_hs_iface bc lack of definition and because -u<sym> -U<sym> does not work to allow the symbol to be undefined. brilliant... - - - - - b1446914 by Rodrigo Mesquita at 2025-09-29T22:19:42+01:00 fixup! Drop all undefined dynamic_lookup hacks - - - - - 5 changed files: - hadrian/src/Hadrian/Haskell/Cabal/Parse.hs - libraries/ghc-internal/ghc-internal.cabal.in - + libraries/ghc-internal/include/RtsIfaceStub.h - libraries/ghc-internal/cbits/atomic.c → rts/prim/atomic.c - rts/rts.cabal Changes: ===================================== hadrian/src/Hadrian/Haskell/Cabal/Parse.hs ===================================== @@ -184,7 +184,7 @@ configurePackage context@Context {..} = do trackArgsHash (target context (Cabal Setup stage) [] []) verbosity <- getVerbosity let v = shakeVerbosityToCabalFlag verbosity - argList' = argList ++ ["--flags=" ++ unwords flagList, "-v3"] + argList' = argList ++ ["--flags=" ++ unwords flagList, v] when (verbosity >= Verbose) $ putProgressInfo $ "| Package " ++ quote (pkgName package) ++ " configuration flags: " ++ unwords argList' ===================================== libraries/ghc-internal/ghc-internal.cabal.in ===================================== @@ -433,7 +433,11 @@ Library if !arch(javascript) -- See Note [RTS/ghc-internal interface]. - ld-options: -uinit_ghc_hs_iface + if os(darwin) + -- Leading underscores on symbols on darwin + ld-options: -u_init_ghc_hs_iface + else + ld-options: -uinit_ghc_hs_iface -- To maximize usability cc-options: -fPIC c-sources: @@ -447,7 +451,7 @@ Library cbits/sysconf.c cbits/fs.c cbits/strerror.c - cbits/atomic.c + -- cbits/atomic.c cbits/bswap.c cbits/bitrev.c cbits/clz.c @@ -481,6 +485,7 @@ Library include-dirs: include includes: HsBase.h + RtsIfaceStub.h install-includes: HsBase.h consUtils.h ===================================== libraries/ghc-internal/include/RtsIfaceStub.h ===================================== @@ -0,0 +1,4 @@ +#include <stdio.h> +void __attribute__((weak)) init_ghc_hs_iface(void) { + fprintf(stderr, "init_ghc_hs_iface: weak constructor stub for init_ghc_hs_iface was not overriden by the actual constructor. Obviously wrong! This stub should never make it into the final object except for in the Cabal checkForeignDeps configuration checks!"); +}; ===================================== libraries/ghc-internal/cbits/atomic.c → rts/prim/atomic.c ===================================== ===================================== rts/rts.cabal ===================================== @@ -526,6 +526,7 @@ library sm/Storage.c sm/Sweep.c fs.c + prim/atomic.c -- I wish we had wildcards..., this would be: -- *.c hooks/**/*.c sm/**/*.c eventlog/**/*.c linker/**/*.c View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/4d62599a1232ecc8ff54192df31b439... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/4d62599a1232ecc8ff54192df31b439... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Rodrigo Mesquita (@alt-romes)