summaryrefslogtreecommitdiff
path: root/includes/ghc.mk
Commit message (Collapse)AuthorAgeFilesLines
* Rework CC/CC_STAGE0 handling in `configure.ac`Herbert Valerio Riedel2016-04-161-1/+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
* Scrap IRIX supportHerbert Valerio Riedel2016-03-281-5/+0
| | | | | | | | | | | | | | | | 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
* Drop redundant `-D__GLASGOW_HASKELL__=...` flagHerbert Valerio Riedel2015-12-311-3/+1
| | | | | | | In 3549c952b535803270872adaf87262f2df0295a4 a `include/ghcversions.h` include file was introduced which defines `__GLASGOW_HASKELL__` as well. So there's no need to define it twice.
* Make `derivedConstants` more crosscompile-friendlyHerbert Valerio Riedel2015-11-191-0/+4
| | | | | | | | | | | | | | | | | | `derivedConstants` currently uses `System.Info.os` for decisions (which doesn't necessarily reflect the build-target), as well as hardcoding "/usr/bin/objdump" for openbsd. This patch auto-detects `objdump` similiar to how `nm` is detected via Autoconf as well as passing the target-os into `derivedConstants` via commandline. Reviewers: austin, kgardas, erikd, bgamari Reviewed By: kgardas, erikd, bgamari Subscribers: kgardas, thomie, erikd Differential Revision: https://phabricator.haskell.org/D1499
* Build system: simplify install.mk.inThomas Miedema2015-08-211-4/+4
| | | | | | | | | | 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.
* Fix bad '... \\' escape in ghcversion.h generationHerbert Valerio Riedel2015-01-191-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | Today I learned about the peculiarities of escaping within single-quotes: Turns out, echo 'foo \\' emits foo \\ rather than escaping the '\'. Curiously, if you need to escape a ' within single-quotes, here's how to do it echo 'foo '\'' bar' which will emit foo ' bar This fixes #10002
* Fix typo in GLASGOW_HASKELL_PATCHLEVEL2 macroHerbert Valerio Riedel2014-12-221-1/+1
| | | | This typo slipped in through 3549c952b535803270872adaf87262f2df0295a4
* Implement `MIN_VERSION_GLASGOW_HASKELL()` macroHerbert Valerio Riedel2014-10-051-5/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This exposes the `cProjectPatchLevel{1,2}` value at the CPP level to allow it to be used in CPP conditionals. Concretely, GHC 7.10.2.20150623 would result in #define __GLASGOW_HASKELL__ 710 #define __GLASGOW_HASKELL_PATCHLEVEL1__ 2 #define __GLASGOW_HASKELL_PATCHLEVEL2__ 20150623 while GHC 7.10.3 results in #define __GLASGOW_HASKELL__ 710 #define __GLASGOW_HASKELL_PATCHLEVEL1__ 3 and finally GHC 7.9.20141009 results in #define __GLASGOW_HASKELL__ 709 #define __GLASGOW_HASKELL_PATCHLEVEL1__ 20141009 As it's error-prone to properly express CPP conditionals for testing GHC multi-component versions, a new macro `MIN_VERSION_GLASGOW_HASKELL()` is provided (also via the new CPP include file `ghcversion.h`) Finally, in order to make it easier to define the new CPP macro `MIN_VERSION_GLASGOW_HASKELL()`, a new default-included `include/ghcversion.h` is used for the new CPP definitions. Reviewed By: ekmett, austin, #ghc Differential Revision: https://phabricator.haskell.org/D66
* Globally replace "hackage.haskell.org" with "ghc.haskell.org"Simon Marlow2013-10-011-2/+2
|
* Add some missing clang bits to the build system.Austin Seipp2013-06-171-0/+5
| | | | Signed-off-by: Austin Seipp <aseipp@pobox.com>
* Fix an all-target call in the build systemIan Lynagh2013-05-101-1/+1
|
* Small build system refactoringIan Lynagh2013-04-201-5/+5
|
* Add some more flags to includes_CC_OPTSIan Lynagh2012-11-121-0/+5
| | | | Fixes build on OS X
* Replace mkDerivedConstants.c with DeriveConstants.hsIan Lynagh2012-11-121-56/+22
| | | | | | | | | DeriveConstants.hs works in a cross-compilation-friendly way. Rather than running a C program that prints out the constants, we just compile a C file which has the constants are encoded in symbol sizes. We then parse the output of 'nm' to find out what the constants are. Based on work by Gabor Greif <ggreif@gmail.com>.
* Fix build on platforms on which we don't have register infoIan Lynagh2012-10-271-1/+4
|
* Build the dynamic way by default on Linux/amd64Ian Lynagh2012-10-031-0/+5
| | | | | | | | | | | | | 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/...
* Remove the --gen-haskell mode of mkDerivedConstantsIan Lynagh2012-09-131-15/+3
| | | | It no longer generates anything
* Add a couple more mkDerivedConstants modesIan Lynagh2012-09-131-0/+16
| | | | | | We now also generate nice wrappers for the platformConstants methods. For now it's all commented out as the definitions conflict with those in Constants.
* We need to install the platformConstants fileIan Lynagh2012-09-131-0/+2
|
* Add more modes to mkDerivedConstantsIan Lynagh2012-09-131-3/+19
| | | | We now generate a platformConstants file that we can read at runtime.
* Use conditionals rather than CPP in mkDerivedConstantsIan Lynagh2012-09-131-34/+7
| | | | | This means we only need to build one copy of the program, which will make life simpler as I plan to add more variants.
* typoGabor Greif2012-07-291-1/+1
|
* define TABLES_NEXT_TO_CODE in ghcautoconf.h (#5933)Simon Marlow2012-03-131-14/+17
|
* Improve support for cross-compilationSimon Marlow2012-01-301-2/+20
| | | | Patchset from Stephen Blackheath <stephen.blackheath@ipwnstudios.com>
* RefactoringIan Lynagh2012-01-081-5/+3
| | | | | This is working towards being able to put ghcautoconf.h and ghcplatform.h in includes/dist
* Fix header installationIan Lynagh2011-12-021-1/+1
|
* Move includes/DerivedConstants.h and includes/GHCConstants.h into dist dirsIan Lynagh2011-12-021-5/+8
| | | | | | | | | | When they existed, they were getting included in the includes_H_FILES variable (as it uses wildcard to find all header files). But the .depends files for the programs that generate the headers depend on $(includes_H_FILES), so the .depends files looked out-of-date once the headers had been created. This caused unnecessary make reinvocations. So now we put them in dist* directories, where they ought to be anyway.
* mergeSimon Marlow2011-11-221-0/+4
|\
| * Add autoconf support to detect an LLVM-based C compilerDavid M Peixotto2011-10-071-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support to the autoconf scripts to detect when we are using a C compiler that uses an LLVM back end. An LLVM back end does not support all of the extensions use by GCC, so we need to perform some conditional compilation in the runtime, particularly for handling thread local storage and global register variables. The changes here will set the CC_LLVM_BACKEND in the autoconf scripts if we detect an llvm-based compiler. We use this variable to define the llvm_CC_FLAVOR variable that we can use in the runtime code to conditionally compile for LLVM.
* | Improve the way we call "rm" in the build system; fixes trac #4916Ian Lynagh2011-11-191-1/+1
|/ | | | | | | | | | 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.
* Make include file paths a little prettierIan Lynagh2011-03-161-0/+2
| | | | | This isn't important, but it stops us getting [...]/./[...] in the paths in bindists.
* Tweak some deps to avoid multiple $(wildcard ...)sIan Lynagh2011-01-231-2/+2
| | | | | | | Note that some things depending on the rts/includes header files now depend on more files: They used to include depend on includes/*.h, but now they also depend on header files in subdirectories. As far as I can see this was a bug.
* Fix installation on cygwinIan Lynagh2011-01-111-4/+4
|
* Rejig the includes/ installation rulesIan Lynagh2011-01-091-8/+12
| | | | | | They're a little nicer now, and a regression in the cygwin build is fixed (the $i in the destination wasn't surviving being passed through cygpath).
* On Cygwin, use a Cygwin-style path for /bin/install's destinationIan Lynagh2011-01-061-3/+3
| | | | | | | | | | | | | | | | | 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
* Correct the stage that the includes/ tools are built inIan Lynagh2010-12-061-2/+2
|
* Make mkDerivedConstants as a stage 1 programIan Lynagh2010-07-171-2/+2
| | | | This way it gets the defines for the right platform when cross-compiling
* Fix HC porting test in makefilesIan Lynagh2010-07-161-3/+3
| | | | | | Now that we are trying to support cross compilation, we can't use "$(TARGETPLATFORM)" != "$(HOSTPLATFORM)" as a test for HC-porting.
* Eliminate mkdependCIan Lynagh2009-12-091-2/+2
| | | | We now just call gcc to get the dependencies directly
* Make installation on *nix work for paths with spaces in their nameIan Lynagh2009-11-051-3/+3
| | | | | | 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.
* fix installation of header files (#3451)Simon Marlow2009-09-101-3/+14
|
* RTS tidyup sweep, first phaseSimon Marlow2009-08-021-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The first phase of this tidyup is focussed on the header files, and in particular making sure we are exposinng publicly exactly what we need to, and no more. - Rts.h now includes everything that the RTS exposes publicly, rather than a random subset of it. - Most of the public header files have moved into subdirectories, and many of them have been renamed. But clients should not need to include any of the other headers directly, just #include the main public headers: Rts.h, HsFFI.h, RtsAPI.h. - All the headers needed for via-C compilation have moved into the stg subdirectory, which is self-contained. Most of the headers for the rest of the RTS APIs have moved into the rts subdirectory. - I left MachDeps.h where it is, because it is so widely used in Haskell code. - I left a deprecated stub for RtsFlags.h in place. The flag structures are now exposed by Rts.h. - Various internal APIs are no longer exposed by public header files. - Various bits of dead code and declarations have been removed - More gcc warnings are turned on, and the RTS code is more warning-clean. - More source files #include "PosixSource.h", and hence only use standard POSIX (1003.1c-1995) interfaces. There is a lot more tidying up still to do, this is just the first pass. I also intend to standardise the names for external RTS APIs (e.g use the rts_ prefix consistently), and declare the internal APIs as hidden for shared libraries.
* Stop building the rts against gmpDuncan Coutts2009-06-131-7/+0
| | | | Nothing from gmp is used in the rts anymore.
* Quote commands that we run, so they work if there are space in their pathsIan Lynagh2009-05-301-1/+1
| | | | | I've also added some missing $s to some makefiles. These aren't technically necessary, but it's nice to be consistent.
* fix a dependency: Makefile -> includes/MakefileSimon Marlow2009-05-191-1/+1
|
* Add a header to all build system files:Simon Marlow2009-04-281-0/+12
| | | | | | | | | | | | | | # ----------------------------------------------------------------------------- # # (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 # # -----------------------------------------------------------------------------
* GHC new build system megapatchIan Lynagh2009-04-261-0/+179