summaryrefslogtreecommitdiff
path: root/aclocal.m4
Commit message (Collapse)AuthorAgeFilesLines
* Break up aclocal.m4Ben Gamari2021-05-051-2742/+0
|
* configure: Fix parsing of ARM triplesBen Gamari2021-04-051-8/+10
| | | | | | | | | | To support proper parsing of arm64 targets, we needed to adjust the GHC_LLVM_TARGET function to allow parsing arm64-apple-darwin into aarch64. This however discared the proper os detection. To rectify this, we'll pull the os detection into separate block. Fixes #19173.
* llvmGen: Accept range of LLVM versionsBen Gamari2021-03-171-13/+22
| | | | | | | Previously we would support only one LLVM major version. Here we generalize this to accept a range, taking this range to be LLVM 10 to 11, as 11 is necessary for Apple M1 support. We also accept 12, as that is what apple ships with BigSur on the M1.
* Implement riscv64 LLVM backendAndreas Schwab2021-03-051-1/+4
| | | | This enables a registerised build for the riscv64 architecture.
* Fix array and cleanup conversion primops (#19026)Sylvain Henry2021-03-031-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The first change makes the array ones use the proper fixed-size types, which also means that just like before, they can be used without explicit conversions with the boxed sized types. (Before, it was Int# / Word# on both sides, now it is fixed sized on both sides). For the second change, don't use "extend" or "narrow" in some of the user-facing primops names for conversions. - Names like `narrowInt32#` are misleading when `Int` is 32-bits. - Names like `extendInt64#` are flat-out wrong when `Int is 32-bits. - `narrow{Int,Word}<N>#` however map a type to itself, and so don't suffer from this problem. They are left as-is. These changes are batched together because Alex happend to use the array ops. We can only use released versions of Alex at this time, sadly, and I don't want to have to have a release thatwon't work for the final GHC 9.2. So by combining these we get all the changes for Alex done at once. Bump hackage state in a few places, and also make that workflow slightly easier for the future. Bump minimum Alex version Bump Cabal, array, bytestring, containers, text, and binary submodules
* Replace more autotools obsolete macros (#19189)Sylvain Henry2021-02-161-2/+2
|
* Respect $AR in configure scriptCheng Shao2021-01-271-1/+2
| | | | | | | | | Previously, the configure script doesn't respect $AR. This causes the nixpkgs GHC to capture "ar" instead of the absolute nix store path of ar in the global config. The original patch comes from https://github.com/input-output-hk/haskell.nix/blob/master/overlays/patches/ghc/respect-ar-path.patch.
* configure: fix the use of some obsolete macros (#19189)Sylvain Henry2021-01-171-15/+15
|
* Require alex < 3.2.6Ryan Scott2020-12-221-0/+2
| | | | A workaround for #19099.
* AArch64/arm64 adjustmentsMoritz Angermann2020-11-151-14/+30
| | | | | | | | This addes the necessary logic to support aarch64 on elf, as well as aarch64 on mach-o, which Apple calls arm64. We change architecture name to AArch64, which is the official arm naming scheme.
* Require happy >=1.20Vladislav Zavialov2020-09-191-2/+2
|
* [macOS] improved runpath handlingMoritz Angermann2020-09-071-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In b592bd98ff25730bbe3c13d6f62a427df8c78e28 we started using -dead_strip_dylib on macOS when lining dynamic libraries and binaries. The underlying reason being the Load Command Size Limit in macOS Sierra (10.14) and later. GHC will produce @rpath/libHS... dependency entries together with a corresponding RPATH entry pointing to the location of the libHS... library. Thus for every library we produce two Load Commands. One to specify the dependent library, and one with the path where to find it. This makes relocating libraries and binaries easier, as we just need to update the RPATH entry with the install_name_tool. The dynamic linker will then subsitute each @rpath with the RPATH entries it finds in the libraries load commands or the environement, when looking up @rpath relative libraries. -dead_strip_dylibs intructs the linker to drop unused libraries. This in turn help us reduce the number of referenced libraries, and subsequently the size of the load commands. This however does not remove the RPATH entries. Subsequently we can end up (in extreme cases) with only a single @rpath/libHS... entry, but 100s or more RPATH entries in the Load Commands. This patch rectifies this (slighly unorthodox) by passing *no* -rpath arguments to the linker at link time, but -headerpad 8000. The headerpad argument is in hexadecimal and the maxium 32k of the load command size. This tells the linker to pad the load command section enough for us to inject the RPATHs later. We then proceed to link the library or binary with -dead_strip_dylibs, and *after* the linking inspect the library to find the left over (non-dead-stripped) dependencies (using otool). We find the corresponding RPATHs for each @rpath relative dependency, and inject them into the library or binary using the install_name_tool. Thus achieving a deadstripped dylib (and rpaths) build product. We can not do this in GHC, without starting to reimplement a dynamic linker as we do not know which symbols and subsequently libraries are necessary. Commissioned-by: Mercury Technologies, Inc. (mercury.com)
* configure: Fix whitespaceBen Gamari2020-09-051-68/+68
|
* configure: Avoid hard-coded ld path on WindowsGHC GitLab CI2020-09-041-17/+24
| | | | | | | The fix to #17962 ended up regressing on Windows as it failed to replicate the logic responsible for overriding the toolchain paths on Windows. This resulted in a hard-coded path to a directory that likely doesn't exist on the user's system (#18550).
* configure: Work around Raspbian's silly packaging decisionsBen Gamari2020-09-031-19/+34
| | | | See #17856.
* Limit upper version of Happy for ghc-9.2 (#18620)Takenobu Tani2020-08-311-2/+2
| | | | | | | | This patch adds the upper bound of a happy version for ghc-9.2. Currently, We can use happy-1.19 or happy-1.20 for ghc-9.2. See #18620.
* Limit upper version of Happy for ghc-9.0 and earlier (#18620)Takenobu Tani2020-08-311-0/+2
| | | | | | | | | This patch adds the upper bound of a happy version for ghc-9.0 and earlier. Currently, we can't use happy-1.20.0 for ghc-9.0. See #18620.
* document how build system find toolchains on WindowsTamar Christina2020-08-281-0/+1
|
* Fix use distro toolchianTamar Christina2020-08-281-0/+2
|
* configure: Fix double-negation in ld merge-objects checkBen Gamari2020-08-071-1/+1
| | | | | We want to only run the check if ld is gold. Fixes the fix to #17962.
* Refactor handling of object mergingBen Gamari2020-08-051-8/+133
| | | | | | | | | Previously to merge a set of object files we would invoke the linker as usual, adding -r to the command-line. However, this can result in non-sensical command-lines which causes lld to balk (#17962). To avoid this we introduce a new tool setting into GHC, -pgmlm, which is the linker which we use to merge object files.
* configure: Fix build system on ARMPeter Trommler2020-07-291-1/+1
|
* config: Fix Haskell platform constructor w/ paramsPeter Trommler2020-07-281-4/+4
| | | | Fixes #18505
* No need for CURSES_INCLUDE_DIRSGabor Greif2020-07-021-1/+0
| | | This is a leftover from ef63ff27251a20ff11e58c9303677fa31e609a88
* Add most common return values for `os` and `arch`Hécate2020-07-011-1/+3
|
* configure: Use grep -q instead of --quietBen Gamari2020-06-171-1/+1
| | | | The latter is apparently not supported by busybox.
* winio: Add Atomic Exchange PrimOp and implement Atomic Ptr exchanges.Tamar Christina2020-06-141-2/+3
| | | | | | | The initial version was rewritten by Tamar Christina. It was rewritten in large parts by Andreas Klebinger. Co-authored-by: Andreas Klebinger <klebinger.andreas@gmx.at>
* configure: Modify aclocal.m4 according to new module hierarchyTakenobu Tani2020-06-011-2/+2
| | | | | | | | | | | | | This patch updates file paths according to new module hierarchy [1]: * Rename: * compiler/GHC/Parser.hs <= compiler/parser/Parser.hs * compiler/GHC/Parser/Lexer.hs <= compiler/Parser/Lexer.hs * Add: * compiler/GHC/Cmm/Lexer.hs [1]: https://gitlab.haskell.org/ghc/ghc/-/wikis/Make-GHC-codebase-more-modular
* configure: correctly generate LIBRARY_template_haskell_VERSIONAdam Sandberg Ericsson2020-02-271-3/+3
|
* configure: Don't assume Gnu linker on SolarisBen Gamari2020-02-111-1/+12
| | | | | | | Compl Yue noticed that the linker was dumping the link map on SmartOS. This is because Smartos uses the Solaris linker, which uses the `-64` flag, not `-m64` like Gnu ld, to indicate that it should link for 64-bits. Fix the configure script to handle the Solaris linker correctly.
* Module hierarchy: Cmm (cf #13009)Sylvain Henry2020-01-251-1/+1
|
* Avoid ./configure failure on NetBSDPHO2020-01-201-1/+4
|
* Fix more typos, via an improved Levenshtein-style correctorBrian Wignall2020-01-121-2/+2
|
* configure: Find Python3 for testsuiteBen Gamari2020-01-071-0/+11
| | | | | In addition, we prefer the Mingw64 Python distribution on Windows due to #17483.
* configure: Only check GCC version if CC is GCCBen Gamari2020-01-071-19/+24
| | | | | | | | | | | Also refactor FP_GCC_EXTRA_FLAGS in a few ways: * We no longer support compilers which lack support for -fno-builtin and -fwrapv so remove the condition on GccVersion * These flags are only necessary when using the via-C backend so make them conditional on Unregisterised. Fixes #15742.
* while at it rename XCode to the official XcodeGabor Greif2019-12-271-12/+12
|
* suppress popup dialog about missing Xcode at configureGabor Greif2019-12-271-1/+1
| | | | tested with `bash` and `zsh`.
* Revert "Replace freebsd-gnueabihf with freebsd"Ben Gamari2019-10-291-0/+4
| | | | | This reverts commit aa31ceaf7568802590f73a740ffbc8b800096342 as suggested in #17392.
* Don't substitute GccVersion variableBen Gamari2019-10-291-2/+2
| | | | | Not only is it now unused but we generally can't assume that we are compiling with GCC, so it really shouldn't be used.
* configure: Drop GccLT46Ben Gamari2019-10-251-5/+2
| | | | | GCC 4.6 was released 7 years ago. I think we can finally assume that it's available. This is a simplification prompted by #15742.
* aclocal: A bit of reformattingBen Gamari2019-10-251-31/+31
|
* Implement s390x LLVM backend.Stefan Schulze Frielinghaus2019-10-221-1/+4
| | | | | | This patch adds support for the s390x architecture for the LLVM code generator. The patch includes a register mapping of STG registers onto s390x machine registers which enables a registerised build.
* Replace freebsd-gnueabihf with freebsdMatthew Bauer2019-10-221-4/+0
| | | | | | | | | | | FreeBSD does not support GNU libc, so it makes no sense to use this triple. Most likely previous builds were just using the FreeBSD libc instead of gnueabihf. To fix this, we should just use armv6-unknown-freebsd and armv7-unknown-freebsd triples. Note that both of these are actually "soft-float", not "hard-float". FreeBSD has never officially released hard-float arm32: https://wiki.freebsd.org/ARMTier1
* Simplify Configure in a few waysJohn Ericson2019-10-121-17/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - No need to distinguish between gcc-llvm and clang. First of all, gcc-llvm is quite old and surely unmaintained by now. Second of all, none of the code actually care about that distinction! Now, it does make sense to consider C multiple frontends for LLVMs in the form of clang vs clang-cl (same clang, yes, but tweaked interface). But this is better handled in terms of "gccish vs mvscish" and "is LLVM", yielding 4 combinations. Therefore, I don't think it is useful saving the existing code for that. - Get the remaining CC_LLVM_BACKEND, and also TABLES_NEXT_TO_CODE in mk/config.h the normal way, rather than hacking it post-hoc. No point keeping these special cases around for now reason. - Get rid of hand-rolled `die` function and just use `AC_MSG_ERROR`. - Abstract check + flag override for unregisterised and tables next to code. Oh, and as part of the above I also renamed/combined some variables where it felt appropriate. - GccIsClang -> CcLlvmBackend. This is for `AC_SUBST`, like the other Camal case ones. It was never about gcc-llvm, or Apple's renamed clang, to be clear. - llvm_CC_FLAVOR -> CC_LLVM_BACKEND. This is for `AC_DEFINE`, like the other all-caps snake case ones. llvm_CC_FLAVOR was just silly indirection *and* an odd name to boot.
* Add musl systems to llvm-targetsMatthew Bauer2019-10-041-1/+1
| | | | | | This was done in Nixpkgs, but never upstreamed. Musl is pretty much the same as gnu, but with a different libc. I’ve used the same values for everything.
* Factor out a smaller part of Platform for host fallbackJohn Ericson2019-10-041-1/+3
|
* configure: Don't depend upon alex in source dist buildBen Gamari2019-09-271-2/+5
| | | | | | This fixes #16860 by verifying that the generated sources don't already exist before asserting that the `alex` executable was found. This replicates the logic already used for `happy` in the case of `alex`.
* Make sure all boolean settings entries use `YES` / `NO`John Ericson2019-09-051-9/+9
| | | | | | | | | Some where using `True` / `False`, a legacy of when they were in `Config.hs`. See #16914 / d238d3062a9858 for a similar problem. Also clean up the configure variables names for consistency and clarity while we're at it. "Target" makes clear we are talking about outputted code, not where GHC itself runs.
* configure: Search for LLVM executables with two-number versionsBen Gamari2019-08-041-2/+3
| | | | | | | Fedora uses the naming llc-7.0 while Debian uses llc-7. Ensure that both are found. Fixes #16990.
* Maintain separate flags for C++ compiler invocationsBen Gamari2019-06-131-0/+3
| | | | | | | Previously we would pass flags intended for the C compiler to the C++ compiler (see #16738). This would cause, for instance, `-std=gnu99` to be passed to the C++ compiler, causing spurious test failures. Fix this by maintaining a separate set of flags for C++ compilation invocations.