| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
Although we should use 'AC_ARG_ENABLE' for boolean flags, it also
means options get named '--enable-*', not '--with-*'. This should
unbreak the --with-intree-gmp option.
(cherry picked from commit b89b6e71c798996724ba99f273f88d8a3637fb8d)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This adds top-level configure flags '--with-intree-gmp' and
'--with-framework-preferred', both of which are especially relevant
on MacOS.
Besides gaining two new flags, Hadrian also had to be taught what to
do with the 'framework' in .cabal files.
Test Plan:
./boot && ./configure --with-intree-gmp && ./hadrian/build.sh
./boot && ./configure --with-gmp-framework-preferred && ./hadrian/build.sh # on macos
Reviewers: carter, snowleopard, alpmestan, hvr, goldfire, bgamari
Subscribers: rwbarton, erikd
GHC Trac Issues: #16001
Differential Revision: https://phabricator.haskell.org/D5417
|
|
|
|
|
|
| |
of the GHC var
Also updates the windows gitlab ci to use the new configure variables.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Initially -fno-stack-protector was added for openbsd specifically for ghc-6.5:
changeset:f638fdfe1d9de1307355c8074fbff9c28342c0ef (2006)
and later it was extended to cover osx:
changeset:c2cd83e7d85c11e6a33e1cde263eb2312566d535 (2009)
None of the reports hint at exact breakage. I guess both happened
in -fvia-C mode where GHC's Evil Mangler had a chance to mangle
stack canaries generated by fstack-protector.
ghc has no evil mangler anymore and the change is not needed
at least for C codegen.
validated the patch on OpenBSD-6.4. No new failures compared to
clean master branch.
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Test Plan: validated on OpenBSD
Reviewers: bgamari
Subscribers: rwbarton, erikd, carter
GHC Trac Issues: #16046
Differential Revision: https://phabricator.haskell.org/D5465
|
|
|
|
|
|
|
|
|
|
|
| |
This is generally terrible: see #16025. In short, we previously just blindly
used an un-prefixed ld for LD_NO_GOLD. This is blatantly wrong. Ideally we would
actually verify that ld.gold is indeed broken (by binutils #22266) before
insisting on using another linker but sadly we cannot do so when cross-compiling
since this would require running host code.
For now we simply disable the LD_NO_GOLD logic when cross-compiling and hope
that the user has verified that their ld.gold isn't affected by #22266.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Current versions of Alex don't seem to produce as many warnings any
more.
In order to silence a warning and to avoid overlong lines, I've taken
the liberty of refactoring 'tok_num'.
Test Plan: ./validate
Reviewers: bgamari, simonmar
Reviewed By: simonmar
Subscribers: erikd, rwbarton, carter
Differential Revision: https://phabricator.haskell.org/D5319
|
|
|
|
|
|
|
| |
When we use a git subtree, .git is a file, not a directory.
The script was already fixed for the commit ID but not for its date.
PR: https://github.com/ghc/ghc/pull/212/
|
|
|
|
| |
PR: https://github.com/ghc/ghc/pull/198/
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Reported-by: Evan Laforge
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Reviewers: bgamari
Subscribers: rwbarton, erikd, carter
Differential Revision: https://phabricator.haskell.org/D5171
|
|
|
|
|
|
|
| |
This commit was never properly justified and relies on the existence of
libatomic, which doesn't appear to exist on Darwin.
This reverts commit ec9aacf3eb2975fd302609163aaef429962ecd87.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: When using a Git worktree, ".git" is a file, not a directory
Reviewers: bgamari, monoidal
Reviewed By: monoidal
Subscribers: rwbarton, thomie, erikd, carter
Differential Revision: https://phabricator.haskell.org/D5016
|
|
|
|
|
|
|
|
|
|
| |
Two minor changes:
- 32-bit CPU macro is called riscv32_HOST_ARCH (was riscv_HOST_ARCH)
- shrink understood tuples from riscv* to riscv-* and riscv32*-* as
a tiny safeguard against riscv128*- in future.
Suggested-by: James Clarke <jrtc27@jrtc27.com>
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
|
|
|
|
|
| |
Tested on riscv64-unknown-linux-gnu tuple.
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: Tested on armv6, armv7 and aarch64 on FreeBSD 12-CURRENT.
Reviewers: bgamari
Reviewed By: bgamari
Subscribers: rwbarton, thomie, erikd, carter
Differential Revision: https://phabricator.haskell.org/D4810
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Clang throws a warning instead of an error when it is passed -no-pie,
clang: warning: argument unused during compilation: '-nopie'
[-Wunused-command-line-argument]
Consequently configure concludes that it supports -no-pie. However, this
will fail when used with -Werror. The solution is to simply use -Werror
in the configure check.
Thanks to @goldfire for reporting this.
Reviewers: hvr
Subscribers: thomie, carter, goldfire
Differential Revision: https://phabricator.haskell.org/D4557
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This patch affects several files that affect how we detect mingw and perl
on Windows. The initial motivation is:
https://github.com/snowleopard/hadrian/issues/564
where, with Hadrian building relocatable (non-inplace) GHCs, the current
detection mechanism falls short by e.g only trying $topdir/../mingw. But
in Hadrian, for reasons given in that issue, we would need to store e.g mingw
under $topdir/../../mingw except for binary distributions, where we want
to follow the existing structure, in which case $topdir/../mingw is correct. So
we need to support both, which is what this patch hopefully implements.
Test Plan: ./validate
Reviewers: Phyx, hvr, bgamari, erikd
Reviewed By: Phyx
Subscribers: snowleopard, thomie, carter
Differential Revision: https://phabricator.haskell.org/D4598
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: Try running configure on Windows with msys and mingw
toolchains
Reviewers: Phyx, hvr
Reviewed By: Phyx
Subscribers: rwbarton, thomie, erikd, carter
Differential Revision: https://phabricator.haskell.org/D4526
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: hvr, bgamari, angerman
Reviewed By: angerman
Subscribers: rwbarton, thomie, erikd, carter, angerman
Differential Revision: https://phabricator.haskell.org/D4513
|
|
|
|
|
|
|
|
|
|
| |
Summary: OpenIndiana apparently reports a triple of i386-pc-solaris2.11.
Reviewers: hvr
Subscribers: rwbarton, thomie, erikd, carter
Differential Revision: https://phabricator.haskell.org/D4487
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ghc treats OSUnknown (and GNU/Hurd) as non-ELF target.
This causes panic in native codegenerator when trying
to build PIC code:
```
...
-- all other platforms
howToAccessLabel dflags _ _ _ _ _
| not (positionIndependent dflags)
= AccessDirectly
| otherwise
= panic "howToAccessLabel: PIC not defined for this platform"
```
This change declares new 'OSHurd' and marks it as an
ELF target. Fixes building ghc-stage2 on i686-unknown-gnu0.9.
Patch provided by "Pino" via Samuel Thibault and taken from
debian.
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Running plain ./configure fails on hurd because
./config.guess reports unrecognised tuple:
$ ./config.guess
i686-unknown-gnu0.9
The change makes the following target configure:
$ ./configure --target=i686-unknown-gnu0.9
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
|
|
|
|
|
|
|
| |
Reviewers: hvr
Subscribers: rwbarton, thomie, erikd, carter
Differential Revision: https://phabricator.haskell.org/D4483
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: `./configure --disable-ld-override; make; make install`
Reviewers: trofi, hvr
Reviewed By: trofi
Subscribers: rwbarton, thomie, erikd, carter, simonmar
GHC Trac Issues: #14675
Differential Revision: https://phabricator.haskell.org/D4448
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
ld.gold is buggy when using -r and a linker script. See upstream bug
https://sourceware.org/bugzilla/show_bug.cgi?id=22266
This has been causing various brokenness for the GHC runtime linker,
where we load these broken object files.
Test Plan: Test program from #14675
Reviewers: bgamari, RyanGlScott, alpmestan, hvr, erikd
Subscribers: rwbarton, thomie, erikd, carter
GHC Trac Issues: #14328, #14675, #14291
Differential Revision: https://phabricator.haskell.org/D4431
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: bgamari, hvr
Reviewed By: bgamari
Subscribers: erikd, hvr, rwbarton, thomie, carter
Differential Revision: https://phabricator.haskell.org/D4378
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GCC's __sync primitives apparently "usually" imply a full barrier,
meaning they can be used to emulate the more precise C11 atomics albeit
with a loss of efficiency. This restores compatibility with GCC 4.4.
This partially reverts commit 59de290928e6903337f31c1f8107ac8a98ea145d.
Test Plan: Validate on Centos
Reviewers: hvr, simonmar, trommler
Subscribers: rwbarton, thomie, erikd, carter
GHC Trac Issues: #14244
Differential Revision: https://phabricator.haskell.org/D4364
|
|
|
|
|
|
|
|
|
| |
With this change unregisterised port can already produce minimal
executables:
ELF 32-bit LSB executable, Altera Nios II, version 1 (SYSV),
dynamically linked, interpreter /lib/ld-linux-nios2.so.1
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
FP_PROG_AR_ARGS appears to be probing for what flags to use to build an
archive with an index. However, none of the flags that it probed
previously were valid as they all started with `c`, which isn't a mode
character. This went unnoticed until someone attempted to use LLVM ar
since we have a special case for gnu ar.
Additionally, we work around a bug in llvm-ar 5.0 where ar will exit
with code 0 even if it fails to parse the command line. Silliness.
I believe these should rather all be mode `q` however I'll need to test
this on a few platforms to be certain.
Test Plan: Validate on OS X, BSD, and Linux with binutils and llvm ar
Reviewers: hvr
Subscribers: rwbarton, thomie, erikd
Differential Revision: https://phabricator.haskell.org/D4214
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is in preparation for cabalification of the `rts`. To be actually
able to parse this file, a rather recent Cabal is required. One after
commit 357d49d of haskell/cabal. The relevant PR to support the new
`asm-sources` and `cmm-sources` is haskell/cabal/pull/4857.
Not that this does *not* allow cabal to build the RTS. It does however
provide enough information such that cabal can `copy` and `register`
the package properly in the package database, if all the build
artifacts have been build properly.
As such it does not require any custom handling of the `rts` package.
As the rts as well as all the other packages built by the GHC built
system are built outside of cabal anyway.
Reviewers: bgamari, hvr, erikd, simonmar
Reviewed By: bgamari
Subscribers: rwbarton, thomie, erikd
Differential Revision: https://phabricator.haskell.org/D4174
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixing #14244 required the newer gcc atomic built-ins that are provided
from 4.7 and up. This updates the test to check for minimum gcc version
4.7.
The version tests for 3.4 (!), 4.4, and 4.6 are no longer needed and can
be removed. This makes the build system simpler.
Test Plan: validate
Reviewers: austin, bgamari, hvr, simonmar
Reviewed By: bgamari
Subscribers: rwbarton, thomie, erikd
Differential Revision: https://phabricator.haskell.org/D4165
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It seems that some Apple LLVM wrappers emit multiple messages containing
the string "version", which we previously used to find the version
number. For instance,
Configured with: --prefix=/Applications/Xcode.app/Contents/...
Apple LLVM version 9.0.0 (clang-900.0.37)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/...
Found CUDA installation: /usr/local/cuda, version 8.0
We now take care to only look at the first occurrence of this string.
New `sed` command due to @merijn.
Test Plan: Validate on all the compilers
Reviewers: austin, hvr
Subscribers: rwbarton, thomie, merijn, erikd
Differential Revision: https://phabricator.haskell.org/D4069
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
For some reson, the `*`, that was supposed to be in D4031
got lost in the diff.
Reviewers: bgamari, austin, hvr, dfeuer
Reviewed By: dfeuer
Subscribers: rwbarton, thomie, erikd
Differential Revision: https://phabricator.haskell.org/D4044
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously if we had both ld.lld and ld.gold installed but a gcc which
didn't support -fuse-ld=lld we would fail when trying ld.lld and fall
immediately back to plain ld. Now we will try ld.gold as well. This was
brought to light by #14280, where using ld.bfd resulted in a broken
stage2 compiler.
Test Plan: Configure
Reviewers: angerman, hvr, austin
Reviewed By: angerman
Subscribers: rwbarton, thomie, erikd
GHC Trac Issues: #14280
Differential Revision: https://phabricator.haskell.org/D4038
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Our usual GHC_CONVERT_OS macro, will turn any andoird* into android.
This however drops the essential androideabi part. As such for the
GHC_LLVM_TARGET we only convert the VENDOR, not the OS.
Reviewers: bgamari, austin, hvr
Reviewed By: bgamari
Subscribers: rwbarton, thomie, erikd
Differential Revision: https://phabricator.haskell.org/D4031
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously we didn't specify the prog-not-found value passed to
AC_CHECK_TOOLS. Reported by @snowleopard in
https://github.com/snowleopard/hadrian/issues/415.
Test Plan: validate
Reviewers: austin, hvr
Subscribers: rwbarton, thomie, snowleopard, erikd
Differential Revision: https://phabricator.haskell.org/D3992
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This fixes hadrian#420 (https://github.com/snowleopard/hadrian/issues/420)
specifically the "Unknown OS mingw64".
Reviewers: austin, hvr, bgamari, Phyx
Reviewed By: Phyx
Subscribers: rwbarton, thomie, erikd
Differential Revision: https://phabricator.haskell.org/D4016
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Ar was being checked twice prior to D3883 where I removed one of the checks
because the converted path was being overridden after the check because of
the second check for Ar. However the one in configure.ac was a target check
so I'm changing the path check to a target check now.
Test Plan: ./configure
Reviewers: angerman, austin, hvr, bgamari
Reviewed By: bgamari
Subscribers: rwbarton, thomie, erikd
GHC Trac Issues: #14274
Differential Revision: https://phabricator.haskell.org/D4020
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This should help resolve the
compilcation that came up in Trac #14261
Test Plan: validate on various platforms
Reviewers: trofi, bgamari, austin, hvr
Reviewed By: trofi
Subscribers: rwbarton, thomie, erikd
GHC Trac Issues: #14261
Differential Revision: https://phabricator.haskell.org/D4004
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The only reason I noticed is warning these lines on linux:
```
$ ./configure --target=sparc-unknown-linux-gnu
...
./configure: line 9708: cygpath: command not found
./configure: line 9708: ArCmd: command not found
```
POSIX shell syntax requires no spaces in assignments.
Fixed guarding condition while at it.
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Hopefully we can get rid of libtool, by using ar only
Depends on: D3579
Test Plan: validate
Reviewers: austin, hvr, bgamari, erikd
Reviewed By: bgamari
Subscribers: rwbarton, thomie, erikd
Differential Revision: https://phabricator.haskell.org/D3721
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As far as GHC is concerned, iOS **is** Darwin, and
Android **is** Linux.
Depends on D3352
Reviewers: austin, hvr, bgamari
Reviewed By: bgamari
Subscribers: Ericson2314, ryantrinkle, rwbarton, thomie, erikd
Differential Revision: https://phabricator.haskell.org/D3579
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The LLVM backend shells out to LLVMs `opt` and `llc` tools. This clean
up introduces a shared data structure to carry the arguments we pass to
each tool so that corresponding flags are next to each other. It drops
the hard coded data layouts in favor of using `-mtriple` and have LLVM
infer them. Furthermore we add `clang` as a proper tool, so we don't
rely on assuming that `clang` is called `clang` on the `PATH` when using
`clang` as the assembler. Finally this diff also changes the type of
`optLevel` from `Int` to `Word`, as we do not have negative optimization
levels.
Reviewers: erikd, hvr, austin, rwbarton, bgamari, kavon
Reviewed By: kavon
Subscribers: michalt, Ericson2314, ryantrinkle, dfeuer, carter, simonpj,
kavon, simonmar, thomie, erikd, snowleopard
Differential Revision: https://phabricator.haskell.org/D3352
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This tool can be used to generate dll's for any list of object files
given to it. It will then repartition them automatically to fit within
a dll and generates as many dll's as needed to do this. Cyclic dependencies
between these generated dlls are handle automatically so there is no need
to tell it how to partition.
It is also a lot more general than `dll-split` as it is able to split any
package not just `libGHC`. It also uses a trick using GNU style import libraries
to hide the splitting from the rest of the pipeline. Which means come linking time
you don't need to know which dll contains what symbol or how many split dlls were
created.
The import libraries are by default created with libtool. However since libtool is BFD
based it is very slow. So if present and detected by configure the `genlib` tool
from the msys2 project is used. This makes a difference of about ~45 minutes when compiling.
To install `genlib` run `pacman -Sy mingw-w64-$(uname -m)-tools-git`.
More detailed explaination of the process can be found here
https://ghc.haskell.org/trac/ghc/wiki/WindowsDynamicLinking
Test Plan: ./validate
Reviewers: austin, hvr, bgamari, erikd, simonmar
Reviewed By: bgamari
Subscribers: snowleopard, rwbarton, thomie, erikd, #ghc_windows_task_force
GHC Trac Issues: #5987
Differential Revision: https://phabricator.haskell.org/D3883
|
|
|
|
| |
This broke in the fix for #13541.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If you have ld.gold and ld.lld, then ld.gold will be selected by the
detection logic. This patch prioritizes lld by changing the order. The
rationale for checking lld first is that it's (right now) not part of,
say, a default Linux distro installation and if it's available, it's
very likely that it was installed explicitly and should be seen as a
sign of preference. On FreeBSD LLVM is the (default) base toolchain and
the changed order makes sense there as well, since ld.gold can be
available in /usr/local via ports/pkg. I don't have access to macOS and
can't say anything about their LLVM toolchain.
At some point we could add a check for LD=ld.lld or LD=ld.gold as an
optional override to explicitly select a linker.
Since I cannot really remove gcc on Linux, this was the only way to
configure GHC to use ld.lld.
Reviewers: austin, hvr, bgamari
Reviewed By: bgamari
Subscribers: rwbarton, thomie, erikd
Tags: PHID-PROJ-5azim3sqhsf7wzvlvaag
Differential Revision: https://phabricator.haskell.org/D3790
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously GHC would always assume that section types began with `@` while
producing assembly, which is not true. For instance, in ARM assembly syntax
section types begin with `%`. This abstracts out section type pretty-printing
and adjusts it to correctly account for the target architectures assembly
flavor.
Reviewers: austin, hvr, Phyx
Reviewed By: Phyx
Subscribers: Phyx, rwbarton, thomie, erikd
GHC Trac Issues: #13937
Differential Revision: https://phabricator.haskell.org/D3712
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously if we found an unusable linker in PATH (e.g. ld.lld on OS X)
we would notice the -fuse-ld=... was broken, but neglected to reset LD
to a usable linker. This resulted in brokenness on OS X when lld is in
PATH.
Test Plan: Validate on OS X with lld in PATH
Reviewers: austin, hvr, angerman
Reviewed By: angerman
Subscribers: rwbarton, thomie, erikd, angerman
GHC Trac Issues: #13541
Differential Revision: https://phabricator.haskell.org/D3713
|