| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
ghc-pkg needs to be aware of platforms so it can figure out which
subdire within the user package db to use. This is admittedly
roundabout, but maybe Cabal could use the same notion of a platform as
GHC to good affect too.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As far as I can tell, the fields within `Settings` aren't *intrinsicly*
related. They just happen to be initialized the same way (in particular
prior to the rest of `DynFlags`), and that is why they are grouped
together.
Within `Settings`, however, there are groups of settings that clearly do
share something in common, regardless of how they anything is
initialized.
In the spirit of GHC being a library, where the end cosumer may choose
to initialize this configuration in arbitrary ways, I made some new data
types for thoses groups internal to `Settings`, and used them to define
`Settings` instead. Hopefully this is a baby step towards a general
decoupling of the stateful and stateless parts of GHC.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This switches the compiler/ component to get compiled with
-XNoImplicitPrelude and a `import GhcPrelude` is inserted in all
modules.
This is motivated by the upcoming "Prelude" re-export of
`Semigroup((<>))` which would cause lots of name clashes in every
modulewhich imports also `Outputable`
Reviewers: austin, goldfire, bgamari, alanz, simonmar
Reviewed By: bgamari
Subscribers: goldfire, rwbarton, thomie, mpickering, bgamari
Differential Revision: https://phabricator.haskell.org/D3989
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
iOS at least since iOS8 (we are currently at iOS10.3), allows for
dynamic libaries, hence any artificail restriction on dyanmic
libraries should be lifted.
Please ping me with any iOS related issues that should potentially
resurface. The iOS toolchain has considerably changed over the
years, and I'm willing to drop work arounds in good faith.
Reviewers: bgamari, austin
Reviewed By: bgamari
Subscribers: rwbarton, thomie
GHC Trac Issues: #13559, #7722
Differential Revision: https://phabricator.haskell.org/D3451
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: GHC CI
Reviewers: austin, bgamari
Reviewed By: bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2915
GHC Trac Issues: #11040, #13049
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
DEC OSF/1 (aka Tru64 UNIX) has been discontinued a few years ago already[1].
This removes the undoubtedly bitrotten support for `OSOsf3 :: OS` from GHC's
code-base.
Support for `ArchAlpha :: Arch` may be removed at some later point, as there
may still be users out there running a more or less recent Linux/alpha
distribution on their more-than-a-decade old Alpha hardware...
[1]: https://en.wikipedia.org/wiki/Tru64_UNIX
|
|
|
|
|
|
|
|
|
|
|
|
| |
Explicitly pass "--no-relax" on ArchSPARC64
(as ArchSPARC does) where gcc's default specs
set "-mrelax" which conflicts with "-Wl,-r".
Known architecture will also help extending
sparc NCG support 64-bit ABI.
Signed-off-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Signed-off-by: Sergei Trofimovich <siarheit@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GHC needs to be aware of targetting AIX because
AIX requires some special handling for the toolchain
(similiar to Solaris)
Reviewers: austin, bgamari
Reviewed By: bgamari
Subscribers: thomie, erikd
Differential Revision: https://phabricator.haskell.org/D1501
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
* Throw an error when cross-compiling without a target definition.
When cross compiling via LLVM, a target 'datalayout' and 'triple' must
be defined or LLVM will generate code for the compile host instead of
the compile target.
* Add aarch64-unknown-linux-gnu target.
The datalayout and triple lines were found by using clang to compile a
small C program and -emit-llvm to get the LLVM IR output.
Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
Test Plan: validate
Reviewers: rwbarton, carter, hvr, bgamari, austin
Reviewed By: austin
Subscribers: carter, thomie, garious
Differential Revision: https://phabricator.haskell.org/D585
GHC Trac Issues: #9895
|
|
|
|
| |
Signed-off-by: Austin Seipp <austin@well-typed.com>
|
|
|
|
| |
Signed-off-by: Austin Seipp <austin@well-typed.com>
|
|
|
|
| |
Signed-off-by: Austin Seipp <austin@well-typed.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch encompasses most of the basic infrastructure for GHCJS. It
includes:
* A new extension, -XJavaScriptFFI
* A new architecture, ArchJavaScript
* Parser and lexer support for 'foreign import javascript', only
available under -XJavaScriptFFI, using ArchJavaScript.
* As a knock-on, there is also a new 'WayCustom' constructor in
DynFlags, so clients of the GHC API can add custom 'tags' to their
built files. This should be useful for other users as well.
The remaining changes are really just the resulting fallout, making sure
all the cases are handled appropriately for DynFlags and Platform.
Authored-by: Luite Stegeman <stegeman@gmail.com>
Signed-off-by: Austin Seipp <aseipp@pobox.com>
|
|
|
|
|
| |
On iOS, binaries are really static libraries, so we don't want to use
flags like -lm when linking them.
|
|
|
|
|
|
| |
LLVM supports PIC on ARM from what I can see.
Signed-off-by: Austin Seipp <aseipp@pobox.com>
|
| |
|
|
|
|
| |
Signed-off-by: David Terei <davidterei@gmail.com>
|
|
|
|
| |
Submitted by: Stephen Paul Weber <singpolyma@singpolyma.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts the compiler parts of
commit 7b594a5d7ac29972db39228e9c8b7f384313f39b
Author: David Terei <davidterei@gmail.com>
Date: Mon Nov 21 12:05:18 2011 -0800
Remove registerised code for dead architectures: mips, ia64, alpha,
hppa1, m68k
In particular, we want to know whether bewareLoadStoreAlignment should
return True or False for them.
It also reverts
commit 3fc68b5c356b39b2b52a86d953367d0021c13262
Author: Simon Marlow <marlowsd@gmail.com>
Date: Wed Jan 4 11:44:02 2012 +0000
Remove missing archs (mipseb, mipsel, alpha) (#5734)
It doesn't hurt to map these to ArchUnknown since we don't need to
know anything specific about them, and adding them would be a pain
(there are a bunch of places where we have to case-match on all the
arches to avoid warnings).
|
| |
|
|
|
|
|
|
| |
To explicitly choose whether you want an unregisterised build you now
need to use the "--enable-unregisterised"/"--disable-unregisterised"
configure flags.
|
| |
|
|
|
|
|
|
|
| |
This patch enhances Platform's ArchARM to include ARM ABI value. It also
tweaks configure machinery to detect hard-float ABI and to set it wherever
needed. Finally when hard-float ABI is in use, pass appropriate compiler
option to the LLVM's llc. Fixes #5914.
|
| |
|
| |
|
|
|
|
| |
Fixes: #5733
|
|
|
|
|
|
|
|
|
|
|
|
| |
Another portabilty regression: before Platform we used to use elf_OBJ_FORMAT:
#if linux_TARGET_OS || freebsd_TARGET_OS || openbsd_TARGET_OS || solaris2_TARGET_OS
#define elf_OBJ_FORMAT 1
#endif
which defaults to undefined on unknown platforms. Defaulting to
non-ELF is correct, it just means that we won't rely on ELF-specific
functionality. I've added a comment to explain that.
|
|
|
|
|
| |
Now target32bit works for all targets without any manual intervention,
as it should do. #5735 was a portability regression.
|
|
|
|
| |
.ident directives are usually ignored by as(1), and in some cases (like Darwin/PPC) they even raise an error.
|
|
|
|
|
| |
Based on a patch from Arnaud Degroote <degroote@NetBSD.org> in
trac #5480.
|
|
|
|
| |
hppa1, m68k
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
This reverts commit f75f26cc4eed3c3cfc256ebfb9e77b8e82a766fc.
On second thoughts, this does make sense, for unregisterised via-C
OSes at least.
|
|
|
|
|
|
|
| |
This reverts commit 2dea11a442e1d14d86fa661804de06a721943bf0.
On second thoughts, this does make sense, for unregisterised via-C
arches at least.
|
|
|
|
|
|
|
| |
It doesn't make sense. If platformArch is ArchUnknown then we don't know
the answer to any questions about the arch. So now if we don't recognise
the arch we just fail, and the new arch will need to be added to the
datatype.
|
|
|
|
|
|
| |
It doesn't make sense. If platformOS is OSUnknown then we don't know the
answer to any questions about the OS. So now if we don't recognise the
OS we just fail, and the new OS will need to be added to the datatype.
|
|
|
|
| |
And some knock-on changes
|
|
|
|
|
|
|
| |
This patch enhances ArchARM with ARM ISA and ISA extensions details
as is suggested in the comment in Platform.hs file. The patch is needed
by future patch which will use ARM ISA information in order to pass
appropriate command-line option to the LLVM llc tool.
|
| |
|
|
|
|
|
|
|
|
| |
It looks like where x86 assembly is using '@' character,
ARM assembly requires '%' character. This makes a problem in the patch
814edf44433801e37318ce79082ac6991dbc87dd 'Force re-linking if
the options have changed (#4451)' which makes linking assembly
file uncompilable on ARM. This patch fixes this.
|
|
|
|
|
| |
For now we panic in the OSUnknown case. It would probably be better
to make the enumerations complete instead, though.
|
| |
|
| |
|
| |
|