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
-
6445ca93
by Rodrigo Mesquita at 2025-09-29T22:18:41+01:00
-
b1446914
by Rodrigo Mesquita at 2025-09-29T22:19:42+01:00
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:
| ... | ... | @@ -184,7 +184,7 @@ configurePackage context@Context {..} = do |
| 184 | 184 | trackArgsHash (target context (Cabal Setup stage) [] [])
|
| 185 | 185 | verbosity <- getVerbosity
|
| 186 | 186 | let v = shakeVerbosityToCabalFlag verbosity
|
| 187 | - argList' = argList ++ ["--flags=" ++ unwords flagList, "-v3"]
|
|
| 187 | + argList' = argList ++ ["--flags=" ++ unwords flagList, v]
|
|
| 188 | 188 | |
| 189 | 189 | when (verbosity >= Verbose) $
|
| 190 | 190 | putProgressInfo $ "| Package " ++ quote (pkgName package) ++ " configuration flags: " ++ unwords argList'
|
| ... | ... | @@ -433,7 +433,11 @@ Library |
| 433 | 433 | |
| 434 | 434 | if !arch(javascript)
|
| 435 | 435 | -- See Note [RTS/ghc-internal interface].
|
| 436 | - ld-options: -uinit_ghc_hs_iface
|
|
| 436 | + if os(darwin)
|
|
| 437 | + -- Leading underscores on symbols on darwin
|
|
| 438 | + ld-options: -u_init_ghc_hs_iface
|
|
| 439 | + else
|
|
| 440 | + ld-options: -uinit_ghc_hs_iface
|
|
| 437 | 441 | -- To maximize usability
|
| 438 | 442 | cc-options: -fPIC
|
| 439 | 443 | c-sources:
|
| ... | ... | @@ -447,7 +451,7 @@ Library |
| 447 | 451 | cbits/sysconf.c
|
| 448 | 452 | cbits/fs.c
|
| 449 | 453 | cbits/strerror.c
|
| 450 | - cbits/atomic.c
|
|
| 454 | + -- cbits/atomic.c
|
|
| 451 | 455 | cbits/bswap.c
|
| 452 | 456 | cbits/bitrev.c
|
| 453 | 457 | cbits/clz.c
|
| ... | ... | @@ -481,6 +485,7 @@ Library |
| 481 | 485 | include-dirs: include
|
| 482 | 486 | includes:
|
| 483 | 487 | HsBase.h
|
| 488 | + RtsIfaceStub.h
|
|
| 484 | 489 | install-includes:
|
| 485 | 490 | HsBase.h
|
| 486 | 491 | consUtils.h
|
| 1 | +#include <stdio.h>
|
|
| 2 | +void __attribute__((weak)) init_ghc_hs_iface(void) {
|
|
| 3 | + 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!");
|
|
| 4 | +}; |
| ... | ... | @@ -526,6 +526,7 @@ library |
| 526 | 526 | sm/Storage.c
|
| 527 | 527 | sm/Sweep.c
|
| 528 | 528 | fs.c
|
| 529 | + prim/atomic.c
|
|
| 529 | 530 | -- I wish we had wildcards..., this would be:
|
| 530 | 531 | -- *.c hooks/**/*.c sm/**/*.c eventlog/**/*.c linker/**/*.c
|
| 531 | 532 |