| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We only support building GHC on mys2 nowadays, see
https://ghc.haskell.org/trac/ghc/wiki/Building/Preparation/Windows.
This (partially) reverts various commits from a few years ago, among which:
* 5775d5142da227d65fb86994d363eb16841ee642
"Add OSTYPE build-system variable, and use it"
* 3fb8c431824aa2f3bd979e35d1a283546fcfbe74
"Fix building libgmp on cygwin"
* cdbb4720c424500adb57cbbef69721d0b039fa46
"Fix cmd invocation by libffi cuild system on Windows 7 cygwin"
* e8121501ee3549a35e954726ccfd871ac9d51f83
"Fix dblatex and xml* tool detection on Windows"
Reviewed by: austin, Phyx
Differential Revision: https://phabricator.haskell.org/D1155
|
|
|
|
|
|
|
|
|
|
|
| |
And remove unused imports and language pragmas.
I checked that the minimum Happy and Alex version requirements, as
listed in aclocal.m4, don't have to change. Before building ghc, I ran:
- cabal install happy==1.19.4 --with-ghc=ghc-7.8.4
- cabal install alex==3.1.0 --with-ghc=ghc-7.6.3
Differential Revision: https://phabricator.haskell.org/D1032
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Extend the PowerPC 32-bit native code generator for "64-bit
PowerPC ELF Application Binary Interface Supplement 1.9" by
Ian Lance Taylor and "Power Architecture 64-Bit ELF V2 ABI Specification --
OpenPOWER ABI for Linux Supplement" by IBM.
The latter ABI is mainly used on POWER7/7+ and POWER8
Linux systems running in little-endian mode. The code generator
supports both static and dynamic linking. PowerPC 64-bit
code for ELF ABI 1.9 and 2 is mostly position independent
anyway, and thus so is all the code emitted by the code
generator. In other words, -fPIC does not make a difference.
rts/stg/SMP.h support is implemented.
Following the spirit of the introductory comment in
PPC/CodeGen.hs, the rest of the code is a straightforward
extension of the 32-bit implementation.
Limitations:
* Code is generated only in the medium code model, which
is also gcc's default
* Local symbols are not accessed directly, which seems to
also be the case for 32-bit
* LLVM does not work, but this does not work on 32-bit either
* Must use the system runtime linker in GHCi, because the
GHC linker for "static" object files (rts/Linker.c) for
PPC 64-bit is not implemented. The system runtime
(dynamic) linker works.
* The handling of the system stack (register 1) is not ELF-
compliant so stack traces break. Instead of allocating a new
stack frame, spill code should use the "official" spill area
in the current stack frame and deallocation code should restore
the back chain
* DWARF support is missing
Fixes #9863
Test Plan: validate (on powerpc, too)
Reviewers: simonmar, trofi, erikd, austin
Reviewed By: trofi
Subscribers: bgamari, arnons1, kgardas, thomie
Differential Revision: https://phabricator.haskell.org/D629
GHC Trac Issues: #9863
|
|
|
|
|
|
|
|
| |
Observed on a tuple armv7a-hardfloat-linux-gnueabi:
> Unknown vendor hardfloat
Reported-by: Sergey Alirzaev
Signed-off-by: Sergei Trofimovich <siarheit@google.com>
|
|
|
|
|
|
|
| |
This was supposed to be part of commit 63a10bbc42 but I pushed
from the wrong machine. This fixes cross compiling to arm.
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test `T703` was found to be failing on arm/linux. The solution
was to add a linker flag to explicitly set the stack to
non-executable.
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
Test Plan: validate on x86_64 and arm linux
Reviewers: ezyang, rwbarton, austin
Subscribers: bgamari, thomie
Differential Revision: https://phabricator.haskell.org/D875
GHC Trac Issues: #10369
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Like 32 bit Arm, Aarch64 requires use of the gold linker.
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
Test Plan: 'make install' on aarch64, validate elsewhere
Reviewers: rwbarton, bgamari, austin
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D858
GHC Trac Issues: #9673
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GHC build system have custom autoconf check for `create_timer()`
function from librt. Check description says that it checks for
`CLOCK_REALTIME` timer, but checking code also checks for
`CLOCK_PROCESS_CPUTIME_ID` timer, which is not commonly present (for
example, FreeBSD doesn't have it). This makes whole check fail despite
the fact that FreeBSD have `create_timer()` call and supports
`CLOCK_REALTIME`. As a consequence, GHC RTS falls back to using SIGALRM
for its timing machinery. Not only it's very ancient codepath, it also
break some FFI bindings to C code that isn't prepared for syscall
interruption caused by SIGALRM delivery.
Grepping through ghc source code reveals that `USE_TIMER_CREATE`
defininition in the config.h doesn't imply having
`CLOCK_PROCESS_CPUTIME_ID`. The only place where
`CLOCK_PROCESS_CPUTIME_ID` is used is rts/posix/GetTime.c and this code
handles the absence of `CLOCK_PROCESS_CPUTIME_ID` gracefully.
This patch makes autoconf checking code to check only for
`timer_create(CLOCK_REALTIME, ...)` and fixes check description.
Reviewed By: austin
Differential Revision: https://phabricator.haskell.org/D831
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* distrib/configure.ac.in : Detect correct version of LLVM tools as
was done for the top level configure.ac in 42448e3757.
* aclocal.m4 : Add a FIND_LD macro that can be used in both
configure scripts.
* Use new FIND_LD macro in both configure scripts.
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
Test Plan: validate on amd64-linux and armhf-linux.
Reviewers: rwbarton, austin
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D828
GHC Trac Issues: #10234
|
| |
|
|
|
|
|
|
|
|
|
| |
By mistake, the Git-commit-id detection was only enabled for
`RELEASE=NO` (since the date-based GHC version computation is
only active in that case). With this commit the commit-id
detection is active regardless of the `RELEASE`-setting.
This is a follow-up to 73e5e2f8bade2d8b2b1ecae958fe12d0b24591ef
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The LLVM developers seem to make breaking changes in the LLVM IR
language between major releases. As a consumer of the LLVM tools
GHC now needs to be locked more tightly to a single version of
the LLVM tools.
GHC HEAD currently only supports LLVM version 3.6. This commit
changes the configure script to look for `llc-3.6` and `opt-3.6`
before looking for `llc` and `opt`. If the former are not found,
but the later are, check that they actually are version 3.6.
At the same time, when detecting known problems with the LLVM
tools (ie #9439) test for it using the versions of the LLVM tools
retrieved from the bootstrap compiler's settings file.
Test Plan: Manual testing.
Reviewers: thomie, rwbarton, nomeata, austin
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D745
GHC Trac Issues: #10170
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixes #8976 and #9873 by making use of the Binutils ld.gold
linker explicit whenever the target is linux/ARM or android/ARM.
This does not affect iOS where Apple provides its own linker.
In order to achieve this, we need to add `-fuse-ld=gold` to
the SettingsCCompilerLinkFlags setting and set
SettingsLdCommand to `ld.gold` (or `${target}-ld.gold` when
cross-compiling). In addition, simplifying the use of
`$(CONF_GCC_LINKER_OPTS_STAGEn)`.
This patch was tested by ensuring that the following worked
as expected:
* Native builds on linux/x86_64 (nothing changed).
* Native builds on linux/arm (and uses the gold linker).
* Linux to linux/arm cross compiles (and uses the cross
gold linker).
Contributions by Ben Gamari, Joachim Breitner and Reid Barton.
Reviewers: nomeata, bgamari, austin, rwbarton
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D715
GHC Trac Issues: #8976 #9873
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Four bug fixes and a little refactoring.
* `find -perm \mode` should be `find -perm /mode` (#9697)
* `find -regex '$3' should be `find -regex "$3"` (#7661)
From `man sh` on my system (Ubuntu 14.04):
"Enclosing characters in single quotes preserves the literal meaning of all
the characters ..."
* LlcCmd and OptCmd should be passed to ghc, using `-pgmlo` and `-pgmlc`, for
detection of #9439.
* -pgmlo and -pgmlc were undocumented because of an xml tag misplacement.
Test Plan:
The aclocal.m4 macro has seen about 10 iterations since its inception. Without a
testsuite, I can't guarantee this version is bug free either. It's all pretty
frustrating.
Reviewers: bgamari, austin
Reviewed By: austin
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D683
GHC Trac Issues: #9697, #7661, #9439
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
--with-curses-{includes,libraries} to libraries
Summary:
If curses is installed into some non-standard path, we currently have
to say something like the following in mk/build.mk:
libraries/terminfo_CONFIGURE_OPTS += \
--configure-option=--with-curses-includes=/somewhere/include \
--configure-option=--with-curses-libraries=/somewhere/lib
This is because the top-level configure does not accept nor propagate
--with-curses-{includes,libraries} to libraries while it does so for
iconv, gmp and libffi. It would be nice if curses were handled in the
same manner.
Test Plan: Install curses into some non-standard path. Then run the top-level "configure" script with options "--with-curses-includes=/path/to/curses/include" and "--with-curses-libraries=/path/to/curses/lib".
Reviewers: austin
Reviewed By: austin
Subscribers: thomie, PHO
Differential Revision: https://phabricator.haskell.org/D665
GHC Trac Issues: #10096
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: carter, austin
Reviewed By: austin
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D648
GHC Trac Issues: #9094
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: austin, erikd
Reviewed By: erikd
Subscribers: erikd, carter, thomie
Projects: #ghc
Differential Revision: https://phabricator.haskell.org/D590
|
|
|
|
|
|
|
|
|
|
|
|
| |
Don't pass empty string `[]` as "action-if-not-given" to `AC_ARG_ENABLE()`
macro, as this would otherwise lead to an empty else-block in the resulting
bash `configure` script. This bug was introduced via cb0a503a.
This issue was pointed out by @christiaanb
Reviewed By: christiaanb
Differential Revision: https://phabricator.haskell.org/D545
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since we switched to a Git submodule based GHC Git repo, `ghc.git`'s
commit id uniquely identifies the state of the GHC source-tree. So
having that information embedded into the `ghc` executable provides
valuable information to track accurately (especially when created by
buildbots) from which source-tree-state a given `ghc` snapshot
(distribution) was generated.
So this commit adds a new field `"Project Git commit id"` to the
`ghc --info` meta-data containing the `./configure`-time Git commit id
as reported by `git rev-parse HEAD`.
This field can also be queried with `ghc --print-project-git-commit-id`.
For source distributions, the file `GIT_COMMIT_ID` is created (with some
sanity checking to detect stale commit ids, as that would render this
information rather useless)
Reviewed By: austin
Differential Revision: https://phabricator.haskell.org/D528
|
|
|
|
| |
Signed-off-by: Austin Seipp <austin@well-typed.com>
|
|
|
|
| |
Signed-off-by: Austin Seipp <austin@well-typed.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Patch does the following:
- fixes detection of working libbfd on modern linux
platforms (where bfd_uncompress_section_contents is a macro)
- disables 'bfd' by default and adds '--enable-bfd-debug'
configure option. As bfd's ABI is unstable
the feature is primarily useful by ghc hackers.
Not done (subject for another patch):
- one-time bfd object memory leak in DEBUG_LoadSymbols
- in '-dynamic' mode debugging symbols are loaded only for
current executable, not all libraries it is linked against.
Fixes Issue #8790
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Test Plan: built unregisterised ghc on amd64 and ran './hello +RTS -Di' there
Reviewers: simonmar, austin
Reviewed By: simonmar, austin
Subscribers: thomie, simonmar, ezyang, carter
Differential Revision: https://phabricator.haskell.org/D193
GHC Trac Issues: #8790
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This exposes the `cProjectPatchLevel{1,2}` value at the CPP level to
allow it to be used in CPP conditionals. Concretely, GHC 7.10.2.20150623
would result in
#define __GLASGOW_HASKELL__ 710
#define __GLASGOW_HASKELL_PATCHLEVEL1__ 2
#define __GLASGOW_HASKELL_PATCHLEVEL2__ 20150623
while GHC 7.10.3 results in
#define __GLASGOW_HASKELL__ 710
#define __GLASGOW_HASKELL_PATCHLEVEL1__ 3
and finally GHC 7.9.20141009 results in
#define __GLASGOW_HASKELL__ 709
#define __GLASGOW_HASKELL_PATCHLEVEL1__ 20141009
As it's error-prone to properly express CPP conditionals for testing GHC
multi-component versions, a new macro `MIN_VERSION_GLASGOW_HASKELL()` is
provided (also via the new CPP include file `ghcversion.h`)
Finally, in order to make it easier to define the new CPP macro
`MIN_VERSION_GLASGOW_HASKELL()`, a new default-included
`include/ghcversion.h` is used for the new CPP definitions.
Reviewed By: ekmett, austin, #ghc
Differential Revision: https://phabricator.haskell.org/D66
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
"./configure --target=TARGET" was broken; it would use the host gcc.
(So you had to explicitly specify "--with-gcc=TARGET-gcc" also,
as a workaround.)
This was broken by commit fc4856f9e811d9a23ae9212f43a09ddf5ef12b26
for #8148. A comment claimed that FP_ARG_WITH_PATH_GNU_PROG_OPTIONAL
was the same as FP_ARG_WITH_PATH_GNU_PROG except for not raising
an error when the program isn't found; but that wasn't true --
the former didn't prepend the target name when cross-compiling.
We actually need three versions of FP_ARG_WITH_PATH_GNU_PROG since
the LLVM tools are usually not prefixed with the target name even
when cross-compiling. So I generalized the logic in a single macro.
Test Plan:
Built with "./configure --target=i386-unknown-linux"
and BuildFlavour=quick, successfully
Reviewers: ezyang, austin
Reviewed By: ezyang, austin
Subscribers: simonmar, ezyang, carter
Differential Revision: https://phabricator.haskell.org/D204
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This includes pretty much all the changes needed to make `Applicative`
a superclass of `Monad` finally. There's mostly reshuffling in the
interests of avoid orphans and boot files, but luckily we can resolve
all of them, pretty much. The only catch was that
Alternative/MonadPlus also had to go into Prelude to avoid this.
As a result, we must update the hsc2hs and haddock submodules.
Signed-off-by: Austin Seipp <austin@well-typed.com>
Test Plan: Build things, they might not explode horribly.
Reviewers: hvr, simonmar
Subscribers: simonmar
Differential Revision: https://phabricator.haskell.org/D13
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
LLVM llc and opt commands should be set on all platforms, including
Windows. If they're not, GHC tries to execute an unnamed executable,
resulting in error messages such as:
Error (figuring out LLVM version): : runInteractiveProcess: invalid argument (Invalid argument)
<no location info>:
Warning: Couldn't figure out LLVM version!
Make sure you have installed LLVM
This regression was introduced in e6bfc596.
Test Plan: Build GHC and test if --info shows sensible values of "LLVM llc command" and "LLVM opt command"
Reviewers: austin, #ghc
Reviewed By: austin, #ghc
Subscribers: austin
Projects: #ghc
Differential Revision: https://phabricator.haskell.org/D190
GHC Trac Issues: #7143
|
|
|
|
|
|
| |
It turned out the sed(1) expressions are not fully portable. So revist my
earlier attempt for getting GHC_LDFLAGS in the configure script and rewrite
it in Perl instead.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Solaris 11 distributed GNU C 4.5.x is configured in a way that its
CPP is not working well while invoked from GHC. GHC runs it with
-x assembler-with-cpp and in this particular configuration GNU C CPP
does not provide any line-markers so GHC's output of errors or warnings
is confusing since it points to preprocessed file in /tmp and not
to the original Haskell file. Fortunately old GNU C 3.4.x is still
provided by the OS and when installed it'll be used automatically
as GHC CPP which is whole logic of this patch. So although we use modern
GCC as a C compiler and assembler we use old GCC as a C preprocessor.
Test Plan: validate
Reviewers: austin
Reviewed By: austin
Subscribers: phaskell, simonmar, relrod, ezyang, carter
Differential Revision: https://phabricator.haskell.org/D151
|
| |
|
|
|
|
|
|
| |
Fixes #9363.
Signed-off-by: Austin Seipp <austin@well-typed.com>
|
|
|
|
|
|
|
| |
The recent version of ghc-prim assumes a more modern processor as it
exploits built-in atomic operations, and some of them are not yet
present on i486. Hence the -march flag is explicitly set to i686 for the
C compiler -- just to be in sync with the default of other distributions.
|
|
|
|
| |
Signed-off-by: Austin Seipp <austin@well-typed.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
this set of patches adds support for x86_64-solaris2 platform
Solaris is multi-lib platform which means it provides 32bit user-land together
with 32bit and 64bit libraries. The 32bit libraries are located in <somewhere>/lib
directories while 64bit libraries are located in <somewhere>/lib/64 directories.
This is why GHCi required the fix since otherwise it'll attempt to load
/usr/lib/libgmp.so which is 32bit library into 64bit binary process space (GHCi).
This of course fails with wrong ELFCLASS32 error message.
Another issue was that by default GNU C distributed with Solaris compiles
into 32bit binary. We need to enforce compilation to 64bit binary
by adding appropriate -m64 option.
Test Plan: already built on x86_64-solaris2
Reviewers: austin
Reviewed By: austin
Subscribers: phaskell, simonmar, relrod, carter
Differential Revision: https://phabricator.haskell.org/D68
|
|
|
|
| |
Signed-off-by: Austin Seipp <austin@well-typed.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Allow the CPP program and flag choices for GHC
be configured via the the ghc settings file
Test Plan: ran validate yesterday
Reviewers: hvr, austin, mzero, simonmar
Reviewed By: austin, mzero, simonmar
Subscribers: mzero, simonmar, relrod, carter
Differential Revision: https://phabricator.haskell.org/D26
|
|
|
|
| |
Signed-off-by: Austin Seipp <austin@well-typed.com>
|
|
|
|
|
|
|
|
|
|
| |
This is ArchUnknown for now, as it requires some porting work over and
above powerpc64 due to such things as the different function calling
sequence in the ELFv2 ABI. For now, an unregisterised port is better
than nothing.
Signed-off-by: Colin Watson <cjwatson@debian.org>
Signed-off-by: Austin Seipp <austin@well-typed.com>
|
|
|
|
| |
Signed-off-by: Austin Seipp <austin@well-typed.com>
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
(#8795)
Signed-off-by: Austin Seipp <austin@well-typed.com>
|
| |
|
|
|
|
|
|
|
|
| |
Haddock no longer has a generated parser, so we don't need it in the
sdist and we certainly don't want to check for it in the ./configure
script (as that would be bogus.)
Signed-off-by: Austin Seipp <austin@well-typed.com>
|
|
|
|
| |
Version of Happy required is now 1.19.
|
|
|
|
|
|
|
|
|
|
|
|
| |
In 6579a6c we removed existing comparison primops and introduced new ones
returning Int# instead of Bool. This commit (and associated commits in
array, base, dph, ghc-prim, integer-gmp, integer-simple, primitive, testsuite and
template-haskell) restores old names of primops. This allows us to keep
our API cleaner at the price of not having backwards compatibility.
This patch also temporalily disables fix for #8317 (optimization of
tagToEnum# at Core level). We need to fix #8326 first, otherwise
our primops code will be very slow.
|
|
|
|
| |
This is temporary until new bool primops have been pushed.
|
|
|
|
| |
* This partially fixes #8148. However, --with-ghc-4.8 will still not work given the rather dubious m4 macros and the failures in the test suite due to '-nodefaultlibs' still need to be fixed.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
iOS has some particular constraints about how applications can be built:
* We must generate a static library (.a) since XCode does the final
link.
* We need to carefully give the right set of arguments to libtool in
the case we're generating an archive.
* Dynamic linking isn't supported.
* It can only be done on OS X.
This patch cleans up all of the above. We add a new flag `-staticlib`
(only supported on Darwin) that allows us to produce archive files using
libtool, and a -pgmlibtool flag to control which 'libtool' executable to
use.
This fixes #8127. I believe this is the last piece missing from the iOS
cross compiler.
Authored-by: Luke Iannini <lukexi@me.com>
Authored-by: Maxwell Swadling <maxwellswadling@gmail.com>
Authored-by: Stephen Blackheath <...@blacksapphire.com>
Signed-off-by: Austin Seipp <aseipp@pobox.com>
|
|
|
|
| |
Signed-off-by: Austin Seipp <aseipp@pobox.com>
|