| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously the make build system would pass things like
`-optl-optl-Wl,-x -optl-optl-Wl,noexecstack` to GHC. This would
naturally result in mass confusion as GHC would pass `-optl-Wl,-x` to
GCC. GCC would in turn interpret this as `-o ptl-Wl,-x`, setting the
output pass of the invocation.
The problem that `-optl` was added to the command-line in two places in
the build system. Fix this.
Fixes #17385.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This moves all URL references to Trac Wiki to their corresponding
GitLab counterparts.
This substitution is classified as follows:
1. Automated substitution using sed with Ben's mapping rule [1]
Old: ghc.haskell.org/trac/ghc/wiki/XxxYyy...
New: gitlab.haskell.org/ghc/ghc/wikis/xxx-yyy...
2. Manual substitution for URLs containing `#` index
Old: ghc.haskell.org/trac/ghc/wiki/XxxYyy...#Zzz
New: gitlab.haskell.org/ghc/ghc/wikis/xxx-yyy...#zzz
3. Manual substitution for strings starting with `Commentary`
Old: Commentary/XxxYyy...
New: commentary/xxx-yyy...
See also !539
[1]: https://gitlab.haskell.org/bgamari/gitlab-migration/blob/master/wiki-mapping.json
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The splitter is an evil Perl script that processes assembler code.
Its job can be done better by the linker's --gc-sections flag. GHC
passes this flag to the linker whenever -split-sections is passed on
the command line.
This is based on @DemiMarie's D2768.
Fixes Trac #11315
Fixes Trac #9832
Fixes Trac #8964
Fixes Trac #8685
Fixes Trac #8629
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adds a `-fenable-ide-info` flag which instructs GHC to generate `.hie`
files (see the wiki page:
https://ghc.haskell.org/trac/ghc/wiki/HIEFiles).
This is a rebased version of Zubin Duggal's (@wz1000) GHC changes for
his GSOC project, as posted here:
https://gist.github.com/wz1000/5ed4ddd0d3e96d6bc75e095cef95363d.
Test Plan: ./validate
Reviewers: bgamari, gershomb, nomeata, alanz, sjakobi
Reviewed By: alanz, sjakobi
Subscribers: alanz, hvr, sjakobi, rwbarton, wz1000, carter
Differential Revision: https://phabricator.haskell.org/D5239
|
|
|
|
|
|
| |
This isn't needed anymore as we don't support GHC < 8 anymore.
This is a follow-up to 122f183
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch removes dll-split from the code base, the reason is dll-split
no longer makes any sense. It was designed to split a dll in two, but we
now already have many more symbols than would fit inside two dlls. So we
need a third one. This means there's no point in having to maintain this
list as it'll never work anyway and the solution isn't scalable.
Test Plan: ./validate
Reviewers: austin, bgamari
Reviewed By: bgamari
Subscribers: rwbarton, thomie, #ghc_windows_task_force
GHC Trac Issues: #5987
Differential Revision: https://phabricator.haskell.org/D3882
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Sometimes it's handy to change a compiler flag
for a library in stage{0,1,2}.
Usage example:
libraries/binary_EXTRA_HC_OPTS += -O1
libraries/containers_EXTRA_HC_OPTS += -O1
libraries/bytestring_EXTRA_HC_OPTS += -O1
Here override default -O2 defined in .cabal files
for these libraries to speed build up.
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously this was added only to the RTS's C files (those are the bulk
of it though), but there are C bits in ghc-prim, integer-gmp and base
too.
Followup for #8405, allows the large table of character properties in
base to be stripped when not used.
Test Plan: validate
Reviewers: austin, bgamari, simonmar
Reviewed By: bgamari
Subscribers: thomie, snowleopard
Differential Revision: https://phabricator.haskell.org/D3121
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There is two types of options passed directly to 'ld'
(and not to 'gcc' driver):
- CONF_LD_LINKER_OPTS_STAGE$4
- EXTRA_LD_OPTS
This changedoes two things:
- split 'EXTRA_LD_OPTS' into two variables:
- EXTRA_LD_OPTS (accepts 'gcc' wrapper options)
- EXTRA_LD_LINKER_OPTS (accepts raw 'ld' options)
- wraps all LD_LINKER options as '-Wl,' when passed
to 'gcc' driver.
Fixes https://phabricator.haskell.org/D2776
Signed-off-by: Sergei Trofimovich <siarheit@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts f48f5a9ebf384e1e157b7b413e1d779f4289ddd2
The prefixing does not work as comma
is stripped by $(addprefix) macro:
The following call
$$(addprefix -optl-Wl, $$($1_$2_$3_ALL_LD_OPTS))
prefixes options with "-optl-Wl" not with "-optl-Wl,"
The simplest breakage can be seen by adding
SRC_LD_OPTS += -O1
to mk/build.mk:
<no location info>: error:
Warning: Couldn't figure out linker information!
Make sure you're using GNU ld, GNU gold
or the built in OS X linker, etc.
gcc: error: unrecognized command line option '-Wl-O1'
Another problem with original change is loss of ability
to pass options to gcc as a linker driver, for example:
SRC_LD_OPTS += -flto
Signed-off-by: Sergei Trofimovich <siarheit@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GHC uses gcc, not ld, for linking. Consequently all flags to be
interpreted by ld need to be prefixed by -optl,-Wl on the GHC command
line.
Test Plan: Validate on OpenBSD
Reviewers: austin, rwbarton
Reviewed By: rwbarton
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2776
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This ensures that artifacts built with build-prog see these options.
Also spruce up comments.
Test Plan: Carefully read it.
Reviewers: austin, hvr, erikd
Reviewed By: erikd
Subscribers: thomie, erikd
Differential Revision: https://phabricator.haskell.org/D2673
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Specifically per-component macros and multiple libraries.
Contains Cabal submodule update.
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Test Plan: validate
Reviewers: austin, bgamari
Reviewed By: austin, bgamari
Subscribers: hvr, thomie
Differential Revision: https://phabricator.haskell.org/D2059
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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 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 reverts commit 9fc2d777f53110040f48ab27643a16888fa377f5.
This appears to cause interface file issues during rebuilds. Punting
back to @thomie for further investigation.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
The current scheme in rules/distdir-way-opts.mk is something like this:
GHC_LD_OPTS = MOST_HC_OPTS + ALL_LD_OPTS
MOST_DIR_HC_OPTS = MOST_HC_OPTS + -odir,-hidir,-stubdir
ALL_HC_OPTS = MOST_DIR_HC_OPTS +
-hisuf,-osuf,-hcsuf,-split-objs,-dynamic-too
Notice that both ALL_HC_OPTS and GHC_LD_OPTS include MOST_HC_OPTS, and
currently both got added when linking. Adding MOST_HC_OPTS twice results
in overly long and hard to decipher command lines (and build logs). This
commit fixes that.
Afaik, -odir,-hidir,-stubdir,-hisuf,-osuf,-hcsuf,-spit-objs,-dynamic-too
are all not needed when linking, so this change should be safe to make.
GHC_LD_OPTS is for linking, ALL_HC_OPTS is for compiling.
ALL_HC_OPTS was added to the linking commands in
37a6a52facd1c3999ce4472c50b0030568be1e04, to make sure
-no-user-package-conf would be in the options list. It still is after
this change.
Reviewers: austin, bgamari
Differential Revision: https://phabricator.haskell.org/D1379
|
|
|
|
| |
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
There's not really any good reason to use -package-key over
-package-id, so use the latter as standard practice.
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Test Plan: validate
Reviewers: austin
Subscribers: thomie, bgamari
Differential Revision: https://phabricator.haskell.org/D1000
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Previously, we'd install them to something like
xhtml_0ACfOp3hebWD9jGWE4v4G which was fairly ugly; this
commit changes the default install path to contain the full
package name and version, as well as the package key.
Needs a Cabal submodule update for the commit for install paths support
"Add libname install-dirs variable, use it by default. Fixes #2437".
It also contains some miscellaneous fixes for Cabal HEAD.
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Test Plan: validate
Reviewers: austin
Subscribers: bgamari, thomie
Trac Issues: #10479
Differential Revision: https://phabricator.haskell.org/D922
|
|
|
|
| |
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
|
|
|
|
| |
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch set makes us no longer assume that a package key is a human
readable string, leaving Cabal free to "do whatever it wants" to allocate
keys; we'll look up the PackageId in the database to display to the user.
This also means we have a new level of qualifier decisions to make at the
package level, and rewriting some Safe Haskell error reporting code to DTRT.
Additionally, we adjust the build system to use a new ghc-cabal output
Make variable PACKAGE_KEY to determine library names and other things,
rather than concatenating PACKAGE/VERSION as before.
Adds a new `-this-package-key` flag to subsume the old, erroneously named
`-package-name` flag, and `-package-key` to select packages by package key.
RFC: The md5 hashes are pretty tough on the eye, as far as the file
system is concerned :(
ToDo: safePkg01 test had its output updated, but the fix is not really right:
the rest of the dependencies are truncated due to the fact the we're only
grepping a single line, but ghc-pkg is wrapping its output.
ToDo: In a later commit, update all submodules to stop using -package-name
and use -this-package-key. For now, we don't do it to avoid submodule
explosion.
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Test Plan: validate
Reviewers: simonpj, simonmar, hvr, austin
Subscribers: simonmar, relrod, carter
Differential Revision: https://phabricator.haskell.org/D80
|
|
|
|
|
|
|
|
|
|
| |
One problem was that we weren't including $1_$2_DIST_LD_OPTS when
linking a program, which looks to be accidental: it was being defined
but not used anywhere. This meant that setting $1_$2_EXTRA_LD_OPTS,
for example, had no effect.
This commit straightens out the handling of LD_OPTS to be consistent
with the way we handle CC_OPTS and HC_OPTS.
|
|
|
|
| |
Signed-off-by: Austin Seipp <austin@well-typed.com>
|
|
|
|
|
|
|
| |
Gold apparently doesn't recognize `-z origin`, only `-zorigin` it seems.
Authored-by: Ben Gamari <bgamari.foss@gmail.com>
Signed-off-by: Austin Seipp <austin@well-typed.com>
|
| |
|
|
|
|
|
| |
When GHCi makes temporary DLLs, those also need to be linked against
the right RTS, or we won't be able to load them.
|
|
|
|
|
|
|
| |
There's now an internal -dll-split flag, which we use to tell GHC how
the GHC package is split into 2 separate DLLs. This is used by
Packages.isDllName to determine whether a call is within the same
DLL, or whether it is a call to another DLL.
|
|
|
|
| |
Not just base, integer-gmp and ghc-prim.
|
|
|
|
| |
Patch from pgj; part of #7819.
|
|
|
|
|
| |
On FreeBSD, one needs use "-z origin" in order to enable resolution
of $ORIGIN in RPATH. Part of #7819.
|
|
|
|
| |
Also a couple of other fixes and sanity checks along the way.
|
|
|
|
|
| |
We no longer pass -hisuf/-osuf flags to "ghc -M". Doing so didn't really
make sense with the way the -dep-suffix flags now work.
|
|
|
|
| |
Signed-off-by: David Waern <david.waern@gmail.com>
|
| |
|
| |
|
|
|
|
|
| |
The hsc2hs, alex and happy options variables are now also
non-way-specific, as the files are shared between all ways.
|
|
|
|
| |
Based on a patch from markwright in #3072.
|
|
|
|
|
|
|
|
|
| |
libraries/base/GHC/Base_HC_OPTS wasn't getting included, because we
were using libraries/base/./GHC/Base.lhs as the path, and the ./
meant we got the wrong filename.
I didn't use $(realpath ...) as the .hs file may be generated by hsc2hs
or similar, so may not exist when the HC_OPTS are constructed.
|
|
|
|
|
|
|
|
| |
Rename package database flags in both GHC and ghc-pkg so that they are
consistent with Cabal nomenclature.
Add a version check to the build system so that the correct set of
package db flags are used when the bootstrapping GHC has version < 7.5.
|
|
|
|
|
|
| |
In particular, old-time assumes that mingw32_HOST_OS is set when
we are on Windows, and was going wrong on Win64 because it wasn't
defined.
|
|
|
|
|
|
|
|
|
|
|
| |
This allows you to say things like
SRC_HC_WARNING_OPTS += -fno-warn-unsupported-calling-conventions
in mk/validate.mk.
Unfortunately, we can't just use SRC_HC_OPTS, as that gets put before
the more specific options (e.g. ghc-options in a .cabal file), many of
which include -Wall. So now we have:
ghc $(SRC_HC_OPTS) ... options from .cabal etc ... $(SRC_HC_WARNING_OPTS)
|
| |
|
|
|
|
|
|
|
|
|
| |
Add documentation describing all the variables that contain options
for Haskell compilations, what they mean and where they are (or can
be) defined.
In due course we should expand this to cover all the build system
variables, and move it to the wiki, but this is a start.
|
| |
|
|
|
|
|
| |
source code to be compiled with the stage 0 compiler. (bug noticed by
David Terei - thanks!)
|
| |
|