| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 tool can be used to generate dll's for any list of object files
given to it. It will then repartition them automatically to fit within
a dll and generates as many dll's as needed to do this. Cyclic dependencies
between these generated dlls are handle automatically so there is no need
to tell it how to partition.
It is also a lot more general than `dll-split` as it is able to split any
package not just `libGHC`. It also uses a trick using GNU style import libraries
to hide the splitting from the rest of the pipeline. Which means come linking time
you don't need to know which dll contains what symbol or how many split dlls were
created.
The import libraries are by default created with libtool. However since libtool is BFD
based it is very slow. So if present and detected by configure the `genlib` tool
from the msys2 project is used. This makes a difference of about ~45 minutes when compiling.
To install `genlib` run `pacman -Sy mingw-w64-$(uname -m)-tools-git`.
More detailed explaination of the process can be found here
https://ghc.haskell.org/trac/ghc/wiki/WindowsDynamicLinking
Test Plan: ./validate
Reviewers: austin, hvr, bgamari, erikd, simonmar
Reviewed By: bgamari
Subscribers: snowleopard, rwbarton, thomie, erikd, #ghc_windows_task_force
GHC Trac Issues: #5987
Differential Revision: https://phabricator.haskell.org/D3883
|
|
|
|
| |
This broke in the fix for #13541.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If you have ld.gold and ld.lld, then ld.gold will be selected by the
detection logic. This patch prioritizes lld by changing the order. The
rationale for checking lld first is that it's (right now) not part of,
say, a default Linux distro installation and if it's available, it's
very likely that it was installed explicitly and should be seen as a
sign of preference. On FreeBSD LLVM is the (default) base toolchain and
the changed order makes sense there as well, since ld.gold can be
available in /usr/local via ports/pkg. I don't have access to macOS and
can't say anything about their LLVM toolchain.
At some point we could add a check for LD=ld.lld or LD=ld.gold as an
optional override to explicitly select a linker.
Since I cannot really remove gcc on Linux, this was the only way to
configure GHC to use ld.lld.
Reviewers: austin, hvr, bgamari
Reviewed By: bgamari
Subscribers: rwbarton, thomie, erikd
Tags: PHID-PROJ-5azim3sqhsf7wzvlvaag
Differential Revision: https://phabricator.haskell.org/D3790
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously GHC would always assume that section types began with `@` while
producing assembly, which is not true. For instance, in ARM assembly syntax
section types begin with `%`. This abstracts out section type pretty-printing
and adjusts it to correctly account for the target architectures assembly
flavor.
Reviewers: austin, hvr, Phyx
Reviewed By: Phyx
Subscribers: Phyx, rwbarton, thomie, erikd
GHC Trac Issues: #13937
Differential Revision: https://phabricator.haskell.org/D3712
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously if we found an unusable linker in PATH (e.g. ld.lld on OS X)
we would notice the -fuse-ld=... was broken, but neglected to reset LD
to a usable linker. This resulted in brokenness on OS X when lld is in
PATH.
Test Plan: Validate on OS X with lld in PATH
Reviewers: austin, hvr, angerman
Reviewed By: angerman
Subscribers: rwbarton, thomie, erikd, angerman
GHC Trac Issues: #13541
Differential Revision: https://phabricator.haskell.org/D3713
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Canonical triplets have a form of
<arch>-<vendor>-<os>[-<abi>]
Checking for vendor is almost never correct as it's an
arbitrary string.
It's useful to have multiple "vendors" to denote
otherwise the same (WRT <arch>, <os>, <abi>) target:
--target=x86_64-pc-linux-gnu
--target=x86_64-unknown-linux-gnu
--target=x86_64-ghc80-linux-gnu
--target=x86_64-ghchead-linux-gnu
Do not fail unknown vendors. Only emit a warning.
Ideally configure checks should never use "vendor".
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The configure script will now try to coerce gcc to use the linker
pointed to by $LD instead of the system default (typically bfd ld).
Moreover, we now check for `ld.gold` and `ld.lld` before trying `ld`.
The previous behavior can be reverted to by using the new
--disable-ld-override flag.
On my machine gold seems to trigger an apparent infelicity in
constructor behavior, causing T5435_asm to fail. I've opened #13883 to
record this issue and have accepted the questionable constructor
ordering for the time being.
Test Plan: Validate with `config_args='--enable-ld-override'`
Reviewers: austin, hvr, simonmar
Subscribers: duog, nh2, rwbarton, thomie, erikd, snowleopard
GHC Trac Issues: #13541, #13810, #13883
Differential Revision: https://phabricator.haskell.org/D3449
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This bug affects bfd ld on ARMv7, causing ld to incorrectly emit
R_REL_COPY relocations, breaking tables-next-to-code. We've known about
it for several years now and there is not yet a fix upstream. Previously
we would simply force use of ld.gold on ARM. However, given the rework
of linking configuration, I thought a more principled solution was in
order.
Test Plan: Validate on armv7
Reviewers: austin, hvr
Subscribers: angerman, rwbarton, thomie, erikd
GHC Trac Issues: #4210
Differential Revision: https://phabricator.haskell.org/D3676
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit d6cecde585b0980ed8e0050c5a1d315789fb6356.
The patch broke Simon PJ's Windows build, becuase he didn't
have (and should not need) a separate msys2 gcc.
Following an exchange on the ghc-devs list, Tamar wrote
Oops, sorry, didn’t notice it because both mine and harbormaster’s
msys2 have separate GCCs installed as well.
I don’t see an easy fix that would also work for end user Configure
based cabal installs. So I think I’ll have to go back to the drawing
board for this one.
You can just leave it reverted.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This patch drops the GCC driver and instead moves
the only remaining path that we need to keep for
backwards compatibility to the settings file.
It also generalizes the code that expands `$TopDir`
so it can expand it within any location in the string
and also changes it so `$TopDir` is expanded only
after the words call because `$TopDir` can contains
spaces which would be horribly broken.
Test Plan: ./validate
Reviewers: austin, hvr, bgamari
Reviewed By: bgamari
Subscribers: rwbarton, thomie, erikd
GHC Trac Issues: #13709
Differential Revision: https://phabricator.haskell.org/D3592
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
There are various distros that build GHC using their own C compilers
such as MSYS2. Currently they have to patch the build scripts everytime.
This patch provides the configure argument `--enable-distro-toolchain`
which allows one to build using any C compiler on the path.
This is also useful for testing new versions of GCC.
Test Plan:
./configure --enable-distro-toolchain && make - && make THREADS=9 test
./validate
Reviewers: austin, hvr, bgamari
Reviewed By: bgamari
Subscribers: rwbarton, thomie, erikd, #ghc_windows_task_force
GHC Trac Issues: #13792
Differential Revision: https://phabricator.haskell.org/D3637
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This will qualify the libtool with the target, e.g.
arch-vendor-os-libtool, instead of simply using libtool.
Reviewers: austin, hvr, bgamari
Reviewed By: bgamari
Subscribers: Ericson2314, ryantrinkle, rwbarton, thomie, erikd
Differential Revision: https://phabricator.haskell.org/D3617
|
|
|
|
|
|
| |
5ddb307edf15c4d86e5c35c4063ec967424e19f2 regressed autoconf's ability to
find the linker due to a silly variable interpolation issue, causing
segmentation faults on AArch64.
|
|
|
|
|
|
|
|
| |
The change adds support for 'darwin*' OS:
$ ./configure --target=aarch64-apple-darwin14
Reported-by: jp_rider
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit 66108864540601837ad77847f4062a670362361f reverted ability
to override 'dllwrap' and 'windres' paths when cross-compiling.
After this change (and a few libraries/Win32 patches) I was able
to build cross-compiler to windows:
$ ./configure --target=i686-w64-mingw32 \
DllWrap=i686-w64-mingw32-dllwrap \
Windres=i686-w64-mingw32-windres
Later both 'dllwrap' and 'windres' should be derived from --target=
as we do now for 'CC', 'AR', 'NM' and others.
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Sometimes it might be of interest to
have access to the raw target value when calling
subcommands (e.g. llvm tools with --target), as
such we forward the specified (or inferred)
--target for later consumption.
Reviewers: austin, hvr, bgamari
Reviewed By: bgamari
Subscribers: rwbarton, thomie, erikd
Differential Revision: https://phabricator.haskell.org/D3559
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We know that *-apple-* is leading_underscores, and .dylib.
It is also better to test for TargetVendor being apple, rather than
relying on targetOS, which could be macOS, iOS, tvOS, watchOS,
or any other glorious name apple could come up with.
Reviewers: austin, hvr, bgamari
Reviewed By: bgamari
Subscribers: rwbarton, thomie, erikd
Differential Revision: https://phabricator.haskell.org/D3557
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This should be handled appropriately by a wrapper script around the compiler,
if one wants to insist on the specific linker to be used. Otherwise this
breaks if the used compiler fails to understand this directive.
I believe that using a specific linker should be part of the compilers
toolchain, we delegate to and not hardcoded here in ghc.
Reviewers: dfeuer, erikd, hvr, austin, rwbarton, bgamari
Reviewed By: bgamari
Subscribers: snowleopard, davean, dfeuer, thomie, erikd
Differential Revision: https://phabricator.haskell.org/D3351
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is two fold:
- We did not catch all ARM_ARCH_6 defines. Specifically not `6K` and
`6KZ`, which is what llvm seems to use these days for
`arm-none-linux-gnueabihf` (e.g. the triple that's used for raspbian
as well). Without it, ghc assums we want to compile against some armv7
system, which raspbian is not (it is armv6 for maximum compatibility
across the pi family, compromising on using armv7 and up features).
- We stop forcing the -m and -arch flags on macOS. This is troublesome,
as compiling for a 32bit system (e.g. raspberry pi, on a x86_64 macOS
system results in the `-m64` flag being passed to to clang as well,
which in turn figures out that you likely want 64bit, and rewrites
your taret from `arm-none-linux-gnueabihf` to
`aarch64-none-linux-gnueabihf`, which is definetly not what you want.
Reviewers: austin, hvr, bgamari
Reviewed By: bgamari
Subscribers: rwbarton, thomie, erikd
Differential Revision: https://phabricator.haskell.org/D3546
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This replaces the --with-* configure flags with the usual autoconf
environment variables, as suggested by #13583.
Test Plan: Configure on various platforms
Reviewers: hvr, trofi, thomie, austin
Reviewed By: trofi
Subscribers: rwbarton, erikd
GHC Trac Issues: #13583
Differential Revision: https://phabricator.haskell.org/D3499
|
|
|
|
|
|
|
|
| |
This commit didn't consider the fact that binary distributions on Windows must
have relative toolchain paths. This caused #13560.
This reverts commit 48385cb2fc295eb8af9188cbe140142c1807d5a7 (except for a
helpful comment).
|
|
|
|
|
|
|
|
| |
Noticed when tried to cross-compile GHC from x86_64-linux
to --target=i686-w64-mingw32. Final ghc executables did
not have '.exe' extensions.
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
'FP_PROG_AR' macro has a minor bug: it ignores
already existing value stored in '$fp_prog_ar'.
I've noticed it when tried to built UNREG ghc using thin LTO:
$ ./configure --enable-unregisterised \
--with-nm=gcc-nm \
--with-ar=gcc-ar \
--with-ranlib=gcc-ranlib \
./configure refused to use 'gcc-ar' (LTO-aware variant of 'ar')
and kept using 'ar'.
'$fp_prog_ar' is initialized (in a complex manner) in 'configure.ac' as:
FP_ARG_WITH_PATH_GNU_PROG([AR], [ar], [ar])
ArCmd="$AR"
fp_prog_ar="$AR"
AC_SUBST([ArCmd])
The change keeps that value.
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Better test for SHT_INIT_ARRAY than openbsd_HOST_OS
This is actually bens patch:
https://gist.github.com/bgamari/c846e6a5f2cd988716cd5e36c68d5bef
- linux-android defines.
- No need for -lpthread on OSAndroid
However, I’m confused why we do not use the AC NEED_PTHREAD_LIB
value here?
- Use mmap on android
- Support `none` vendor.
Reviewers: austin, hvr, bgamari, erikd, simonmar
Reviewed By: bgamari
Subscribers: rwbarton, thomie, erikd
Differential Revision: https://phabricator.haskell.org/D3356
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: austin, hvr, rwbarton, bgamari
Reviewed By: rwbarton, bgamari
Subscribers: rwbarton, thomie, erikd
Differential Revision: https://phabricator.haskell.org/D3348
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test Plan: GHC CI
Reviewers: austin, hvr, bgamari
Reviewed By: bgamari
Subscribers: thomie, erikd
Differential Revision: https://phabricator.haskell.org/D2993
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It seems like GCC versions prior to 4.8 exit with code 0 when faced with
an unrecognized flag. Silly compilers.
Test Plan: Validate
Reviewers: hvr, austin, ggreif
Reviewed By: ggreif
Subscribers: thomie, erikd
Differential Revision: https://phabricator.haskell.org/D2707
GHC Trac Issues: #12759
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Certain distributions (e.g. Debian and Ubuntu) have enabled PIE be
default in their GCC packaging. This breaks our abuse of GCC as a linker
which requires that we pass -Wl,-r, which is incompatible with
PIE (since the former implies that we are generating a relocatable
object file and the latter an executable).
This is a second attempt at D2691. This attempt constrasts with D2691 in that
it preserves the "does gcc support -no-pie" flag in settings, allowing this to
be reconfigured by `configure` during installation of a binary distribution.
Thanks for @rwbarton for drawing attention to this issue.
Test Plan: Validate
Reviewers: austin, hvr, erikd
Reviewed By: erikd
Subscribers: thomie, rwbarton, erikd
Differential Revision: https://phabricator.haskell.org/D2693
GHC Trac Issues: #12759
|
|
|
|
|
|
| |
This reverts commit bae4a55b1fb403f610b4b55a1b6fb3f03e9c2026.
This will be superceded by D2693.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Certain distributions (e.g. Debian and Ubuntu) have enabled PIE be
default in their GCC packaging. This breaks our abuse of GCC as a linker
which requires that we pass -Wl,-r, which is incompatible with
PIE (since the former implies that we are generating a relocatable
object file and the latter an executable).
Test Plan: Validate
Reviewers: hvr, austin
Subscribers: rwbarton, thomie, erikd
Differential Revision: https://phabricator.haskell.org/D2691
GHC Trac Issues: #12759
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
This patch fixes issue with abort in GHCi on OpenBSD current
as of Aug 12 2016. The OpenBSD is more and more strict about usage
of writable and executable memory. Programs/applications which
requires such functionality need to be linked with -z wxneeded linker
flag and need to be run from the file-system mounted with wxallowed
mount option. If either of those options in not met, then problematic
program/application usually fail on some mmap/mprotect call which fail.
Reviewers: bgamari, austin, hvr
Subscribers: thomie, erikd
Differential Revision: https://phabricator.haskell.org/D2454
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
x86_64-apple-darwin14, is the target for the 64bit simulator.
Ideally, we'd have (i386|armv7|arm64|x64_86)-apple-ios, yet,
many #ifdefs depend on `darwin`, notably libffi. Hence, this only adds
x86_64-apple-darwin14 as a target. This also updates the comment to
add the `-S` flag, and dump the output to stdout; and adjusts the
`datalayout` and `triple` values, as obtained through the method
mentioned in the comment.
Reviewers: hvr, erikd, austin, bgamari, simonmar
Reviewed By: simonmar
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2378
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Remove some Windows specific code from the .m4 files
and have configure figure it out.
Unfortunately touchy can't be removed since there
is no mingw build of coreutils. Only msys builds
which would give us a dependency on the msys runtime.
Reviewers: hvr, austin, thomie, bgamari
Reviewed By: thomie, bgamari
Subscribers: thomie, erikd, #ghc_windows_task_force
Differential Revision: https://phabricator.haskell.org/D2248
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Saves us a CPP #if in MachDeps.h since we now can always rely on a
64-bit type being available.
Reviewers: austin, bgamari
Reviewed By: bgamari
Subscribers: thomie, erikd
Differential Revision: https://phabricator.haskell.org/D2099
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 is the first phase of addressing #11757 which aims to make C99
support a base-line requirement for GHC and clean up the code-base to
use C99 facilities when sensible.
This patch exploits the logic/heuristic used by `AC_PROG_CC_C99` to
determine the flags needed in case the C compiler isn't able to compile
C99 code in its current mode. We can't use `AC_PROG_CC_C99` directly
though because GHC's build-system expects CC to contain a filename
without any flags, while `AC_PROG_CC_C99` would e.g. result in
`CC="gcc -std=gnu99"`. Morever, we support different `CC`s for
stage0/1/2, so we need a version of `AC_PROG_CC_C99` for which we can
specify the `CC`/`CFLAGS` variables to operate on. This is what
`FP_SET_CFLAGS_C99` does.
Note that Clang has been defaulting to C99+ for a long time, while GCC 5
defaults to C99+ as well. So this has mostly an affect on older GCCs
versions prior to 5.0 and possibly compilers other than GCC/Clang (which
are not officially supported for building GHC anyway).
Reviewers: kgardas, erikd, bgamari, austin
Reviewed By: erikd
Differential Revision: https://phabricator.haskell.org/D2045
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Xcode 4.1 was released back in 2011 for Mac OSX 10.6/10.7.
However, OSX 10.7 reached EOL sometime around the end of 2014.
So this `--with-gcc-4.2` hack shouldn't be needed anymore.
Moreover, this patch changes ./configure to honor the CC env-var
again (and thus fix #11231) while giving `--with-gcc=...` a higher
priority over `CC=...`.
So the following 3 invocations are equivalent now:
CC=... ./configure
./configure CC=...
./configure --with-gcc=...
Since `--with-{gcc,clang}=...` is a misnomer (as is made apparent by
`--with-gcc=clang` or `--with-clang=gcc`), this would give us a neutral
and idiomatic way to tell ./configure which C compiler to use.
Moreover, `./configure --help` says at the end of its output:
Some influential environment variables:
CC C compiler command
CFLAGS C compiler flags
LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
nonstandard directory <lib dir>
LIBS libraries to pass to the linker, e.g. -l<library>
CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
you have headers in a nonstandard directory <include dir>
CPP C preprocessor
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
Consequently, by honoring CC=... (rather than ignoring it) we increase
consistency and reduce user confusion. Ideally, CC=... would become the
recommended way to set the C compiler, and `--with-{clang,gcc}=...`
would be demoted to legacy aliases.
Reviewed By: erikd, bgamari
Differential Revision: https://phabricator.haskell.org/D2046
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Long time ago, IRIX was way ahead of its time in the last century with
its SMP capabilities of scaling up to 1024 processors and other features
such as XFS or OpenGL that originated in IRIX and live on to this day in
other operating systems.
However, IRIX's last software update was in 2006 and support ended
around 2013 according to [1], so it's considered an extinct platform by
now. So this commit message is effectively an obituary for GHC's IRIX
support.
R.I.P. IRIX
[1]: https://en.wikipedia.org/wiki/IRIX
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some parts of the build system require that paths are what msys2 calls
"mixed style":
* forwards slashes
* absolute paths starting with a drive letter followed by a colon
(e.g. "C:")
The removal of ghc-pwd in 4c56ad3 changed $(TOP) from mixed style to
unix style, resulting in a broken Windows build for some.
Differential Revision: https://phabricator.haskell.org/D1752
|