summaryrefslogtreecommitdiff
path: root/distrib
Commit message (Collapse)AuthorAgeFilesLines
...
* Add -fuse-ld flag to CFLAGS during configureBen Gamari2017-07-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | The decisions made by configure later in the script may depend upon the linker used. Consequently, it is important that configure uses the same linker as GHC will eventually use. For instance, on Nix I found that a program requiring `libpthread` would link fine with only `-lrt` when linked with BFD ld. However, with gold we needed to explicitly provide the `-lpthread` dependency. Presumably the former would happily loaded any `NEEDED` libraries whereas the latter wants them explicitly given. Regardless, since `configure`'s `NEED_PTHREAD_LIB` check didn't use the `-fuse-ld` flag that GHC would eventually use, we inferred the wrong value, resulting in link errors later in the build. Test Plan: Validate Reviewers: austin, hvr Subscribers: rwbarton, thomie, erikd GHC Trac Issues: #13541 Differential Revision: https://phabricator.haskell.org/D3694
* configure: Coerce gcc to use $LD instead of system defaultBen Gamari2017-06-291-12/+13
| | | | | | | | | | | | | | | | | | | | | | | | 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
* Do not hardcode the specific linker to useMoritz Angermann2017-05-111-1/+1
| | | | | | | | | | | | | | | | | 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
* configure: Kill off FP_ARG_WITH_*Ben Gamari2017-04-251-2/+2
| | | | | | | | | | | | | | | | | 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
* Pass -no-pie to GCCBen Gamari2016-11-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | 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
* Revert "Pass -no-pie to GCC"Ben Gamari2016-11-101-1/+0
| | | | | | This reverts commit bae4a55b1fb403f610b4b55a1b6fb3f03e9c2026. This will be superceded by D2693.
* Pass -no-pie to GCCBen Gamari2016-11-101-0/+1
| | | | | | | | | | | | | | | | | | 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
* distrib: Fix libdw bindist checkBen Gamari2016-09-051-11/+12
| | | | | | | | | | | | | | | | | As reported in #12555 this code was terribly broken. Sadly, Autoconf was none-the-wiser. Thanks to @rwbarton for pointing this out. Test Plan: Test with libdw version newer and older and 0.158 Reviewers: hvr, austin, rwbarton Reviewed By: rwbarton Subscribers: thomie, rwbarton, erikd Differential Revision: https://phabricator.haskell.org/D2510 GHC Trac Issues: #12555
* Build system: mention ghc version in bindist's `configure --help` docdirThomas Miedema2016-06-141-1/+1
| | | | | | | | | | | This is a follow up to a74a3846c84ad55de3deeed8b2401a2ed514b2e1 , which made the same change but for the toplevel configure.ac. Reviewed by: erikd Differential Revision: https://phabricator.haskell.org/D2330 GHC Trac Issues: #11659
* Fix detection and use of `USE_LIBDW`Erik de Castro Lopo2016-06-011-2/+2
| | | | | | | | | | | | 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
* Rework CC/CC_STAGE0 handling in `configure.ac`Herbert Valerio Riedel2016-04-161-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* libdw: More precise version checkBen Gamari2016-04-161-2/+8
| | | | | | | | | | | | Test Plan: Try configure in an environment with older `libdw` Reviewers: hvr, austin Subscribers: thomie, erikd Differential Revision: https://phabricator.haskell.org/D2103 GHC Trac Issues: #11820
* Autoconf: detect and set CFLAGS/CPPFLAGS needed for C99 modeHerbert Valerio Riedel2016-03-281-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* mkDocs: Fix fallout from c5f4f95c64006a9fBen Gamari2016-02-071-1/+1
| | | | Fixes #11419
* mkDocs: Update for xzBen Gamari2016-02-071-3/+3
| | | | Fixes #11419.
* Build system: fix `pwd` issues on WindowsThomas Miedema2016-01-081-2/+3
| | | | | | | | | | | | | 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
* Build system: delete ghc-pwdThomas Miedema2016-01-041-1/+0
| | | | | | | | | | | | | | | | On Windows, with msys2, `pwd` works (as can be seen by the use of `pwd` that slipped into the validate script), so there is really no need for `ghc-pwd` anymore. Test Plan: try it Reviewers: austin, bgamari, Phyx Reviewed By: Phyx Subscribers: Phyx, erikd Differential Revision: https://phabricator.haskell.org/D1731
* Libdw: Add libdw-based stack unwindingBen Gamari2015-10-171-0/+5
| | | | | | | | | | | | | | | | | | | | | 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
* Build system: delete unused distrib/MakefileThomas Miedema2015-08-211-73/+0
|
* configure : LLVM and LD detections improvements (#10234).Erik de Castro Lopo2015-04-111-2/+19
| | | | | | | | | | | | | | | | | | | | * distrib/configure.ac.in : Detect correct version of LLVM tools as was done for the top level configure.ac in 42448e3757. * aclocal.m4 : Add a FIND_LD macro that can be used in both configure scripts. * Use new FIND_LD macro in both configure scripts. Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com> Test Plan: validate on amd64-linux and armhf-linux. Reviewers: rwbarton, austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D828 GHC Trac Issues: #10234
* Remove RAWCPP_FLAGS (Task #9094)Thomas Miedema2015-02-171-0/+2
| | | | | | | | | | | | Reviewers: carter, austin Reviewed By: austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D648 GHC Trac Issues: #9094
* Change all hashbangs to /usr/bin/env (#9057)Thomas Miedema2014-09-231-1/+1
| | | | | | | | | | | | | | | | | | Summary: ``` git grep -l '#!' | xargs sed -i 's|#!.*/bin/\([^ ]*\)$|#!/usr/bin/env \1|' ``` and some manual tweaking Test Plan: harbormaster Reviewers: austin Subscribers: hvr, simonmar, ezyang, carter Differential Revision: https://phabricator.haskell.org/D237 GHC Trac Issues: #9057
* workaround Solaris 11 GNU C CPP issue by using GNU C 3.4 as CPPKarel Gardas2014-08-171-58/+2
| | | | | | | | | | | | | | | | | | | | | | | Summary: Solaris 11 distributed GNU C 4.5.x is configured in a way that its CPP is not working well while invoked from GHC. GHC runs it with -x assembler-with-cpp and in this particular configuration GNU C CPP does not provide any line-markers so GHC's output of errors or warnings is confusing since it points to preprocessed file in /tmp and not to the original Haskell file. Fortunately old GNU C 3.4.x is still provided by the OS and when installed it'll be used automatically as GHC CPP which is whole logic of this patch. So although we use modern GCC as a C compiler and assembler we use old GCC as a C preprocessor. Test Plan: validate Reviewers: austin Reviewed By: austin Subscribers: phaskell, simonmar, relrod, ezyang, carter Differential Revision: https://phabricator.haskell.org/D151
* Control CPP through settings file (#8683)Carter Tazio Schonwald2014-07-021-0/+59
| | | | | | | | | | | | | | | | Summary: Allow the CPP program and flag choices for GHC be configured via the the ghc settings file Test Plan: ran validate yesterday Reviewers: hvr, austin, mzero, simonmar Reviewed By: austin, mzero, simonmar Subscribers: mzero, simonmar, relrod, carter Differential Revision: https://phabricator.haskell.org/D26
* Remove LANGUAGE pragrams implied by Haskell2010Herbert Valerio Riedel2014-05-142-3/+1
| | | | | | | | | Haskell2010 implies (at least) EmptyDataDecls, ForeignFunctionInterface, PatternGuards, DoAndIfThenElse, and RelaxedPolyRec. This is a follow-up to dd92e2179e3171a0630834b773c08d416101980d Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
* Replace all #!/usr/bin/perl with #!/usr/bin/env perlJoachim Breitner2014-04-301-1/+2
| | | | As suggested in #9057.
* Fix typoGabor Greif2014-03-231-1/+1
|
* add omitted FP_PROG_AR_SUPPORTS_ATFILE into the distribution configure.ac ↵Karel Gardas2014-02-191-0/+1
| | | | | | (fixes #8794) Signed-off-by: Austin Seipp <austin@well-typed.com>
* Globally replace "hackage.haskell.org" with "ghc.haskell.org"Simon Marlow2013-10-012-3/+3
|
* Detect linker information at runtime. Fixes Trac #6063Austin Seipp2013-06-161-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, we did ./configure time checks to see if 'GNU ld' supported certain options. If it does, we bake those options into the link step. See Trac #5240. Unfortunately, the linker we use at runtime can change for several reasons. One is that the user specifies -pgml 'foo'. The other is if /usr/bin/ld or whatnot changes from when GHC was built. Those options mentioned earlier are specific to GNU ld, but many systems support GNU gold too. This is Trac #6063. So we need to check at runtime what linker we're using. This is actually a little bit complicated because we normally use the C compiler as our linker. Windows and OS X are also special here. Finally, this patch also unconditionally gives '--hash-size=31' and '--reduce-memory-overheads' to the system linker if it's GNU ld. These options have been supported for 8+ years from what I can see, and there are probably a lot of other reasons why GHC would not work with such an ancient binutils, all things considered. See Note [Run-time linker info] in SysTools for details. There are plenty of comments as well in the surrounding code. Signed-off-by: Austin Seipp <aseipp@pobox.com>
* Tweak the bindist comparison toolIan Lynagh2013-04-202-1/+6
| | | | | | It now just warns about files it doesn't recognise, rather than giving an error. This means that random text files etc in the same directory as the bindists don't make it fall over.
* Remove the Windows installerIan Lynagh2013-04-202-801/+0
| | | | We now leave making installers to the Haskell Platform.
* Add support for OSX ld's -filelist flagIan Lynagh2013-03-181-0/+1
| | | | | Without it, when linking the split objects for Language.Haskell.TH.Syntax, the commandline was too long when listing all the files directly.
* Finish removing BootingFromHcIan Lynagh2013-02-171-3/+0
|
* remove old cross-compilation stuffSimon Marlow2013-01-301-5/+2
|
* Tweak the mkDocs scriptIan Lynagh2013-01-291-7/+20
|
* Add a "Done." line to compareIan Lynagh2013-01-271-1/+2
| | | | Makes it clearer whether it succeeded when redirecting output
* Add a kludge to the compare tool for unicode filenamesIan Lynagh2013-01-271-1/+6
| | | | | It thought that something impossible was happening when they were involved.
* Use Test.Regex.PCRE instead of .Posix in compareIan Lynagh2013-01-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This program: main :: IO () main = do re "[^ ]" "\207" re "[ ]" "\207" re " " "\207" re :: String -> String -> IO () re r str = let r' = makeRegex r :: Regex res = matchM r' str :: Maybe (String, String, String, [String]) in print res prints Nothing Nothing Nothing for me with Posix, but Just ("","\207","",[]) Nothing Nothing with PCRE. This was causing compare to fail with Tar line doesn't parse: "drwxrwxr-x simonmar/GHC 0 2012-12-08 21:35 ghc-7.6.1.20121207/libraries/haskeline/tests/dummy-\206\188\206\177\207\\302\\203/" on the GHC source tarball.
* Add support to compare for comparing whole directoriesIan Lynagh2013-01-272-12/+62
|
* Remove unused FPTOOLS_SHEBANG_PERLIan Lynagh2012-11-131-1/+0
|
* Remove fake-happy; it's no longer usefulIan Lynagh2012-10-111-20/+0
|
* Remove cvs-build; it's no longer usedIan Lynagh2012-10-111-137/+0
|
* Remove the distrib/prep-bin-* scriptsIan Lynagh2012-10-117-401/+0
| | | | They are no longer used
* Remove distrib/Mac*; fixes #7136Ian Lynagh2012-10-1118-1040/+0
| | | | | We no longer produce installers fo OS X; we leave that to the Haskell Platform team.
* Build the dynamic way by default on Linux/amd64Ian Lynagh2012-10-031-1/+1
| | | | | | | | | | | | | 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/...
* Set the value of Unregisterised in the bindist configure.acIan Lynagh2012-08-081-0/+3
| | | | | Now that it's included in settings, the bindist configure script needs to know it.
* Define LdCmd in the bindist configure.acIan Lynagh2012-08-061-0/+6
|
* More more ld-related settings into the settings fileIan Lynagh2012-08-051-0/+3
| | | | Related to #4862
* Improve the size-change detection heuristics in the compare toolIan Lynagh2012-05-301-10/+13
|