| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Do not use $SHELL as $SHELL is the user's preferred interactive shell.
We do not want this to leak into the wrapper scripts.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
(Apologies for the size of this patch, I couldn't make a smaller one
that was validate-clean and also made sense independently)
(Some of this code is derived from GHCJS.)
This commit adds support for running interpreted code (for GHCi and
TemplateHaskell) in a separate process. The functionality is
experimental, so for now it is off by default and enabled by the flag
-fexternal-interpreter.
Reaosns we want this:
* compiling Template Haskell code with -prof does not require
building the code without -prof first
* when GHC itself is profiled, it can interpret unprofiled code, and
the same applies to dynamic linking. We would no longer need to
force -dynamic-too with TemplateHaskell, and we can load ordinary
objects into a dynamically-linked GHCi (and vice versa).
* An unprofiled GHCi can load and run profiled code, which means it
can use the stack-trace functionality provided by profiling without
taking the performance hit on the compiler that profiling would
entail.
Amongst other things; see
https://ghc.haskell.org/trac/ghc/wiki/RemoteGHCi for more details.
Notes on the implementation are in Note [Remote GHCi] in the new
module compiler/ghci/GHCi.hs. It probably needs more documenting,
feel free to suggest things I could elaborate on.
Things that are not currently implemented for -fexternal-interpreter:
* The GHCi debugger
* :set prog, :set args in GHCi
* `recover` in Template Haskell
* Redirecting stdin/stdout for the external process
These are all doable, I just wanted to get to a working validate-clean
patch first.
I also haven't done any benchmarking yet. I expect there to be slight hit
to link times for byte code and some penalty due to having to
serialize/deserialize TH syntax, but I don't expect it to be a serious
problem. There's also lots of low-hanging fruit in the byte code
generator/linker that we could exploit to speed things up.
Test Plan:
* validate
* I've run parts of the test suite with
EXTRA_HC_OPTS=-fexternal-interpreter, notably tests/ghci and tests/th.
There are a few failures due to the things not currently implemented
(see above).
Reviewers: simonpj, goldfire, ezyang, austin, alanz, hvr, niteria, bgamari, gibiansky, luite
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1562
|
|
|
|
|
|
|
|
|
|
| |
This will allow fixing #1851 more easily
("make install-strip" should work).
This reverts 57e2a81c589103b50da80a9e378b1a11285bd521:
"On Cygwin, use a Cygwin-style path for /bin/install's destination"
Update submodule haddock and hsc2hs.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Running `make clean` inside `utils/runghc` now does:
"rm" -rf utils/runghc/dist-install
"rm" -rf inplace/bin/runghc
"rm" -rf inplace/lib/bin/runghc
Instead of just:
"rm" -rf utils/runghc/dist-install
"rm" -rf inplace/lib/bin/runghc
I think this was just an oversight.
[skip ci]
Differential Revision: https://phabricator.haskell.org/D919
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There is no support for local variables inside `make` macros (defined
using the `define` keyword), see
[wiki:Building/Architecture/Idiom/Macros].
In this case `make show VALUE=INPLACE_WRAPPER` would print some bogus
value ("inplace/bin/mkUserGuidePart" actually, from the last BUILD_DIRS
entry in ghc.mk that calls shell-wrapper), and using that variable
somewhere might be a bug.
Test Plan:
I checked the rules directory with the following crude regexp, and this
seems the be the only real offender.
grep -P '^[^ $#\t][^$]*[^+]=' rules/*
What it is supposed to do (from right to left):
* look for variable assignments
* but not updates (+=)
* where the variable name doesn't contain any dollar signs
* and the line doesn't start with whitespace or a comment
[skip ci]
Differential Revision: https://phabricator.haskell.org/D918
|
|
|
|
| |
[skip ci]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary: runghc-7.x should always call ghc-7.x
Reviewers: austin
Reviewed By: austin
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D664
GHC Trac Issues: #9054
|
| |
|
| |
|
| |
|
|
|
|
|
| |
In particular, this means that GHCi will use DLLs, rather than loading
object files itself.
|
|
|
|
|
|
|
| |
We now define _PROGNAME, and _PROG is automatically defined with
$(exeext). This will shortly automatically use the right exeext
depending on what stage it is being compiled with (exeext may be
different for different stages when cross-compiling).
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This required various build system changes to get the build to go
through.
In the inplace shell wrappers, we set LD_LIBRARY_PATH to allow programs
to find their libraries. In the future, we might change the inplace tree
to be the same shape as an installed tree instead. However, this would
mean changing the way we do installation, as currently we use cabal's
installation methods to install the libraries, but that only works if
the libraries are under libraries/foo/dist-install/build/..., rather
than in inplace/lib/...
|
| |
|
|
|
|
|
|
|
| |
Some binaries are installed in lib/, so if we wanted them to have a
shell wrapper then under the old scheme both the binary and the wrapper
would be installed under lib/. Now the binary is put under lib/bin/,
leaving lib/ for the wrapper.
|
|
|
|
|
|
|
| |
Rather than having a separate
foo_INSTALL_SHELL_WRAPPER
variable, we just use
foo_INSTALL && foo_SHELL_WRAPPER
|
|
|
|
| |
Patchset from Stephen Blackheath <stephen.blackheath@ipwnstudios.com>
|
|
|
|
|
|
|
|
|
|
| |
We avoid calling "rm -rf" with no file arguments; this fixes cleaning
on Solaris, where that fails.
We also check for suspicious arguments: anything containing "..",
starting "/", or containing a "*" (you need to call $(wildcard ...)
yourself now if you really want globbing). This should make things
a little safer.
|
|
|
|
| |
They can now be set in the settings file instead
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
cygwin's /bin/install doesn't set file modes correctly if the
destination path is a C: style path:
$ /bin/install -c -m 644 foo /cygdrive/c/cygwin/home/ian/foo2
$ /bin/install -c -m 644 foo c:/cygwin/home/ian/foo3
$ ls -l foo*
-rw-r--r-- 1 ian None 0 2011-01-06 18:28 foo
-rw-r--r-- 1 ian None 0 2011-01-06 18:29 foo2
-rwxrwxrwx 1 ian None 0 2011-01-06 18:29 foo3
This causes problems for bindisttest/checkBinaries.sh which then
thinks that e.g. the userguide HTML files are binaries.
We therefore use a /cygdrive path if we are on cygwin
|
|
|
|
|
|
|
|
|
| |
saying
make TRACE=1
prints most of the macro calls and their arguments. It's easy to
trace new macros; see rules/trace.mk.
|
| |
|
|
|
|
| |
This means we don't rely on baking a path to gcc into the executable
|
| |
|
|
|
|
| |
This means that we get the right program name in error messages etc.
|
|
|
|
|
| |
We now separate the executable path from the executable name.
This will allow us to change one but not the other easily.
|
|
|
|
|
|
| |
This means we can remove some conditional stuff from the Makefiles,
and means the testsuite doesn't have to work out whether or not it's
on Windows.
|
| |
|
| |
|
|
|
|
|
| |
I've also added some missing $s to some makefiles. These aren't
technically necessary, but it's nice to be consistent.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
# -----------------------------------------------------------------------------
#
# (c) 2009 The University of Glasgow
#
# This file is part of the GHC build system.
#
# To understand how the build system works and how to modify it, see
# http://hackage.haskell.org/trac/ghc/wiki/Building/Architecture
# http://hackage.haskell.org/trac/ghc/wiki/Building/Modifying
#
# -----------------------------------------------------------------------------
|
|
|