summaryrefslogtreecommitdiff
path: root/aclocal.m4
Commit message (Collapse)AuthorAgeFilesLines
* Find the target gcc when cross-compilingReid Barton2014-09-161-39/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: "./configure --target=TARGET" was broken; it would use the host gcc. (So you had to explicitly specify "--with-gcc=TARGET-gcc" also, as a workaround.) This was broken by commit fc4856f9e811d9a23ae9212f43a09ddf5ef12b26 for #8148. A comment claimed that FP_ARG_WITH_PATH_GNU_PROG_OPTIONAL was the same as FP_ARG_WITH_PATH_GNU_PROG except for not raising an error when the program isn't found; but that wasn't true -- the former didn't prepend the target name when cross-compiling. We actually need three versions of FP_ARG_WITH_PATH_GNU_PROG since the LLVM tools are usually not prefixed with the target name even when cross-compiling. So I generalized the logic in a single macro. Test Plan: Built with "./configure --target=i386-unknown-linux" and BuildFlavour=quick, successfully Reviewers: ezyang, austin Reviewed By: ezyang, austin Subscribers: simonmar, ezyang, carter Differential Revision: https://phabricator.haskell.org/D204
* Make Applicative a superclass of MonadAustin Seipp2014-09-091-2/+2
| | | | | | | | | | | | | | | | | | | | | Summary: This includes pretty much all the changes needed to make `Applicative` a superclass of `Monad` finally. There's mostly reshuffling in the interests of avoid orphans and boot files, but luckily we can resolve all of them, pretty much. The only catch was that Alternative/MonadPlus also had to go into Prelude to avoid this. As a result, we must update the hsc2hs and haddock submodules. Signed-off-by: Austin Seipp <austin@well-typed.com> Test Plan: Build things, they might not explode horribly. Reviewers: hvr, simonmar Subscribers: simonmar Differential Revision: https://phabricator.haskell.org/D13
* Set llc and opt commands on all platformsAustin Seipp2014-09-011-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: LLVM llc and opt commands should be set on all platforms, including Windows. If they're not, GHC tries to execute an unnamed executable, resulting in error messages such as: Error (figuring out LLVM version): : runInteractiveProcess: invalid argument (Invalid argument) <no location info>: Warning: Couldn't figure out LLVM version! Make sure you have installed LLVM This regression was introduced in e6bfc596. Test Plan: Build GHC and test if --info shows sensible values of "LLVM llc command" and "LLVM opt command" Reviewers: austin, #ghc Reviewed By: austin, #ghc Subscribers: austin Projects: #ghc Differential Revision: https://phabricator.haskell.org/D190 GHC Trac Issues: #7143
* Fix #9465.Gabor Pali2014-08-221-1/+1
| | | | | | It turned out the sed(1) expressions are not fully portable. So revist my earlier attempt for getting GHC_LDFLAGS in the configure script and rewrite it in Perl instead.
* workaround Solaris 11 GNU C CPP issue by using GNU C 3.4 as CPPKarel Gardas2014-08-171-0/+98
| | | | | | | | | | | | | | | | | | | | | | | 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
* Make configure's sed(1) expression for GHC_LDFLAGS more BSD-friendly.Gabor Pali2014-08-151-1/+1
|
* Do not check permissions when running find on Windows.niklas2014-07-281-2/+6
| | | | | | Fixes #9363. Signed-off-by: Austin Seipp <austin@well-typed.com>
* Unbreak the build on FreeBSD/i386, where the default target arch is i486.Gabor Pali2014-07-211-0/+3
| | | | | | | The recent version of ghc-prim assumes a more modern processor as it exploits built-in atomic operations, and some of them are not yet present on i486. Hence the -march flag is explicitly set to i686 for the C compiler -- just to be in sync with the default of other distributions.
* Set i686 as the minimum architecture on 32-bit mingwniklas2014-07-181-0/+3
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* add support for x86_64-solaris2 platformKarel Gardas2014-07-131-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | Summary: this set of patches adds support for x86_64-solaris2 platform Solaris is multi-lib platform which means it provides 32bit user-land together with 32bit and 64bit libraries. The 32bit libraries are located in <somewhere>/lib directories while 64bit libraries are located in <somewhere>/lib/64 directories. This is why GHCi required the fix since otherwise it'll attempt to load /usr/lib/libgmp.so which is 32bit library into 64bit binary process space (GHCi). This of course fails with wrong ELFCLASS32 error message. Another issue was that by default GNU C distributed with Solaris compiles into 32bit binary. We need to enforce compilation to 64bit binary by adding appropriate -m64 option. Test Plan: already built on x86_64-solaris2 Reviewers: austin Reviewed By: austin Subscribers: phaskell, simonmar, relrod, carter Differential Revision: https://phabricator.haskell.org/D68
* Fix windows breakage (fallout from 34f7e9a3c998)Austin Seipp2014-07-041-0/+1
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* Control CPP through settings file (#8683)Carter Tazio Schonwald2014-07-021-0/+9
| | | | | | | | | | | | | | | | 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 external coreAustin Seipp2014-05-031-1/+1
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* Add the powerpc64le architectureColin Watson2014-04-211-1/+4
| | | | | | | | | | This is ArchUnknown for now, as it requires some porting work over and above powerpc64 due to such things as the different function calling sequence in the ELFv2 ABI. For now, an unregisterised port is better than nothing. Signed-off-by: Colin Watson <cjwatson@debian.org> Signed-off-by: Austin Seipp <austin@well-typed.com>
* ghc: initial AArch64 patchesColin Watson2014-04-211-0/+6
| | | | Signed-off-by: Austin Seipp <austin@well-typed.com>
* Remove debugging outputSimon Marlow2014-03-281-1/+0
|
* Use LDFLAGS when compiling ghc-pwdSimon Marlow2014-03-271-1/+7
|
* --with-gcc overrides CC_STAGE0 when not cross-compiling (#8498)Simon Marlow2014-03-271-1/+17
|
* fix build failure on Solaris 10 due to RANLIB being set to ':' by configure ↵Karel Gardas2014-02-191-0/+10
| | | | | | (#8795) Signed-off-by: Austin Seipp <austin@well-typed.com>
* Allow "amd64" to be recognized as an x86_64 platform.Gabor Pali2014-01-171-2/+2
|
* Fix #8675Austin Seipp2014-01-171-5/+0
| | | | | | | | Haddock no longer has a generated parser, so we don't need it in the sdist and we certainly don't want to check for it in the ./configure script (as that would be bogus.) Signed-off-by: Austin Seipp <austin@well-typed.com>
* Trivial comment fix. (#8358)Zac Slade2013-10-151-1/+1
| | | | Version of Happy required is now 1.19.
* Restore old names of comparison primopsJan Stolarek2013-09-181-14/+4
| | | | | | | | | | | | In 6579a6c we removed existing comparison primops and introduced new ones returning Int# instead of Bool. This commit (and associated commits in array, base, dph, ghc-prim, integer-gmp, integer-simple, primitive, testsuite and template-haskell) restores old names of primops. This allows us to keep our API cleaner at the price of not having backwards compatibility. This patch also temporalily disables fix for #8317 (optimization of tagToEnum# at Core level). We need to fix #8326 first, otherwise our primops code will be very slow.
* Limit upper versions of Alex and HappyJan Stolarek2013-09-181-0/+10
| | | | This is temporary until new bool primops have been pushed.
* Make validate play nice with clang (for Xcode 5 command line tools)Manuel M T Chakravarty2013-09-041-1/+13
| | | | * This partially fixes #8148. However, --with-ghc-4.8 will still not work given the rather dubious m4 macros and the failures in the test suite due to '-nodefaultlibs' still need to be fixed.
* Rework how iOS does linking (#8127)Austin Seipp2013-08-281-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | iOS has some particular constraints about how applications can be built: * We must generate a static library (.a) since XCode does the final link. * We need to carefully give the right set of arguments to libtool in the case we're generating an archive. * Dynamic linking isn't supported. * It can only be done on OS X. This patch cleans up all of the above. We add a new flag `-staticlib` (only supported on Darwin) that allows us to produce archive files using libtool, and a -pgmlibtool flag to control which 'libtool' executable to use. This fixes #8127. I believe this is the last piece missing from the iOS cross compiler. Authored-by: Luke Iannini <lukexi@me.com> Authored-by: Maxwell Swadling <maxwellswadling@gmail.com> Authored-by: Stephen Blackheath <...@blacksapphire.com> Signed-off-by: Austin Seipp <aseipp@pobox.com>
* Delete trailing whitespace in aclocal.m4Austin Seipp2013-08-241-3/+3
| | | | Signed-off-by: Austin Seipp <aseipp@pobox.com>
* Add support for iOS simulator (issue #8152).Austin Seipp2013-08-241-2/+2
| | | | | | | | The iOS simulator is essentially an iOS target but for an x86 machine instead. It doesn't support the native code generator either, though. Authored-by: Stephen Blackheath <...@blacksapphire.com> Signed-off-by: Austin Seipp <aseipp@pobox.com>
* iOS: generate archive files when compiling.Austin Seipp2013-08-141-17/+34
| | | | | | | | | | | When cross compiling to iOS, we generate archive files which are linked into the final executable. We already *did* generate archive files - just with the wrong suffix. Fixes #8125. Authored-by: Stephen Blackheath <...@blacksapphire.com> Signed-off-by: Austin Seipp <aseipp@pobox.com>
* Change the ranlib detectionIan Lynagh2013-07-031-24/+36
| | | | | | | | On Windows, the ranlib in the path may not be the right ranlib (it may be the 32bit ranlib when we are making a Win64 compiler, or vice-versa). Therefore we can't leave it up to libffi to detect the right ranlib, but need to tell it which ranlib to use. This means that we need to find ranlib even if we don't actually need it ourselves.
* Fix #7661 regression.David Terei2013-06-191-1/+1
| | | | Patch from singpolyma.
* Detect linker information at runtime. Fixes Trac #6063Austin Seipp2013-06-161-33/+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>
* punctuation in commentGabor Greif2013-06-111-1/+1
|
* Improve the version numbers generated by the build systemIan Lynagh2013-06-071-0/+9
| | | | If we can't find a better date to use, then use today's date.
* Remove an out-of-date commentIan Lynagh2013-05-301-2/+0
|
* Need to work around #7799 on all i386 platforms, not just DarwinIan Lynagh2013-05-201-1/+1
|
* Fix build problem: Error: junk `.get_pc_thunk.bx' after expression; trac #7799Ian Lynagh2013-05-191-0/+7
| | | | | | Affects i386 only. Some gcc's generate code containing __i686, and then define that symbol to 1, which causes compilation to fail. We undef the symbol to work around it.
* Allow to bootstrap with a compiler from the FreeBSD Ports CollectionGabor Pali2013-03-241-1/+1
|
* Add support for OSX ld's -filelist flagIan Lynagh2013-03-181-0/+32
| | | | | Without it, when linking the split objects for Language.Haskell.TH.Syntax, the commandline was too long when listing all the files directly.
* Fix construction of ALL_ALEX_OPTS and ALL_AS_OPTSMax Bolingbroke2013-03-101-3/+8
| | | | Signed-off-by: David Waern <david.waern@gmail.com>
* Fix accidentally commited debug form of FIND_LLVM_PROG.David Terei2013-03-031-3/+3
|
* Fix some m4/shell syntax in aclocal.m4, spotted by Jan StolarekIan Lynagh2013-02-281-1/+1
| | | | [ ] is m4 syntax, so we need to use 'test foo' rather than '[ foo ]'.
* Split SettingsCCompilerFlags into non-link and link portionsGabor Greif2013-02-251-1/+3
| | | | | | | | | This fixes certain older GCCs which do not accept link options when assembling or compiling: ppc_85xx-gcc: --hash-size=31: linker input file unused because linking not done ppc_85xx-gcc: --reduce-memory-overheads: linker input file unused because linking not done and diagnose this to stderr.
* Fix autoconf code to find LLVM tools.Geoffrey Mainland2013-02-251-4/+6
| | | | | | | The loop exit condition was testing ${LLC} instead of $1, which was incorrect. While I'm here, quote the path being tested since it may contain spaces (e.g. on Windows), and don't search paths that don't exist, which eliminates un-useful error messages from find.
* Better handling of find llvm tools. Use IFS as opposed to more hacky trDavid Terei2013-02-201-3/+10
| | | | approach. This way can handle spaces in paths.
* Remove the MACOSX_DEPLOYMENT stuff; fixes #7559Ian Lynagh2013-02-171-29/+0
| | | | | If anyone wants to do this in the future, they should just set appropriate CC_OPTS/LD_OPTS variables instead.
* Whitespace onlyIan Lynagh2013-02-171-25/+25
|
* Add missing ;; in aclocal.m4Ian Lynagh2013-02-171-0/+1
|
* iOS patch no 1: Select operating system; from StephenBlackheathIan Lynagh2013-02-171-13/+23
|
* Fix issues with finding llvm tools again (#7661).David Terei2013-02-141-2/+2
| | | | Patch modified from one by Karel Gardas <karel.gardas@centrum.cz>.