Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • ghc/ghc
  • bgamari/ghc
  • syd/ghc
  • ggreif/ghc
  • watashi/ghc
  • RolandSenn/ghc
  • mpickering/ghc
  • DavidEichmann/ghc
  • carter/ghc
  • harpocrates/ghc
  • ethercrow/ghc
  • mijicd/ghc
  • adamse/ghc
  • alexbiehl/ghc
  • gridaphobe/ghc
  • trofi/ghc
  • supersven/ghc
  • ppk/ghc
  • ulysses4ever/ghc
  • AndreasK/ghc
  • ghuntley/ghc
  • shayne-fletcher-da/ghc
  • fgaz/ghc
  • yav/ghc
  • osa1/ghc
  • mbbx6spp/ghc
  • JulianLeviston/ghc
  • reactormonk/ghc
  • rae/ghc
  • takenobu-hs/ghc
  • michalt/ghc
  • andrewthad/ghc
  • hsyl20/ghc
  • scottgw/ghc
  • sjakobi/ghc
  • angerman/ghc
  • RyanGlScott/ghc
  • hvr/ghc
  • howtonotwin/ghc
  • chessai/ghc
  • m-renaud/ghc
  • brprice/ghc
  • stevehartdata/ghc
  • sighingnow/ghc
  • kgardas/ghc
  • ckoparkar/ghc
  • alp/ghc
  • smaeul/ghc
  • kakkun61/ghc
  • sykloid/ghc
  • newhoggy/ghc
  • toonn/ghc
  • nineonine/ghc
  • Phyx/ghc
  • ezyang/ghc
  • tweag/ghc
  • langston/ghc
  • ndmitchell/ghc
  • rockbmb/ghc
  • artempyanykh/ghc
  • mniip/ghc
  • mynguyenbmc/ghc
  • alexfmpe/ghc
  • crockeea/ghc
  • nh2/ghc
  • vaibhavsagar/ghc
  • phadej/ghc
  • Haskell-mouse/ghc
  • lolotp/ghc
  • spacekitteh/ghc
  • michaelpj/ghc
  • mgsloan/ghc
  • HPCohen/ghc
  • tmobile/ghc
  • radrow/ghc
  • simonmar/ghc
  • _deepfire/ghc
  • Ericson2314/ghc
  • leitao/ghc
  • fumieval/ghc
  • trac-isovector/ghc
  • cblp/ghc
  • xich/ghc
  • ciil/ghc
  • erthalion/ghc
  • xldenis/ghc
  • autotaker/ghc
  • haskell-wasm/ghc
  • kcsongor/ghc
  • agander/ghc
  • Baranowski/ghc
  • trac-dredozubov/ghc
  • 23Skidoo/ghc
  • iustin/ghc
  • ningning/ghc
  • josefs/ghc
  • kabuhr/ghc
  • gallais/ghc
  • dten/ghc
  • expipiplus1/ghc
  • Pluralia/ghc
  • rohanjr/ghc
  • intricate/ghc
  • kirelagin/ghc
  • Javran/ghc
  • DanielG/ghc
  • trac-mizunashi_mana/ghc
  • pparkkin/ghc
  • bollu/ghc
  • ntc2/ghc
  • jaspervdj/ghc
  • JoshMeredith/ghc
  • wz1000/ghc
  • zkourouma/ghc
  • code5hot/ghc
  • jdprice/ghc
  • tdammers/ghc
  • J-mie6/ghc
  • trac-lantti/ghc
  • ch1bo/ghc
  • cgohla/ghc
  • lucamolteni/ghc
  • acairncross/ghc
  • amerocu/ghc
  • chreekat/ghc
  • txsmith/ghc
  • trupill/ghc
  • typetetris/ghc
  • sergv/ghc
  • fryguybob/ghc
  • erikd/ghc
  • trac-roland/ghc
  • setupminimal/ghc
  • Friede80/ghc
  • SkyWriter/ghc
  • xplorld/ghc
  • abrar/ghc
  • obsidiansystems/ghc
  • Icelandjack/ghc
  • adinapoli/ghc
  • trac-matthewbauer/ghc
  • heatsink/ghc
  • dwijnand/ghc
  • Cmdv/ghc
  • alinab/ghc
  • pepeiborra/ghc
  • fommil/ghc
  • luochen1990/ghc
  • rlupton20/ghc
  • applePrincess/ghc
  • lehins/ghc
  • ronmrdechai/ghc
  • leeadam/ghc
  • harendra/ghc
  • mightymosquito1991/ghc
  • trac-gershomb/ghc
  • lucajulian/ghc
  • Rizary/ghc
  • VictorCMiraldo/ghc
  • jamesbrock/ghc
  • andrewdmeier/ghc
  • luke/ghc
  • pranaysashank/ghc
  • cocreature/ghc
  • hithroc/ghc
  • obreitwi/ghc
  • slrtbtfs/ghc
  • kaol/ghc
  • yairchu/ghc
  • Mathemagician98/ghc
  • trac-taylorfausak/ghc
  • leungbk/ghc
  • MichaWiedenmann/ghc
  • chris-martin/ghc
  • TDecki/ghc
  • adithyaov/ghc
  • trac-gelisam/ghc
  • Lysxia/ghc
  • complyue/ghc
  • bwignall/ghc
  • sternmull/ghc
  • sonika/ghc
  • leif/ghc
  • broadwaylamb/ghc
  • myszon/ghc
  • danbroooks/ghc
  • Mechachleopteryx/ghc
  • zardyh/ghc
  • trac-vdukhovni/ghc
  • OmarKhaledAbdo/ghc
  • arrowd/ghc
  • Bodigrim/ghc
  • matheus23/ghc
  • cardenaso11/ghc
  • trac-Athas/ghc
  • mb720/ghc
  • DylanZA/ghc
  • liff/ghc
  • typedrat/ghc
  • trac-claude/ghc
  • jbm/ghc
  • Gertjan423/ghc
  • PHO/ghc
  • JKTKops/ghc
  • kockahonza/ghc
  • msakai/ghc
  • Sir4ur0n/ghc
  • barambani/ghc
  • vishnu.c/ghc
  • dcoutts/ghc
  • trac-runeks/ghc
  • trac-MaxGabriel/ghc
  • lexi.lambda/ghc
  • strake/ghc
  • spavikevik/ghc
  • JakobBruenker/ghc
  • rmanne/ghc
  • gdziadkiewicz/ghc
  • ani/ghc
  • iliastsi/ghc
  • smunix/ghc
  • judah/ghc
  • blackgnezdo/ghc
  • emilypi/ghc
  • trac-bpfoley/ghc
  • muesli4/ghc
  • trac-gkaracha/ghc
  • Kleidukos/ghc
  • nek0/ghc
  • TristanCacqueray/ghc
  • dwulive/ghc
  • mbakke/ghc
  • arybczak/ghc
  • Yang123321/ghc
  • maksbotan/ghc
  • QuietMisdreavus/ghc
  • trac-olshanskydr/ghc
  • emekoi/ghc
  • samuela/ghc
  • josephcsible/ghc
  • dramforever/ghc
  • lpsmith/ghc
  • DenisFrezzato/ghc
  • michivi/ghc
  • jneira/ghc
  • jeffhappily/ghc
  • Ivan-Yudin/ghc
  • nakaji-dayo/ghc
  • gdevanla/ghc
  • galen/ghc
  • fendor/ghc
  • yaitskov/ghc
  • rcythr/ghc
  • awpr/ghc
  • jeremyschlatter/ghc
  • Aver1y/ghc
  • mitchellvitez/ghc
  • merijn/ghc
  • tomjaguarpaw1/ghc
  • trac-NoidedSuper/ghc
  • erewok/ghc
  • trac-junji.hashimoto/ghc
  • adamwespiser/ghc
  • bjaress/ghc
  • jhrcek/ghc
  • leonschoorl/ghc
  • lukasz-golebiewski/ghc
  • sheaf/ghc
  • last-g/ghc
  • carassius1014/ghc
  • eschwartz/ghc
  • dwincort/ghc
  • felixwiemuth/ghc
  • TimWSpence/ghc
  • marcusmonteirodesouza/ghc
  • WJWH/ghc
  • vtols/ghc
  • theobat/ghc
  • BinderDavid/ghc
  • ckoparkar0/ghc
  • alexander-kjeldaas/ghc
  • dme2/ghc
  • philderbeast/ghc
  • aaronallen8455/ghc
  • rayshih/ghc
  • benkard/ghc
  • mpardalos/ghc
  • saidelman/ghc
  • leiftw/ghc
  • ca333/ghc
  • bwroga/ghc
  • nmichael44/ghc
  • trac-crobbins/ghc
  • felixonmars/ghc
  • adityagupta1089/ghc
  • hgsipiere/ghc
  • treeowl/ghc
  • alexpeits/ghc
  • CraigFe/ghc
  • dnlkrgr/ghc
  • kerckhove_ts/ghc
  • cptwunderlich/ghc
  • eiais/ghc
  • hahohihu/ghc
  • sanchayan/ghc
  • lemmih/ghc
  • sehqlr/ghc
  • trac-dbeacham/ghc
  • luite/ghc
  • trac-f-a/ghc
  • vados/ghc
  • luntain/ghc
  • fatho/ghc
  • alexbiehl-gc/ghc
  • dcbdan/ghc
  • tvh/ghc
  • liam-ly/ghc
  • timbobbarnes/ghc
  • GovanifY/ghc
  • shanth2600/ghc
  • gliboc/ghc
  • duog/ghc
  • moxonsghost/ghc
  • zander/ghc
  • masaeedu/ghc
  • georgefst/ghc
  • guibou/ghc
  • nicuveo/ghc
  • mdebruijne/ghc
  • stjordanis/ghc
  • emiflake/ghc
  • wygulmage/ghc
  • frasertweedale/ghc
  • coot/ghc
  • aratamizuki/ghc
  • tsandstr/ghc
  • mrBliss/ghc
  • Anton-Latukha/ghc
  • tadfisher/ghc
  • vapourismo/ghc
  • Sorokin-Anton/ghc
  • basile-henry/ghc
  • trac-mightybyte/ghc
  • AbsoluteNikola/ghc
  • cobrien99/ghc
  • songzh/ghc
  • blamario/ghc
  • aj4ayushjain/ghc
  • trac-utdemir/ghc
  • tangcl/ghc
  • hdgarrood/ghc
  • maerwald/ghc
  • arjun/ghc
  • ratherforky/ghc
  • haskieLambda/ghc
  • EmilGedda/ghc
  • Bogicevic/ghc
  • eddiejessup/ghc
  • kozross/ghc
  • AlistairB/ghc
  • 3Rafal/ghc
  • christiaanb/ghc
  • trac-bit/ghc
  • matsumonkie/ghc
  • trac-parsonsmatt/ghc
  • chisui/ghc
  • jaro/ghc
  • trac-kmiyazato/ghc
  • davidsd/ghc
  • Tritlo/ghc
  • I-B-3/ghc
  • lykahb/ghc
  • AriFordsham/ghc
  • turion1/ghc
  • berberman/ghc
  • christiantakle/ghc
  • zyklotomic/ghc
  • trac-ocramz/ghc
  • CSEdd/ghc
  • doyougnu/ghc
  • mmhat/ghc
  • why-not-try-calmer/ghc
  • plutotulp/ghc
  • kjekac/ghc
  • Manvi07/ghc
  • teo/ghc
  • cactus/ghc
  • CarrieMY/ghc
  • abel/ghc
  • yihming/ghc
  • tsakki/ghc
  • jessicah/ghc
  • oliverbunting/ghc
  • meld/ghc
  • friedbrice/ghc
  • Joald/ghc
  • abarbu/ghc
  • DigitalBrains1/ghc
  • sterni/ghc
  • alexDarcy/ghc
  • hexchain/ghc
  • minimario/ghc
  • zliu41/ghc
  • tommd/ghc
  • jazcarate/ghc
  • peterbecich/ghc
  • alirezaghey/ghc
  • solomon/ghc
  • mikael.urankar/ghc
  • davjam/ghc
  • int-index/ghc
  • MorrowM/ghc
  • nrnrnr/ghc
  • Sonfamm/ghc-test-only
  • afzt1/ghc
  • nguyenhaibinh-tpc/ghc
  • trac-lierdakil/ghc
  • MichaWiedenmann1/ghc
  • jmorag/ghc
  • Ziharrk/ghc
  • trac-MitchellSalad/ghc
  • juampe/ghc
  • jwaldmann/ghc
  • snowleopard/ghc
  • juhp/ghc
  • normalcoder/ghc
  • ksqsf/ghc
  • trac-jberryman/ghc
  • roberth/ghc
  • 1ntEgr8/ghc
  • epworth/ghc
  • MrAdityaAlok/ghc
  • JunmingZhao42/ghc
  • jappeace/ghc
  • trac-Gabriel439/ghc
  • alt-romes/ghc
  • HugoPeters1024/ghc
  • 10ne1/ghc-fork
  • agentultra/ghc
  • Garfield1002/ghc
  • ChickenProp/ghc
  • clyring/ghc
  • MaxHearnden/ghc
  • jumper149/ghc
  • vem/ghc
  • ketzacoatl/ghc
  • Rosuavio/ghc
  • jackohughes/ghc
  • p4l1ly/ghc
  • konsumlamm/ghc
  • shlevy/ghc
  • torsten.schmits/ghc
  • andremarianiello/ghc
  • amesgen/ghc
  • googleson78/ghc
  • InfiniteVerma/ghc
  • uhbif19/ghc
  • yiyunliu/ghc
  • raehik/ghc
  • mrkun/ghc
  • telser/ghc
  • 1Jajen1/ghc
  • slotThe/ghc
  • WinstonHartnett/ghc
  • mpilgrem/ghc
  • dreamsmasher/ghc
  • schuelermine/ghc
  • trac-Viwor/ghc
  • undergroundquizscene/ghc
  • evertedsphere/ghc
  • coltenwebb/ghc
  • oberblastmeister/ghc
  • agrue/ghc
  • lf-/ghc
  • zacwood9/ghc
  • steshaw/ghc
  • high-cloud/ghc
  • SkamDart/ghc
  • PiDelport/ghc
  • maoif/ghc
  • RossPaterson/ghc
  • CharlesTaylor7/ghc
  • ribosomerocker/ghc
  • trac-ramirez7/ghc
  • daig/ghc
  • NicolasT/ghc
  • FinleyMcIlwaine/ghc
  • lawtonnichols/ghc
  • jmtd/ghc
  • ozkutuk/ghc
  • wildsebastian/ghc
  • nikshalark/ghc
  • lrzlin/ghc
  • tobias/ghc
  • fw/ghc
  • hawkinsw/ghc
  • type-dance/ghc
  • rui314/ghc
  • ocharles/ghc
  • wavewave/ghc
  • TheKK/ghc
  • nomeata/ghc
  • trac-csabahruska/ghc
  • jonathanjameswatson/ghc
  • L-as/ghc
  • Axman6/ghc
  • barracuda156/ghc
  • trac-jship/ghc
  • jake-87/ghc
  • meooow/ghc
  • rebeccat/ghc
  • hamana55/ghc
  • Enigmage/ghc
  • kokobd/ghc
  • agevelt/ghc
  • gshen42/ghc
  • chrismwendt/ghc
  • MangoIV/ghc
  • teto/ghc
  • Sookr1/ghc
  • trac-thomasjm/ghc
  • barci2/ghc-dev
  • trac-m4dc4p/ghc
  • dixonary/ghc
  • breakerzirconia/ghc
  • alexsio27444/ghc
  • glocq/ghc
  • sourabhxyz/ghc
  • ryantrinkle/ghc
  • Jade/ghc
  • scedfaliako/ghc
  • martijnbastiaan/ghc
  • trac-george.colpitts/ghc
  • ammarbinfaisal/ghc
  • mimi.vx/ghc
  • lortabac/ghc
  • trac-zyla/ghc
  • benbellick/ghc
  • aadaa-fgtaa/ghc
  • jvanbruegge/ghc
  • archbung/ghc
  • gilmi/ghc
  • mfonism/ghc
  • alex-mckenna/ghc
  • Ei30metry/ghc
  • DiegoDiverio/ghc
  • jorgecunhamendes/ghc
  • liesnikov/ghc
  • akrmn/ghc
  • trac-simplifierticks/ghc
  • jacco/ghc
  • rhendric/ghc
  • damhiya/ghc
  • ryndubei/ghc
  • DaveBarton/ghc
  • trac-Profpatsch/ghc
  • GZGavinZhao/ghc
  • ncfavier/ghc
  • jameshaydon/ghc
  • ajccosta/ghc
  • dschrempf/ghc
  • cydparser/ghc
  • LinuxUserGD/ghc
  • elodielander/ghc
  • facundominguez/ghc
  • psilospore/ghc
  • lachrimae/ghc
  • dylan-thinnes/ghc-type-errors-plugin
  • hamishmack/ghc
  • Leary/ghc
  • lzszt/ghc
  • lyokha/ghc
  • trac-glaubitz/ghc
  • Rewbert/ghc
  • andreabedini/ghc
  • Jasagredo/ghc
  • sol/ghc
  • OlegAlexander/ghc
  • trac-sthibaul/ghc
  • avdv/ghc
  • Wendaolee/ghc
  • ur4t/ghc
  • daylily/ghc
  • boltzmannrain/ghc
  • mmzk1526/ghc
  • trac-fizzixnerd/ghc
  • soulomoon/ghc
  • rwmjones/ghc
  • j14i/ghc
  • tracsis/ghc
  • gesh/ghc
  • flip101/ghc
  • eldritch-cookie/ghc
  • LemonjamesD/ghc
  • pgujjula/ghc
  • skeuchel/ghc
  • noteed/ghc
  • gulin.serge/ghc
  • Torrekie/ghc
  • jlwoodwa/ghc
  • ayanamists/ghc
  • husong998/ghc
  • trac-edmundnoble/ghc
  • josephf/ghc
  • contrun/ghc
  • baulig/ghc
  • edsko/ghc
  • mzschr/ghc-issue-24732
  • ulidtko/ghc
  • Arsen/ghc
  • trac-sjoerd_visscher/ghc
  • crumbtoo/ghc
  • L0neGamer/ghc
  • DrewFenwick/ghc
  • benz0li/ghc
  • MaciejWas/ghc
  • jordanrule/ghc
  • trac-qqwy/ghc
  • LiamGoodacre/ghc
  • isomorpheme/ghc
  • trac-danidiaz/ghc
  • Kariim/ghc
  • MTaimoorZaeem/ghc
  • hololeap/ghc
  • ticat-fp/ghc
  • meritamen/ghc
  • criskell/ghc
  • trac-kraai/ghc
  • aergus/ghc
  • jdral/ghc
  • SamB/ghc
  • Tristian/ghc
  • ywgrit/ghc
  • KatsuPatrick/ghc
  • OsePedro/ghc
  • mpscholten/ghc
  • fp/ghc
  • zaquest/ghc
  • fangyi-zhou/ghc
  • augyg/ghc
640 results
Show changes
Commits on Source (9)
Showing
with 238 additions and 228 deletions
......@@ -184,8 +184,8 @@ _darcs/
/linter.log
/mk/are-validating.mk
/mk/build.mk
/mk/config.h
/mk/config.h.in
/mk/unused.h
/mk/unused.h.in
/mk/config.mk
/mk/config.mk.old
/mk/system-cxx-std-lib-1.0.conf
......
......@@ -229,7 +229,7 @@ section "The word size story."
must contain at least 30 bits. GHC always implements
'Int' using the primitive type 'Int#', whose size equals
the @MachDeps.h@ constant @WORD\_SIZE\_IN\_BITS@.
This is normally set based on the @config.h@ parameter
This is normally set based on the RTS @ghcautoconf.h@ parameter
@SIZEOF\_HSWORD@, i.e., 32 bits on 32-bit machines, 64
bits on 64-bit machines.
......
......@@ -32,8 +32,8 @@ AC_CONFIG_MACRO_DIRS([m4])
# checkout), then we ship a file 'VERSION' containing the full version
# when the source distribution was created.
if test ! -f mk/config.h.in; then
echo "mk/config.h.in doesn't exist: perhaps you haven't run 'python3 boot'?"
if test ! -f rts/ghcautoconf.h.autoconf.in; then
echo "rts/ghcautoconf.h.autoconf.in doesn't exist: perhaps you haven't run 'python3 boot'?"
exit 1
fi
......@@ -84,8 +84,11 @@ AC_PREREQ([2.69])
# Prepare to generate the following header files
#
# This one is autogenerated by autoheader.
AC_CONFIG_HEADER(mk/config.h)
dnl so the next header, which is manually maintained, doesn't get
dnl overwritten by an autogenerated header. Once we have no more
dnl `AC_CONFIG_HEADER` calls (issue #23966) we can delete all mention
dnl of `mk/unused.h`.
AC_CONFIG_HEADER(mk/unused.h)
# This one is manually maintained.
AC_CONFIG_HEADER(compiler/ghc-llvm-version.h)
......@@ -138,27 +141,6 @@ if test "$EnableDistroToolchain" = "YES"; then
TarballsAutodownload=NO
fi
AC_ARG_ENABLE(asserts-all-ways,
[AS_HELP_STRING([--enable-asserts-all-ways],
[Usually ASSERTs are only compiled in the DEBUG way,
this will enable them in all ways.])],
[FP_CAPITALIZE_YES_NO(["$enableval"], [EnableAssertsAllWays])],
[EnableAssertsAllWays=NO]
)
if test "$enable_asserts_all_ways" = "yes" ; then
AC_DEFINE([USE_ASSERTS_ALL_WAYS], [1], [Compile-in ASSERTs in all ways.])
fi
AC_ARG_ENABLE(native-io-manager,
[AS_HELP_STRING([--enable-native-io-manager],
[Enable the native I/O manager by default.])],
[FP_CAPITALIZE_YES_NO(["$enableval"], [EnableNativeIOManager])],
[EnableNativeIOManager=NO]
)
if test "$EnableNativeIOManager" = "YES"; then
AC_DEFINE_UNQUOTED([DEFAULT_NATIVE_IO_MANAGER], [1], [Enable Native I/O manager as default.])
fi
AC_ARG_ENABLE(ghc-toolchain,
[AS_HELP_STRING([--enable-ghc-toolchain],
[Whether to use the newer ghc-toolchain tool to configure ghc targets])],
......@@ -319,9 +301,6 @@ dnl ** Do a build with tables next to code?
dnl --------------------------------------------------------------
GHC_TABLES_NEXT_TO_CODE
if test x"$TablesNextToCode" = xYES; then
AC_DEFINE([TABLES_NEXT_TO_CODE], [1], [Define to 1 if info tables are laid out next to code])
fi
AC_SUBST(TablesNextToCode)
# Requires FPTOOLS_SET_PLATFORMS_VARS to be run first.
......@@ -617,12 +596,15 @@ dnl unregisterised, Sparc, and PPC backends. Also determines whether
dnl linking to libatomic is required for atomic operations, e.g. on
dnl RISCV64 GCC.
FP_CC_SUPPORTS__ATOMICS
if test "$need_latomic" = 1; then
AC_SUBST([NeedLibatomic],[YES])
else
AC_SUBST([NeedLibatomic],[NO])
fi
dnl ** look to see if we have a C compiler using an llvm back end.
dnl
FP_CC_LLVM_BACKEND
AS_IF([test x"$CcLlvmBackend" = x"YES"],
[AC_DEFINE([CC_LLVM_BACKEND], [1], [Define (to 1) if C compiler has an LLVM back end])])
AC_SUBST(CcLlvmBackend)
FPTOOLS_SET_C_LD_FLAGS([target],[CFLAGS],[LDFLAGS],[IGNORE_LINKER_LD_FLAGS],[CPPFLAGS])
......@@ -845,88 +827,14 @@ dnl --------------------------------------------------
dnl ### program checking section ends here ###
dnl --------------------------------------------------
dnl --------------------------------------------------
dnl * Platform header file and syscall feature tests
dnl ### checking the state of the local header files and syscalls ###
dnl ** Enable large file support. NB. do this before testing the type of
dnl off_t, because it will affect the result of that test.
AC_SYS_LARGEFILE
dnl ** check for specific header (.h) files that we are interested in
AC_CHECK_HEADERS([ctype.h dirent.h dlfcn.h errno.h fcntl.h grp.h limits.h locale.h nlist.h pthread.h pwd.h signal.h sys/param.h sys/mman.h sys/resource.h sys/select.h sys/time.h sys/timeb.h sys/timerfd.h sys/timers.h sys/times.h sys/utsname.h sys/wait.h termios.h utime.h windows.h winsock.h sched.h])
dnl sys/cpuset.h needs sys/param.h to be included first on FreeBSD 9.1; #7708
AC_CHECK_HEADERS([sys/cpuset.h], [], [],
[[#if HAVE_SYS_PARAM_H
# include <sys/param.h>
#endif
]])
dnl ** check whether a declaration for `environ` is provided by libc.
FP_CHECK_ENVIRON
dnl ** do we have long longs?
AC_CHECK_TYPES([long long])
dnl ** what are the sizes of various types
FP_CHECK_SIZEOF_AND_ALIGNMENT(char)
FP_CHECK_SIZEOF_AND_ALIGNMENT(double)
FP_CHECK_SIZEOF_AND_ALIGNMENT(float)
FP_CHECK_SIZEOF_AND_ALIGNMENT(int)
FP_CHECK_SIZEOF_AND_ALIGNMENT(long)
if test "$ac_cv_type_long_long" = yes; then
FP_CHECK_SIZEOF_AND_ALIGNMENT(long long)
fi
FP_CHECK_SIZEOF_AND_ALIGNMENT(short)
FP_CHECK_SIZEOF_AND_ALIGNMENT(unsigned char)
FP_CHECK_SIZEOF_AND_ALIGNMENT(unsigned int)
FP_CHECK_SIZEOF_AND_ALIGNMENT(unsigned long)
if test "$ac_cv_type_long_long" = yes; then
FP_CHECK_SIZEOF_AND_ALIGNMENT(unsigned long long)
fi
FP_CHECK_SIZEOF_AND_ALIGNMENT(unsigned short)
FP_CHECK_SIZEOF_AND_ALIGNMENT(void *)
FP_CHECK_SIZEOF_AND_ALIGNMENT(int8_t)
FP_CHECK_SIZEOF_AND_ALIGNMENT(uint8_t)
FP_CHECK_SIZEOF_AND_ALIGNMENT(int16_t)
FP_CHECK_SIZEOF_AND_ALIGNMENT(uint16_t)
FP_CHECK_SIZEOF_AND_ALIGNMENT(int32_t)
FP_CHECK_SIZEOF_AND_ALIGNMENT(uint32_t)
FP_CHECK_SIZEOF_AND_ALIGNMENT(int64_t)
FP_CHECK_SIZEOF_AND_ALIGNMENT(uint64_t)
dnl for use in settings file
AC_CHECK_SIZEOF([void *])
TargetWordSize=$ac_cv_sizeof_void_p
AC_SUBST(TargetWordSize)
AC_C_BIGENDIAN([TargetWordBigEndian=YES],[TargetWordBigEndian=NO])
AC_SUBST(TargetWordBigEndian)
FP_CHECK_FUNC([WinExec],
[@%:@include <windows.h>], [WinExec("",0)])
FP_CHECK_FUNC([GetModuleFileName],
[@%:@include <windows.h>], [GetModuleFileName((HMODULE)0,(LPTSTR)0,0)])
dnl ** check for more functions
dnl ** The following have been verified to be used in ghc/, but might be used somewhere else, too.
AC_CHECK_FUNCS([getclock getrusage gettimeofday setitimer siginterrupt sysconf times ctime_r sched_setaffinity sched_getaffinity setlocale uselocale])
dnl ** On OS X 10.4 (at least), time.h doesn't declare ctime_r if
dnl ** _POSIX_C_SOURCE is defined
AC_CHECK_DECLS([ctime_r], , ,
[#define _POSIX_SOURCE 1
#define _POSIX_C_SOURCE 199506L
#include <time.h>])
dnl On Linux we should have program_invocation_short_name
AC_CHECK_DECLS([program_invocation_short_name], , ,
[#define _GNU_SOURCE 1
#include <errno.h>])
dnl ** check for math library
dnl Keep that check as early as possible.
dnl as we need to know whether we need libm
......
......@@ -28,7 +28,7 @@ if [ ! -f b1-stamp ]; then
# For cross-compilation, at this stage you may want to set up a source
# tree on the target machine, run the configure script there, and bring
# the resulting mk/config.h file back into this tree before building
# the resulting rts/ghcautoconf.h.autoconf file back into this tree before building
# the libraries.
touch mk/build.mk
......@@ -38,7 +38,7 @@ if [ ! -f b1-stamp ]; then
# We could optimise slightly by not building hslibs here. Also, building
# the RTS is not necessary (and might not be desirable if we're using
# a config.h from the target system).
# a ghcautoconf.h from the target system).
make stage1
cd ..
......
......@@ -108,7 +108,7 @@ POSIX-compliant to explicitly say so by having <code>#include
<p><li> Some architectures have memory alignment constraints. Others
don't have any constraints but go faster if you align things. These
macros (from <tt>config.h</tt>) tell you which alignment to use
macros (from <tt>ghcautoconf.h</tt>) tell you which alignment to use
<pre>
/* minimum alignment of unsigned int */
......
......@@ -1970,10 +1970,9 @@ Here the right-hand sides of @range@ and @ys@ are both thunks; the former
is static while the latter is dynamic.
The layout of a thunk is the same as that for a function closure.
However, thunks must have a payload of at least @MIN_UPD_SIZE@
words to allow it to be overwritten with a black hole and an
indirection. The compiler may have to add extra non-pointer fields to
satisfy this constraint.
However, a thunk header always contains an extra padding word at the
end. This allows the thunk to be overwritten with an indirection,
where the padding word will be repurposed as the indirectee pointer.
\begin{center}
\begin{tabular}{|l|l|l|l|l|}\hline
......
......@@ -155,10 +155,10 @@ generatePackageCode context@(Context stage pkg _ _) = do
when (pkg == rts) $ do
root -/- "**" -/- dir -/- "cmm/AutoApply.cmm" %> \file ->
build $ target context GenApply [] [file]
let go gen file = generate file (semiEmptyTarget stage) gen
root -/- "**" -/- dir -/- "include/ghcautoconf.h" %> \_ ->
need . pure =<< pkgSetupConfigFile context
root -/- "**" -/- dir -/- "include/ghcplatform.h" %> go generateGhcPlatformH
root -/- "**" -/- dir -/- "include/ghcplatform.h" %> \_ ->
need . pure =<< pkgSetupConfigFile context
root -/- "**" -/- dir -/- "include/DerivedConstants.h" %> genPlatformConstantsHeader context
root -/- "**" -/- dir -/- "include/rts/EventLogConstants.h" %> genEventTypes "--event-types-defines"
root -/- "**" -/- dir -/- "include/rts/EventTypes.h" %> genEventTypes "--event-types-array"
......@@ -357,62 +357,6 @@ ghcWrapper stage = do
else [])
++ [ "$@" ]
-- | Given a 'String' replace characters '.' and '-' by underscores ('_') so that
-- the resulting 'String' is a valid C preprocessor identifier.
cppify :: String -> String
cppify = replaceEq '-' '_' . replaceEq '.' '_'
-- | Generate @ghcplatform.h@ header.
-- ROMES:TODO: For the runtime-retargetable GHC, these will eventually have to
-- be determined at runtime, and no longer hardcoded to a file (passed as -D
-- flags to the preprocessor, probably)
generateGhcPlatformH :: Expr String
generateGhcPlatformH = do
trackGenerateHs
stage <- getStage
let chooseSetting x y = case stage of { Stage0 {} -> x; _ -> y }
buildPlatform <- chooseSetting (queryBuild targetPlatformTriple) (queryHost targetPlatformTriple)
buildArch <- chooseSetting (queryBuild queryArch) (queryHost queryArch)
buildOs <- chooseSetting (queryBuild queryOS) (queryHost queryOS)
buildVendor <- chooseSetting (queryBuild queryVendor) (queryHost queryVendor)
hostPlatform <- chooseSetting (queryHost targetPlatformTriple) (queryTarget targetPlatformTriple)
hostArch <- chooseSetting (queryHost queryArch) (queryTarget queryArch)
hostOs <- chooseSetting (queryHost queryOS) (queryTarget queryOS)
hostVendor <- chooseSetting (queryHost queryVendor) (queryTarget queryVendor)
ghcUnreg <- queryTarget tgtUnregisterised
return . unlines $
[ "#if !defined(__GHCPLATFORM_H__)"
, "#define __GHCPLATFORM_H__"
, ""
, "#define BuildPlatform_TYPE " ++ cppify buildPlatform
, "#define HostPlatform_TYPE " ++ cppify hostPlatform
, ""
, "#define " ++ cppify buildPlatform ++ "_BUILD 1"
, "#define " ++ cppify hostPlatform ++ "_HOST 1"
, ""
, "#define " ++ buildArch ++ "_BUILD_ARCH 1"
, "#define " ++ hostArch ++ "_HOST_ARCH 1"
, "#define BUILD_ARCH " ++ show buildArch
, "#define HOST_ARCH " ++ show hostArch
, ""
, "#define " ++ buildOs ++ "_BUILD_OS 1"
, "#define " ++ hostOs ++ "_HOST_OS 1"
, "#define BUILD_OS " ++ show buildOs
, "#define HOST_OS " ++ show hostOs
, ""
, "#define " ++ buildVendor ++ "_BUILD_VENDOR 1"
, "#define " ++ hostVendor ++ "_HOST_VENDOR 1"
, "#define BUILD_VENDOR " ++ show buildVendor
, "#define HOST_VENDOR " ++ show hostVendor
, ""
]
++
[ "#define UnregisterisedCompiler 1" | ghcUnreg ]
++
[ ""
, "#endif /* __GHCPLATFORM_H__ */"
]
generateSettings :: Expr String
generateSettings = do
ctx <- getContext
......
......@@ -22,6 +22,8 @@ lintRules = do
cmd_ (Cwd "libraries/base") "./configure"
"rts" -/- "include" -/- "ghcautoconf.h" %> \_ ->
cmd_ (Cwd "rts") "./configure"
"rts" -/- "include" -/- "ghcplatform.h" %> \_ ->
cmd_ (Cwd "rts") "./configure"
lint :: Action () -> Action ()
lint lintAction = do
......@@ -68,7 +70,6 @@ base = do
let includeDirs =
[ "rts/include"
, "libraries/base/include"
, stage1RtsInc
]
runHLint includeDirs [] "libraries/base"
......
......@@ -51,12 +51,6 @@ configurePackageRules = do
isGmp <- (== "gmp") <$> interpretInContext ctx getBignumBackend
when isGmp $
need [buildP -/- "include/ghc-gmp.h"]
when (pkg == rts) $ do
-- Rts.h is a header listed in the cabal file, and configuring
-- therefore wants to ensure that the header "works" post-configure.
-- But it (transitively) includes this, so we must ensure it exists
-- for that check to work.
need [buildP -/- "include/ghcplatform.h"]
Cabal.configurePackage ctx
root -/- "**/autogen/cabal_macros.h" %> \out -> do
......
......@@ -156,7 +156,8 @@ prepareTree dest = do
, pkgPath terminfo -/- "configure"
, "configure"
, "aclocal.m4"
, "mk" -/- "config.h.in" ]
, "mk" -/- "unused.h.in"
]
copyAlexHappyFiles =
forM_ alexHappyFiles $ \(stg, pkg, inp, out) -> do
......
......@@ -281,8 +281,8 @@ rtsPackageArgs = package rts ? do
targetArch <- queryTarget queryArch
targetOs <- queryTarget queryOS
targetVendor <- queryTarget queryVendor
ghcUnreg <- yesNo <$> queryTarget tgtUnregisterised
ghcEnableTNC <- yesNo <$> queryTarget tgtTablesNextToCode
ghcUnreg <- queryTarget tgtUnregisterised
ghcEnableTNC <- queryTarget tgtTablesNextToCode
rtsWays <- getRtsWays
way <- getWay
path <- getBuildPath
......@@ -355,8 +355,8 @@ rtsPackageArgs = package rts ? do
, "-DTargetArch=" ++ show targetArch
, "-DTargetOS=" ++ show targetOs
, "-DTargetVendor=" ++ show targetVendor
, "-DGhcUnregisterised=" ++ show ghcUnreg
, "-DTablesNextToCode=" ++ show ghcEnableTNC
, "-DGhcUnregisterised=" ++ show (yesNo ghcUnreg)
, "-DTablesNextToCode=" ++ show (yesNo ghcEnableTNC)
, "-DRtsWay=\"rts_" ++ show way ++ "\""
]
......@@ -414,6 +414,8 @@ rtsPackageArgs = package rts ? do
, flag UseLibzstd `cabalFlag` "libzstd"
, flag StaticLibzstd `cabalFlag` "static-libzstd"
, queryTargetTarget tgtSymbolsHaveLeadingUnderscore `cabalFlag` "leading-underscore"
, ghcUnreg `cabalFlag` "unregisterised"
, ghcEnableTNC `cabalFlag` "tables-next-to-code"
, Debug `wayUnit` way `cabalFlag` "find-ptr"
]
, builder (Cabal Setup) ? mconcat
......
......@@ -9,14 +9,16 @@
* Always use `safe` call to `read` for regular files and block devices on unix if the RTS is multi-threaded, regardless of `O_NONBLOCK`.
([CLC proposal #166](https://github.com/haskell/core-libraries-committee/issues/166))
* Export List from Data.List ([CLC proposal #182](https://github.com/haskell/core-libraries-committee/issues/182)).
* Deprecate `Data.List.NonEmpty.unzip` ([CLC proposal #86](https://github.com/haskell/core-libraries-committee/issues/86))
* Fix exponent overflow/underflow bugs in the `Read` instances for `Float` and `Double` ([CLC proposal #192](https://github.com/haskell/core-libraries-committee/issues/192))
## 4.19.0.0 *TBA*
## 4.19.0.0 *October 2023*
* Add `{-# WARNING in "x-partial" #-}` to `Data.List.{head,tail}`.
Use `{-# OPTIONS_GHC -Wno-x-partial #-}` to disable it.
([CLC proposal #87](https://github.com/haskell/core-libraries-committee/issues/87) and [#114](https://github.com/haskell/core-libraries-committee/issues/114))
* `GHC.Conc.Sync` now exports `fromThreadId :: ThreadId -> Word64`, which maps a thread to a per-process-unique identifier ([CLC proposal #117](https://github.com/haskell/core-libraries-committee/issues/117))
* Add `fromThreadId :: ThreadId -> Word64` to `GHC.Conc.Sync`, which maps a thread to a per-process-unique identifier ([CLC proposal #117](https://github.com/haskell/core-libraries-committee/issues/117))
* Add `Data.List.!?` ([CLC proposal #110](https://github.com/haskell/core-libraries-committee/issues/110))
* `maximumBy`/`minimumBy` are now marked as `INLINE` improving performance for unpackable
* Mark `maximumBy`/`minimumBy` as `INLINE` improving performance for unpackable
types significantly.
* Add INLINABLE pragmas to `generic*` functions in Data.OldList ([CLC proposal #129](https://github.com/haskell/core-libraries-committee/issues/130))
* Export `getSolo` from `Data.Tuple`.
......@@ -34,20 +36,18 @@
* Add `COMPLETE` pragmas to the `TypeRep`, `SSymbol`, `SChar`, and `SNat` pattern synonyms.
([CLC proposal #149](https://github.com/haskell/core-libraries-committee/issues/149))
* Make `($)` representation polymorphic ([CLC proposal #132](https://github.com/haskell/core-libraries-committee/issues/132))
* Implemented [GHC Proposal #433](https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0433-unsatisfiable.rst),
* Implement [GHC Proposal #433](https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0433-unsatisfiable.rst),
adding the class `Unsatisfiable :: ErrorMessage -> TypeError` to `GHC.TypeError`,
which provides a mechanism for custom type errors that reports the errors in
a more predictable behaviour than `TypeError`.
* Add more instances for `Compose`: `Enum`, `Bounded`, `Num`, `Real`, `Integral` ([CLC proposal #160](https://github.com/haskell/core-libraries-committee/issues/160))
* Make `(&)` representation polymorphic in the return type ([CLC proposal #158](https://github.com/haskell/core-libraries-committee/issues/158))
* Implement `GHC.IORef.atomicSwapIORef` via a new dedicated primop `atomicSwapMutVar#` ([CLC proposal #139](https://github.com/haskell/core-libraries-committee/issues/139))
* Change codebuffers to use an unboxed implementation, while providing a compatibility layer using pattern synonyms. ([CLC proposal #134](https://github.com/haskell/core-libraries-committee/issues/134))
* Add nominal role annotations to SNat/SSymbol/SChar ([CLC proposal #170](https://github.com/haskell/core-libraries-committee/issues/170))
* Change `BufferCodec` to use an unboxed implementation, while providing a compatibility layer using pattern synonyms. ([CLC proposal #134](https://github.com/haskell/core-libraries-committee/issues/134))
* Add nominal role annotations to `SNat` / `SSymbol` / `SChar` ([CLC proposal #170](https://github.com/haskell/core-libraries-committee/issues/170))
* Make `Semigroup`'s `stimes` specializable. ([CLC proposal #8](https://github.com/haskell/core-libraries-committee/issues/8))
* Deprecate `Data.List.NonEmpty.unzip` ([CLC proposal #86](https://github.com/haskell/core-libraries-committee/issues/86))
* Fixed exponent overflow/underflow bugs in the `Read` instances for `Float` and `Double` ([CLC proposal #192](https://github.com/haskell/core-libraries-committee/issues/192))
* Implement `copyBytes`, `fillBytes`, `moveBytes` and `stimes` for `Data.Array.Byte.ByteArray` using primops ([CLC proposal #188](https://github.com/haskell/core-libraries-committee/issues/188))
* Add rewrite rules for conversion between Int64/Word64 and Float/Double on 64-bit architectures ([CLC proposal #203](https://github.com/haskell/core-libraries-committee/issues/203)).
* Add rewrite rules for conversion between `Int64` / `Word64` and `Float` / `Double` on 64-bit architectures ([CLC proposal #203](https://github.com/haskell/core-libraries-committee/issues/203)).
## 4.18.0.0 *March 2023*
* Shipped with GHC 9.6.1
......
......@@ -61,12 +61,4 @@ AC_DEFUN([FP_CC_SUPPORTS__ATOMICS],
AC_MSG_RESULT(no)
AC_MSG_ERROR([C compiler needs to support __atomic primitives.])
])
AC_DEFINE([HAVE_C11_ATOMICS], [1], [Does C compiler support __atomic primitives?])
if test "$need_latomic" = 1; then
AC_SUBST([NeedLibatomic],[YES])
else
AC_SUBST([NeedLibatomic],[NO])
fi
AC_DEFINE_UNQUOTED([NEED_ATOMIC_LIB], [$need_latomic],
[Define to 1 if we need -latomic.])
])
......@@ -82,7 +82,7 @@ AC_DEFUN([FPTOOLS_SET_HASKELL_PLATFORM_VARS_SHELL_FUNCTIONS],
solaris2)
test -z "[$]2" || eval "[$]2=OSSolaris2"
;;
mingw32|windows)
mingw32|mingw64|windows)
test -z "[$]2" || eval "[$]2=OSMinGW32"
;;
freebsd)
......@@ -162,8 +162,6 @@ AC_DEFUN([GHC_SUBSECTIONS_VIA_SYMBOLS],
TargetHasSubsectionsViaSymbols=NO
else
TargetHasSubsectionsViaSymbols=YES
AC_DEFINE([HAVE_SUBSECTIONS_VIA_SYMBOLS],[1],
[Define to 1 if Apple-style dead-stripping is supported.])
fi
],
[TargetHasSubsectionsViaSymbols=NO
......
......@@ -22,7 +22,7 @@ AC_DEFUN([GHC_CONVERT_OS],[
openbsd*)
$3="openbsd"
;;
windows|mingw32)
windows|mingw32|mingw64)
$3="mingw32"
;;
# As far as I'm aware, none of these have relevant variants
......
......@@ -740,25 +740,15 @@ stg_atomicModifyMutVar2zh ( gcptr mv, gcptr f )
obviously we can share (f x).
z = [stg_ap_2 f x] (max (HS + 2) MIN_UPD_SIZE)
y = [stg_sel_0 z] (max (HS + 1) MIN_UPD_SIZE)
z = [stg_ap_2 f x] (SIZEOF_StgThunkHeader + WDS(2))
y = [stg_sel_0 z] (SIZEOF_StgThunkHeader + WDS(1))
*/
#if defined(MIN_UPD_SIZE) && MIN_UPD_SIZE > 1
#define THUNK_1_SIZE (SIZEOF_StgThunkHeader + WDS(MIN_UPD_SIZE))
#define TICK_ALLOC_THUNK_1() TICK_ALLOC_UP_THK(WDS(1),WDS(MIN_UPD_SIZE-1))
#else
#define THUNK_1_SIZE (SIZEOF_StgThunkHeader + WDS(1))
#define TICK_ALLOC_THUNK_1() TICK_ALLOC_UP_THK(WDS(1),0)
#endif
#if defined(MIN_UPD_SIZE) && MIN_UPD_SIZE > 2
#define THUNK_2_SIZE (SIZEOF_StgThunkHeader + WDS(MIN_UPD_SIZE))
#define TICK_ALLOC_THUNK_2() TICK_ALLOC_UP_THK(WDS(2),WDS(MIN_UPD_SIZE-2))
#else
#define THUNK_2_SIZE (SIZEOF_StgThunkHeader + WDS(2))
#define TICK_ALLOC_THUNK_2() TICK_ALLOC_UP_THK(WDS(2),0)
#endif
#define SIZE (THUNK_2_SIZE + THUNK_1_SIZE)
......@@ -815,13 +805,8 @@ stg_atomicModifyMutVarzuzh ( gcptr mv, gcptr f )
z = [stg_ap_2 f x] (max (HS + 2) MIN_UPD_SIZE)
*/
#if defined(MIN_UPD_SIZE) && MIN_UPD_SIZE > 2
#define THUNK_SIZE (SIZEOF_StgThunkHeader + WDS(MIN_UPD_SIZE))
#define TICK_ALLOC_THUNK() TICK_ALLOC_UP_THK(WDS(2),WDS(MIN_UPD_SIZE-2))
#else
#define THUNK_SIZE (SIZEOF_StgThunkHeader + WDS(2))
#define TICK_ALLOC_THUNK() TICK_ALLOC_UP_THK(WDS(2),0)
#endif
HP_CHK_GEN_TICKY(THUNK_SIZE);
......
......@@ -22,17 +22,153 @@ dnl #define SIZEOF_CHAR 0
dnl recently.
AC_PREREQ([2.69])
AC_CONFIG_FILES([ghcplatform.h.top])
AC_CONFIG_HEADERS([ghcautoconf.h.autoconf])
AC_ARG_ENABLE(asserts-all-ways,
[AS_HELP_STRING([--enable-asserts-all-ways],
[Usually ASSERTs are only compiled in the DEBUG way,
this will enable them in all ways.])],
[FP_CAPITALIZE_YES_NO(["$enableval"], [EnableAssertsAllWays])],
[EnableAssertsAllWays=NO]
)
if test "$enable_asserts_all_ways" = "yes" ; then
AC_DEFINE([USE_ASSERTS_ALL_WAYS], [1], [Compile-in ASSERTs in all ways.])
fi
AC_ARG_ENABLE(native-io-manager,
[AS_HELP_STRING([--enable-native-io-manager],
[Enable the native I/O manager by default.])],
[FP_CAPITALIZE_YES_NO(["$enableval"], [EnableNativeIOManager])],
[EnableNativeIOManager=NO]
)
if test "$EnableNativeIOManager" = "YES"; then
AC_DEFINE_UNQUOTED([DEFAULT_NATIVE_IO_MANAGER], [1], [Enable Native I/O manager as default.])
fi
# We have to run these unconditionally, but we may discard their
# results in the following code
AC_CANONICAL_BUILD
AC_CANONICAL_HOST
dnl ** Do a build with tables next to code?
dnl --------------------------------------------------------------
AS_IF(
[test "$CABAL_FLAG_tables_next_to_code" = 1],
[AC_DEFINE([TABLES_NEXT_TO_CODE], [1], [Define to 1 if info tables are laid out next to code])])
dnl detect compiler (prefer gcc over clang) and set $CC (unless CC already set),
dnl later CC is copied to CC_STAGE{1,2,3}
AC_PROG_CC([cc gcc clang])
dnl make extensions visible to allow feature-tests to detect them lateron
AC_USE_SYSTEM_EXTENSIONS
dnl ** Used to determine how to compile ghc-prim's atomics.c, used by
dnl unregisterised, Sparc, and PPC backends. Also determines whether
dnl linking to libatomic is required for atomic operations, e.g. on
dnl RISCV64 GCC.
FP_CC_SUPPORTS__ATOMICS
AC_DEFINE([HAVE_C11_ATOMICS], [1], [Does C compiler support __atomic primitives?])
AC_DEFINE_UNQUOTED([NEED_ATOMIC_LIB], [$need_latomic],
[Define to 1 if we need -latomic for sub-word atomic operations.])
dnl ** look to see if we have a C compiler using an llvm back end.
dnl
FP_CC_LLVM_BACKEND
AS_IF([test x"$CcLlvmBackend" = x"YES"],
[AC_DEFINE([CC_LLVM_BACKEND], [1], [Define (to 1) if C compiler has an LLVM back end])])
GHC_CONVERT_PLATFORM_PARTS([build], [Build])
FPTOOLS_SET_PLATFORM_VARS([build],[Build])
FPTOOLS_SET_HASKELL_PLATFORM_VARS([Build])
GHC_CONVERT_PLATFORM_PARTS([host], [Host])
FPTOOLS_SET_PLATFORM_VARS([host], [Host])
FPTOOLS_SET_HASKELL_PLATFORM_VARS([Host])
GHC_SUBSECTIONS_VIA_SYMBOLS
AS_IF([test x"${TargetHasSubsectionsViaSymbols}" = x"YES"],
[AC_DEFINE([HAVE_SUBSECTIONS_VIA_SYMBOLS],[1],
[Define to 1 if Apple-style dead-stripping is supported.])])
dnl --------------------------------------------------
dnl * Platform header file and syscall feature tests
dnl ### checking the state of the local header files and syscalls ###
dnl ** Enable large file support. NB. do this before testing the type of
dnl off_t, because it will affect the result of that test.
AC_SYS_LARGEFILE
dnl ** check for specific header (.h) files that we are interested in
AC_CHECK_HEADERS([ctype.h dirent.h dlfcn.h errno.h fcntl.h grp.h limits.h locale.h nlist.h pthread.h pwd.h signal.h sys/param.h sys/mman.h sys/resource.h sys/select.h sys/time.h sys/timeb.h sys/timerfd.h sys/timers.h sys/times.h sys/utsname.h sys/wait.h termios.h utime.h windows.h winsock.h sched.h])
dnl sys/cpuset.h needs sys/param.h to be included first on FreeBSD 9.1; #7708
AC_CHECK_HEADERS([sys/cpuset.h], [], [],
[[#if HAVE_SYS_PARAM_H
# include <sys/param.h>
#endif
]])
dnl ** check whether a declaration for `environ` is provided by libc.
FP_CHECK_ENVIRON
dnl ** do we have long longs?
AC_CHECK_TYPES([long long])
dnl ** what are the sizes of various types
FP_CHECK_SIZEOF_AND_ALIGNMENT(char)
FP_CHECK_SIZEOF_AND_ALIGNMENT(double)
FP_CHECK_SIZEOF_AND_ALIGNMENT(float)
FP_CHECK_SIZEOF_AND_ALIGNMENT(int)
FP_CHECK_SIZEOF_AND_ALIGNMENT(long)
if test "$ac_cv_type_long_long" = yes; then
FP_CHECK_SIZEOF_AND_ALIGNMENT(long long)
fi
FP_CHECK_SIZEOF_AND_ALIGNMENT(short)
FP_CHECK_SIZEOF_AND_ALIGNMENT(unsigned char)
FP_CHECK_SIZEOF_AND_ALIGNMENT(unsigned int)
FP_CHECK_SIZEOF_AND_ALIGNMENT(unsigned long)
if test "$ac_cv_type_long_long" = yes; then
FP_CHECK_SIZEOF_AND_ALIGNMENT(unsigned long long)
fi
FP_CHECK_SIZEOF_AND_ALIGNMENT(unsigned short)
FP_CHECK_SIZEOF_AND_ALIGNMENT(void *)
FP_CHECK_SIZEOF_AND_ALIGNMENT(int8_t)
FP_CHECK_SIZEOF_AND_ALIGNMENT(uint8_t)
FP_CHECK_SIZEOF_AND_ALIGNMENT(int16_t)
FP_CHECK_SIZEOF_AND_ALIGNMENT(uint16_t)
FP_CHECK_SIZEOF_AND_ALIGNMENT(int32_t)
FP_CHECK_SIZEOF_AND_ALIGNMENT(uint32_t)
FP_CHECK_SIZEOF_AND_ALIGNMENT(int64_t)
FP_CHECK_SIZEOF_AND_ALIGNMENT(uint64_t)
FP_CHECK_FUNC([WinExec],
[@%:@include <windows.h>], [WinExec("",0)])
FP_CHECK_FUNC([GetModuleFileName],
[@%:@include <windows.h>], [GetModuleFileName((HMODULE)0,(LPTSTR)0,0)])
dnl ** check for more functions
dnl ** The following have been verified to be used in ghc/, but might be used somewhere else, too.
AC_CHECK_FUNCS([getclock getrusage gettimeofday setitimer siginterrupt sysconf times ctime_r sched_setaffinity sched_getaffinity setlocale uselocale])
dnl ** On OS X 10.4 (at least), time.h doesn't declare ctime_r if
dnl ** _POSIX_C_SOURCE is defined
AC_CHECK_DECLS([ctime_r], , ,
[#define _POSIX_SOURCE 1
#define _POSIX_C_SOURCE 199506L
#include <time.h>])
dnl On Linux we should have program_invocation_short_name
AC_CHECK_DECLS([program_invocation_short_name], , ,
[#define _GNU_SOURCE 1
#include <errno.h>])
dnl ** check for math library
dnl Keep that check as early as possible.
dnl as we need to know whether we need libm
......@@ -140,7 +276,6 @@ AC_ARG_ENABLE(large-address-space,
)
use_large_address_space=no
AC_CHECK_SIZEOF([void *])
if test "$ac_cv_sizeof_void_p" -eq 8 ; then
if test "x$EnableLargeAddressSpace" = "xyes" ; then
if test "$ghc_host_os" = "darwin" ; then
......@@ -223,19 +358,41 @@ dnl --------------------------------------------------------------
AC_OUTPUT
dnl ######################################################################
dnl Generate ghcautoconf.h
dnl Generate ghcplatform.h
dnl ######################################################################
[
mkdir -p include
touch include/ghcplatform.h
> include/ghcplatform.h
cat ghcplatform.h.top >> include/ghcplatform.h
]
dnl ** Do an unregisterised build?
dnl --------------------------------------------------------------
AS_IF(
[test "$CABAL_FLAG_unregisterised" = 1],
[echo "#define UnregisterisedCompiler 1" >> include/ghcplatform.h])
[
cat $srcdir/ghcplatform.h.bottom >> include/ghcplatform.h
]
dnl ######################################################################
dnl Generate ghcautoconf.h
dnl ######################################################################
[
touch include/ghcautoconf.h
> include/ghcautoconf.h
echo "#if !defined(__GHCAUTOCONF_H__)" >> include/ghcautoconf.h
echo "#define __GHCAUTOCONF_H__" >> include/ghcautoconf.h
# Copy the contents of $srcdir/../mk/config.h, turning '#define PACKAGE_FOO
# Copy the contents of ghcautoconf.h.autoconf, turning '#define PACKAGE_FOO
# "blah"' into '/* #undef PACKAGE_FOO */' to avoid clashes.
cat $srcdir/../mk/config.h ghcautoconf.h.autoconf | sed \
cat ghcautoconf.h.autoconf | sed \
-e 's,^\([ ]*\)#[ ]*define[ ][ ]*\(PACKAGE_[A-Z]*\)[ ][ ]*".*".*$,\1/* #undef \2 */,' \
-e '/__GLASGOW_HASKELL/d' \
-e '/REMOVE ME/d' \
......
#endif /* __GHCPLATFORM_H__ */
#if !defined(__GHCPLATFORM_H__)
#define __GHCPLATFORM_H__
#define BuildPlatform_TYPE @BuildPlatform_CPP@
#define HostPlatform_TYPE @HostPlatform_CPP@
#define @BuildPlatform_CPP@_BUILD 1
#define @HostPlatform_CPP@_HOST 1
#define @BuildArch_CPP@_BUILD_ARCH 1
#define @HostArch_CPP@_HOST_ARCH 1
#define BUILD_ARCH "@BuildArch_CPP@"
#define HOST_ARCH "@HostArch_CPP@"
#define @BuildOS_CPP@_BUILD_OS 1
#define @HostOS_CPP@_HOST_OS 1
#define BUILD_OS "@BuildOS_CPP@"
#define HOST_OS "@HostOS_CPP@"
#define @BuildVendor_CPP@_BUILD_VENDOR 1
#define @HostVendor_CPP@_HOST_VENDOR 1
#define BUILD_VENDOR "@BuildVendor_CPP@"
#define HOST_VENDOR "@HostVendor_CPP@"
......@@ -54,6 +54,10 @@ flag static-libzstd
default: False
flag leading-underscore
default: False
flag unregisterised
default: False
flag tables-next-to-code
default: False
flag smp
default: True
flag find-ptr
......@@ -240,7 +244,7 @@ library
include-dirs: include
includes: Rts.h
autogen-includes: ghcautoconf.h
autogen-includes: ghcautoconf.h ghcplatform.h
install-includes: Cmm.h HsFFI.h MachDeps.h Rts.h RtsAPI.h Stg.h
ghcautoconf.h ghcconfig.h ghcplatform.h ghcversion.h
-- ^ from include
......