| ... |
... |
@@ -370,21 +370,6 @@ rtsPackageArgs = package rts ? do |
|
370
|
370
|
|
|
371
|
371
|
, inputs ["**/Evac.c", "**/Evac_thr.c"] ? arg "-funroll-loops"
|
|
372
|
372
|
|
|
373
|
|
- , speedHack ?
|
|
374
|
|
- inputs [ "**/Evac.c", "**/Evac_thr.c"
|
|
375
|
|
- , "**/Scav.c", "**/Scav_thr.c"
|
|
376
|
|
- , "**/Compact.c", "**/GC.c" ] ? arg "-fno-PIC"
|
|
377
|
|
- -- @-static@ is necessary for these bits, as otherwise the NCG
|
|
378
|
|
- -- generates dynamic references.
|
|
379
|
|
- , speedHack ?
|
|
380
|
|
- inputs [ "**/Updates.c", "**/StgMiscClosures.c"
|
|
381
|
|
- , "**/Jumps_D.c", "**/Jumps_V16.c", "**/Jumps_V32.c", "**/Jumps_V64.c"
|
|
382
|
|
- , "**/PrimOps.c", "**/Apply.c"
|
|
383
|
|
- , "**/AutoApply.c"
|
|
384
|
|
- , "**/AutoApply_V16.c"
|
|
385
|
|
- , "**/AutoApply_V32.c"
|
|
386
|
|
- , "**/AutoApply_V64.c" ] ? pure ["-fno-PIC", "-static"]
|
|
387
|
|
-
|
|
388
|
373
|
-- See Note [AutoApply.cmm for vectors] in genapply/Main.hs
|
|
389
|
374
|
, inputs ["**/AutoApply_V32.c"] ? pure [ "-mavx2" | x86 ]
|
|
390
|
375
|
, inputs ["**/AutoApply_V64.c"] ? pure [ "-mavx512f" | x86 ]
|
| ... |
... |
@@ -452,42 +437,6 @@ rtsPackageArgs = package rts ? do |
|
452
|
437
|
|
|
453
|
438
|
, builder HsCpp ? useLibdw ? arg "-DUSE_LIBDW" ]
|
|
454
|
439
|
|
|
455
|
|
--- Compile various performance-critical pieces *without* -fPIC -dynamic
|
|
456
|
|
--- even when building a shared library. If we don't do this, then the
|
|
457
|
|
--- GC runs about 50% slower on x86 due to the overheads of PIC. The
|
|
458
|
|
--- cost of doing this is a little runtime linking and less sharing, but
|
|
459
|
|
--- not much.
|
|
460
|
|
---
|
|
461
|
|
--- On x86_64 this doesn't work, because all objects in a shared library
|
|
462
|
|
--- must be compiled with -fPIC (since the 32-bit relocations generated
|
|
463
|
|
--- by the default small memory can't be resolved at runtime). So we
|
|
464
|
|
--- only do this on i386.
|
|
465
|
|
---
|
|
466
|
|
--- This apparently doesn't work on OS X (Darwin) nor on Solaris.
|
|
467
|
|
--- On Darwin we get errors of the form
|
|
468
|
|
---
|
|
469
|
|
--- ld: absolute addressing (perhaps -mdynamic-no-pic) used in _stg_ap_0_fast
|
|
470
|
|
--- from rts/dist-install/build/Apply.dyn_o not allowed in slidable image
|
|
471
|
|
---
|
|
472
|
|
--- and lots of these warnings:
|
|
473
|
|
---
|
|
474
|
|
--- ld: warning codegen in _stg_ap_pppv_fast (offset 0x0000005E) prevents image
|
|
475
|
|
--- from loading in dyld shared cache
|
|
476
|
|
---
|
|
477
|
|
--- On Solaris we get errors like:
|
|
478
|
|
---
|
|
479
|
|
--- Text relocation remains referenced
|
|
480
|
|
--- against symbol offset in file
|
|
481
|
|
--- .rodata (section) 0x11 rts/dist-install/build/Apply.dyn_o
|
|
482
|
|
--- ...
|
|
483
|
|
--- ld: fatal: relocations remain against allocatable but non-writable sections
|
|
484
|
|
--- collect2: ld returned 1 exit status
|
|
485
|
|
-speedHack :: Action Bool
|
|
486
|
|
-speedHack = do
|
|
487
|
|
- i386 <- anyTargetArch [ArchX86]
|
|
488
|
|
- goodOS <- not <$> anyTargetOs [OSSolaris2]
|
|
489
|
|
- return $ i386 && goodOS
|
|
490
|
|
-
|
|
491
|
440
|
-- See @rts/ghc.mk@.
|
|
492
|
441
|
rtsWarnings :: Args
|
|
493
|
442
|
rtsWarnings = mconcat
|