| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For reasons that I don't entirely understand we didn't previously detect
`strip` using autoconf. This naturally broke during cross-compilation.
How did this ever work? I have no idea.
Test Plan: Try cross-compiling
Reviewers: austin, hvr, angerman
Subscribers: rwbarton, thomie, erikd
Differential Revision: https://phabricator.haskell.org/D4008
|
|
|
|
|
|
| |
This isn't needed anymore as we don't support GHC < 8 anymore.
This is a follow-up to 122f183
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 temporarily disabled split-sections again on Windows because
of the overhead in linking it introduces. Unfortunately because BFD
is so slow a testsuite run gets almost 2x slower. Simply linking
Hello World takes an unacceptable long time.
So for now, it'll be disabled as we look into different linkers such
as LLD.
Test Plan: ./validate
Reviewers: austin, bgamari
Subscribers: rwbarton, thomie
GHC Trac Issues: #12913
Differential Revision: https://phabricator.haskell.org/D3731
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Initial implementation of split-section on Windows.
This also corrects section namings and uses the platform
convention of `$` instead of `.` to separate sections.
Implementation is based on @awson's patches to binutils.
Binutils requires some extra help when compiling the libraries
for GHCi usage. We drop the `-T` and use implicit scripts to amend
the linker scripts instead of replacing it.
Because of these very large GHCi object files, we need big-obj support,
which will be added by another patch.
Test Plan: ./validate
Reviewers: awson, austin, bgamari
Subscribers: dfeuer, rwbarton, thomie, snowleopard, #ghc_windows_task_force
GHC Trac Issues: #12913
Differential Revision: https://phabricator.haskell.org/D3383
|
|
|
|
|
|
|
|
|
|
|
| |
terminfo no longer needs to be able to find the ncurses headers.
See https://github.com/judah/terminfo/pull/22.
Reviewers: austin, hvr
Subscribers: rwbarton, thomie, erikd
Differential Revision: https://phabricator.haskell.org/D3688
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It's not a new behaviour. First it was introduced by
2d5372cfdc2236a77ec49df249f3379b93224e06
("lower -O2 optimization down to -O1 on UNREG") to fix build
failure on unregisterised powerpc64.
This time I've noticed build failures on unregisterised ia64.
The change was accidentally reverted by commit
14d0f7f1221db758cd06a69f53803d9d0150164a
("Build system: Add stage specific SRC_HC_(WARNING_)OPTS)
The revert happened due to the following code rearrangement:
ifeq "$(GhcUnregisterised)" "YES"
GhcStage1HcOpts=
GhcStage2HcOpts=
GhcStage3HcOpts=
endif
GhcUnregisterised=@Unregisterised@
As a result 'ifeq' part has no effect.
The change moves 'ifeq' down to the very end of file
and adds a note it depends on the 'GhcUnregisterised' variable.
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The change fixes case of installing cross-built GHC
from bindist (BINDIST=YES) on TARGET.
In this case we need to use TARGET tools in `INSTALLED_GHC{,_PKG}_REAL`.
The original change is provided by Fangrui Song
as pull request https://github.com/ghc/ghc/pull/34
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
DYNAMIC_GHC_PROGRAMS and GhcDynamic both tried to control whether
the ghc binary was built as a dynamic executable, with confusing
results. In particular, setting GhcDynamic=NO has no effect on
systems where DYNAMIC_GHC_PROGRAMS defaults to YES.
DYNAMIC_GHC_PROGRAMS is more fully-featured (it ensures that the
correct flavor of the libraries is built, for example) so let's
keep it and remove GhcDynamic to reduce confusion.
This effectively reverts commit 3c6190b0.
Test Plan: tested locally; harbormaster
Reviewers: simonmar, austin, bgamari
Reviewed By: bgamari
Subscribers: thomie, snowleopard
Differential Revision: https://phabricator.haskell.org/D3428
|
|
|
|
|
|
|
|
|
|
|
| |
HaveLibDL substitution was removed from configure.ac in 2014
with 9692393d7ba91a091c1e61b6754d79ad17c5f193 commit.
Noticed when scrolled through 'config.mk' which contained
unsunstituted assignment after './configure' run:
HaveLibDL = @HaveLibDL@
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Suppose we are crossbuilding ghc (when ghc-stage2
is a normal compiler for $target):
For this case 'make install' should install unprefixed
stage2 'ghc' and not '$(CorssCompilePrefix)-ghc'.
That way cross-built ghc is installable and
usable on target as if it would be built natively
on a target.
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
|
|
|
|
|
|
|
|
|
| |
$(CrossCompilePrefix) is used only in 'make install'
target filenames in $(DESTDIR). None of inplace (or boot)
files contain $(CrossCompilePrefix).
Thus we don't need to worry about phases.
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: austin, hvr, erikd
Reviewed By: erikd
Subscribers: rwbarton, thomie, erikd, snowleopard
Differential Revision: https://phabricator.haskell.org/D3367
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: Validate
Reviewers: angerman, austin, rwbarton
Subscribers: thomie, snowleopard
Differential Revision: https://phabricator.haskell.org/D3242
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a common thing that users who cross-compile must fight against.
It turns out that it's pretty straightforward to make is convenient.
Test Plan: Cross compile without a target `ncurses` available
Reviewers: danharaj, hvr, erikd, austin, rwbarton
Subscribers: rwbarton, thomie, snowleopard
Differential Revision: https://phabricator.haskell.org/D3177
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There ware some old file names (.lhs, ...) at comments.
* mk/config.mk.in
- compiler/hsSyn/HsExpr.lhs -> HsExpr.hs
* utils/ghc-pkg/Main.hs
- compiler/main/Packages.lhs -> Packages.hs
* utils/genapply/Main.hs
- CgRetConv.lhs -> * REMOVE THIS COMMENT (OLDER FILE THAN GHC6) *
- Constants.lhs -> Constants.hs
- compiler/codeGen/CgCallConv.lhs -> compiler/codeGen/StgCmmLayout.hs
- Apply.hc -> Apply.cmm
- HeapStackCheck.hc -> HeapStackCheck.cmm
Reviewers: mpickering, austin, bgamari
Reviewed By: bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D3077
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit 266a9dc4c changed = to := in one place in mk/config.mk.in.
This broke SupportsSplitSections because the variable LdIsGNULd
that it depends on is not defined until later in the file.
Test Plan: pushed to a wip/ branch for perf to build
Reviewers: DemiMarie, austin, bgamari, mpickering
Reviewed By: mpickering
Subscribers: mpickering, thomie
Differential Revision: https://phabricator.haskell.org/D3070
GHC Trac Issues: #13230
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: GHC CI
Reviewers: austin, bgamari
Reviewed By: bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2879
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Power ISA says the result of a division by zero is undefined. So
ignore stdout on PowerPC 64-bit systems.
Disable ext-interp tests on 64-bit PowerPC. We don't have support for
PowerPC 64-bit ELF in the RTS linker, which is needed for the external
interpreter.
Test Plan: ./validate
Reviewers: austin, simonmar, hvr, erikd, bgamari
Reviewed By: bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2782
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On non-windows platforms with GNU ld, enable SplitSections in the GHC
build by default.
Reviewers: austin, bgamari
Reviewed By: bgamari
Subscribers: DemiMarie, thomie
Differential Revision: https://phabricator.haskell.org/D1800
GHC Trac Issues: #11445
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before the change result of expression
ArchSupportsSMP="$(if $(filter $(ARM_ISA),ARMv5 ARMv6),NO,YES)"
to evaluate to
ArchSupportsSMP="YES"
After the change it's
ArchSupportsSMP=YES
Thanks to orion for the fix!
Fixes Trac #12981
Signed-off-by: Sergei Trofimovich <siarheit@google.com>
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: Try `./configure HC_OPTS_STAGE0=-foobar` and watch it fail
Reviewers: austin, hvr
Subscribers: thomie, erikd
Differential Revision: https://phabricator.haskell.org/D2674
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It was removed long ago in cf403b50900648063d99afa160d2091a7d6f58c1.
Thanks for @rwbarton for catching this.
Updates nofib submodule.
Test Plan: Validate
Reviewers: austin, rwbarton
Subscribers: thomie, rwbarton
Differential Revision: https://phabricator.haskell.org/D2493
GHC Trac Issues: #12443
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: Try it
Reviewers: hvr, simonmar, austin, erikd
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1722
GHC Trac Issues: #11094
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: Configure/build with and without --enable-libdw
Reviewers: trofi, hvr, austin, simonmar, bgamari
Reviewed By: bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2276
|
| |
|
|
|
|
| |
[skip ci]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rather than using the non-standard/idiomatic `--with-{gcc,clang}=...`
scheme use the `CC=...` style scheme.
The basic idea is to have Autoconf's CC/CFLAG/CPPFLAG apply to
stage{1,2,3}, while having a separate _STAGE0 set of env-vars
denote the bootstrap-toolchain flags/programs.
This should be simpler, less confusing, and somewhat more in line with
Autoconf's idioms (allowing us to reuse more of Autoconf rather than
(re)inventing our own confusing non-standard m4 macros to do stuff that
Autoconf could almost do already for us)
Morever, expose CC_STAGE0 as a so-called "precious" variable.
So now we can better control which bootstrapping gcc is used
(by default the one used by the stage0 ghc, unless CC_STAGE0 is
overriden)
```
Some influential environment variables:
CC_STAGE0 C compiler command (bootstrap)
CC C compiler command
CFLAGS C compiler flags
...
Use these variables to override the choices made by `configure' or to
help it to find libraries and programs with nonstandard names/locations.
```
Test Plan: I've tested that cross-compiling with
`--target=powerpc-linux-gnu` still works, and tried a few variants of
settting `CC=` and `CC_STAGE0=`; `./validate` passed as well
Reviewers: erikd, austin, bgamari, simonmar
Reviewed By: simonmar
Subscribers: Phyx, thomie
Differential Revision: https://phabricator.haskell.org/D2078
|
|
|
|
|
|
|
| |
This was introduced in 109a1e53287f50103e8a5b592275940b6e3dbb53
but isn't needed anymore because by now we're bootstrapping with
GHC versions which already provide "ld command" in `ghc --info`
(that field was added in GHC 7.8)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This extends the previous work to revive the unregisterised GHC build
for AIX/ppc32. Strictly speaking, AIX runs on POWER4 (and later)
hardware, but the PPC32 instructions implemented in the PPC NCG
represent a compatible subset of the POWER4 ISA.
IBM AIX follows the PowerOpen ABI (and shares many similiarites with the
Linux PPC64 ELF V1 NCG backend) but uses the rather limited XCOFF
format (compared to ELF).
This doesn't support dynamic libraries yet.
A major limiting factor is that the AIX assembler does not support the
`@ha`/`@l` relocation types nor the ha16()/lo16() functions Darwin's
assembler supports. Therefore we need to avoid emitting those. In case
of numeric literals we simply compute the functions ourselves, while for
labels we have to use local TOCs and hope everything fits into a 16bit
offset (for ppc32 this gives us at most 16384 entries per TOC section,
which is enough to compile GHC).
Another issue is that XCOFF doesn't seem to have a relocation type for
label-differences, and therefore the label-differences placed into
tables-next-to-code can't be relocated, but the linker may rearrange
different sections, so we need to place all read-only sections into the
same `.text[PR]` section to workaround this.
Finally, the PowerOpen ABI distinguishes between function-descriptors
and actualy entry-point addresses. For AIX we need to be specific when
emitting assembler code whether we want the address of the function
descriptor `printf`) or for the entry-point (`.printf`). So we let the
asm pretty-printer prefix a dot to all emitted subroutine
calls (i.e. `BL`) on AIX only. For now, STG routines' entry-point labels
are not prefixed by a label and don't have any associated
function-descriptor.
Reviewers: austin, trommler, erikd, bgamari
Reviewed By: trommler, erikd, bgamari
Differential Revision: https://phabricator.haskell.org/D2019
|
|
|
|
|
|
| |
-9e is crazy expensive for very little pay-off. See
http://smart-cactus.org/~ben/posts/2016-02-04-compression-comparison.html
for details.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We are unable to produce load/store barriers for pre-ARMv7 targets.
Phab:D894 added dummy cases to SMP.h for these barriers to prevent the
build from failing under the assumption that there are no SMP-capable
devices of this vintage. However, #10433 points out that it is more
correct to simply set NOSMP for such targets.
Tested By: rwbarton
Test Plan: Validate
Reviewers: erikd, rwbarton, austin
Reviewed By: rwbarton
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1704
GHC Trac Issues: #10433
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A small cosmetic change, but we have to do a bit of work to
actually support it:
- Cabal submodule update, so that Cabal passes us
-this-unit-id when we ask for it. This includes
a Cabal renaming to be consistent with Unit ID, which
makes ghc-pkg a bit more scrutable.
- Build system is updated to use -this-unit-id rather than
-this-package-key, to avoid deprecation warnings. Needs
a version test so I resurrected the old test we had
(sorry rwbarton!)
- I've *undeprecated* -package-name, so that we are in the same
state as GHC 7.10, since the "correct" flag will have only
entered circulation in GHC 8.0.
- I removed -package-key. Since we didn't deprecate -package-id
I think this should not cause any problems for users; they
can just change their code to use -package-id.
- The package database is indexed by UNIT IDs, not component IDs.
I updated the naming here.
- I dropped the signatures field from ExposedModule; nothing
was using it, and instantiatedWith from the package database
field.
- ghc-pkg was updated to use unit ID nomenclature, I removed
the -package-key flags but I decided not to add any new flags
for now.
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Test Plan: validate
Reviewers: austin, hvr, bgamari
Reviewed By: bgamari
Subscribers: 23Skidoo, thomie, erikd
Differential Revision: https://phabricator.haskell.org/D1780
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: validate, check that gz is used
Reviewers: hvr, austin, thomie
Reviewed By: thomie
Differential Revision: https://phabricator.haskell.org/D1788
GHC Trac Issues: #11434
|
|
|
|
| |
Resolves #11434.
|
| |
|
|
|
|
|
|
|
| |
There is CONF_CC_OPTS_STAGE$(N) but not CONF_CC_OPTS
thus option does not work for a while.
Signed-off-by: Sergei Trofimovich <siarheit@google.com>
|
|
|
|
|
|
| |
As we're requiring GHC >= 7.10 now, the conditional handling introduced
in 9e133b9dccec0553c6ec302d6ca0d3bc5eea06c4 for addressing #8182 can be
made unconditional, and thus simplify the build-system a little bit.
|
|
|
|
|
|
| |
This code was introduced in 66218d15b7c27a4a38992003bd761f60bae84b1f to
use `-package-name` for GHC 7.8, whereas GHC 7.10 needs the new
`-this-package-key` flag.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Quoting the POSIX standard for the `-D` C compiler flag:
-D name[=value]
Define name as if by a C-language #define directive.
If no `=value` is given, a value of 1 shall be used.
[...]
Removing this explicit `=1` definition from `-D` flags which are used to
define boolean macro constants makes the CLI invocation a bit more
idiomatic and reduces visual noise in debugging output
(flags containing `=`s are additionally put in single-quotes by GHC)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Cortex A8 hardware apparently has a bug which ld.gold will try to
correct; however in order to do so it must have unstripped executables
lest we see warnings of the form (see #10376, #10464),
/usr/bin/ld.gold: warning: cannot scan executable section 1 of ...
for Cortex-A8 erratum because it has no mapping symbols.
Consequently we disabling stripping by default on this architecture.
A bit more discussion about this issue can be found in this [Android
issue](http://code.google.com/p/android/issues/detail?id=40794).
Test Plan: Try validating on ARM
Reviewers: erikd, austin, thomie
Reviewed By: austin, thomie
Differential Revision: https://phabricator.haskell.org/D1599
GHC Trac Issues: #10376, #10464
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Currently libdw requires per-arch implementation of
set_initial_registers() function.
Otherwise build fails with linkage error
(seen on sparc):
rts/dist/build/libHSrts_thr-ghc7.11.20151129.so:
undefined reference to `set_initial_registers'
collect2: error: ld returned 1 exit status
`gcc' failed in phase `Linker'. (Exit code: 1)
make[1]: *** [ghc/stage2/build/tmp/ghc-stage2] Error 1
Converted link-time error to compile-time error,
added arch whitelist.
Signed-off-by: Sergei Trofimovich <siarheit@google.com>
Reviewers: austin, thomie, bgamari
Reviewed By: bgamari
Differential Revision: https://phabricator.haskell.org/D1567
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add stage specific versions of SRC_HC_OPTS. These are currently only
used for -Werror. The previous combination of GhcStage2HcOpts and
GhcLibHcOpts didn't apply to utils/*.
* Add stage specific versions of SRC_HC_WARNING_OPTS. These will later be
used for new warning supression flags that should not be passed to the
bootstrap compiler.
* Move -Wall (and -Werror) related code back to mk/warnings.mk, where it
was before 987d54274. Now all warning related code is nicely together.
Include mk/warnings.mk after mk/custom-settings.mk to make this work.
Reviewed By: bgamari, hvr
Differential Revision: https://phabricator.haskell.org/D1536
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This hasn't been used for a very long time and will soon be superceded
by perf_events support.
Test Plan: validate
Reviewers: austin, simonmar
Reviewed By: austin, simonmar
Subscribers: thomie, erikd
Differential Revision: https://phabricator.haskell.org/D1493
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds a flag -split-sections that does similar things to
-split-objs, but using sections in single object files instead of
relying on the Satanic Splitter and other abominations. This is very
similar to the GCC flags -ffunction-sections and -fdata-sections.
The --gc-sections linker flag, which allows unused sections to actually
be removed, is added to all link commands (if the linker supports it) so
that space savings from having base compiled with sections can be
realized.
Supported both in LLVM and the native code-gen, in theory for all
architectures, but really tested on x86 only.
In the GHC build, a new SplitSections variable enables -split-sections
for relevant parts of the build.
Test Plan: validate with both settings of SplitSections
Reviewers: dterei, Phyx, austin, simonmar, thomie, bgamari
Reviewed By: simonmar, thomie, bgamari
Subscribers: hsyl20, erikd, kgardas, thomie
Differential Revision: https://phabricator.haskell.org/D1242
GHC Trac Issues: #8405
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds basic support to the RTS for DWARF-assisted unwinding of the
Haskell and C stack via libdw. This only adds the infrastructure;
consumers of this functionality will be introduced in future diffs.
Currently we are carrying the initial register collection code in
Libdw.c but this will eventually make its way upstream to libdw.
Test Plan: See future patches
Reviewers: Tarrasch, scpmw, austin, simonmar
Reviewed By: austin, simonmar
Subscribers: simonmar, thomie, erikd
Differential Revision: https://phabricator.haskell.org/D1196
GHC Trac Issues: #10656
|
|
|
|
| |
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
|
| |
|