Compare commits

...

142 Commits

Author SHA1 Message Date
Troy Dawson 5eeb12394c Bump release 2020-09-09 15:20:40 +00:00
Troy Dawson 5caca1ad23 Remove all un-needed %if
Remove all %if's that deal with old fedora releases.
2020-08-18 15:12:05 +00:00
Troy Dawson 7ab1af8634 Remove un-needed %if
This %if statement is no longer needed because it addresses unsupported Fedora releases.
This also causes ELN builds to not be the same as Fedora Rawhide builds.

Signed-off-by: Troy Dawson <tdawson@redhat.com>
2020-08-12 20:01:37 +00:00
Fedora Release Engineering 8c86b056b8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-07-27 18:40:52 +00:00
Jens Petersen 9fdeb09153 8.8.4 bugfix release 2020-07-16 21:29:42 +08:00
Jens Petersen 263754c55c correct oversized tarball 2020-07-16 15:19:40 +08:00
Jens Petersen 308eac11f6 update sources for 8.8.3 2020-07-15 12:00:13 +08:00
Jens Petersen bc4cb4c3a0 add fix-build-using-unregisterised-v8.6.patch from Debian 2020-07-15 03:03:49 +08:00
Jens Petersen a07f9ed8a0 rebase to 8.8.3 from ghc:8.8 2020-07-15 01:53:44 +08:00
Jens Petersen 915a022b3c remove redundant unused ghc-configure-fix-sphinx-version-check.patch 2020-07-14 19:54:43 +08:00
Jens Petersen db12ef1861 use python3-sphinx also for rhel8 2020-07-06 15:38:46 +08:00
Jens Petersen 8abb3a79a1 drop "recommends: ghc-base-doc" comment
warning: Macro expanded in comment on line 236: %{base_ver}-%{release}
2020-04-09 19:23:49 +08:00
Jens Petersen 0be02c427b fix gen_contents_index also when no docs (#1813548)
- cronjob used to switch to /usr/share/doc/ghc/html/libraries
- since docs now subpackaged, need to check for no docs

- we could also recommend ghc-base-doc
2020-04-09 19:03:57 +08:00
Jens Petersen 8d4b4ec6e9 rename dwarf_unwind to dwarf and use dwarf flavour 2020-03-11 01:00:50 +08:00
Jens Petersen a82189be91 add bcond for dwarf-unwind debuginfo 2020-03-10 20:07:34 +08:00
Jens Petersen 3a08236cd2 rebuild against ghc-rpm-macros fixed for subpackage prof deps
testcase: ghc-prof(...) was missing from generated Requires
2020-02-10 19:30:18 +08:00
Fedora Release Engineering 8bb182a80d - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-01-28 20:07:50 +00:00
Jens Petersen 6dbb99b200 try %bcond haddock for full build
since macros.ghc-os only available in full builtroot
2019-07-31 16:54:40 +00:00
Jens Petersen 1b033f2096 order previous changelog too 2019-07-31 10:21:42 +00:00
Jens Petersen 8619be5910 reset changelog date 2019-07-31 10:17:47 +00:00
Jens Petersen 7ef199a259 update changelog with latest patches 2019-07-31 10:11:29 +00:00
Jens Petersen 826e5b4b12 use Debian fix-build-using-unregisterized-v8.4.patch
https://gitlab.haskell.org/ghc/ghc/issues/15913

- remove ghc wrapper script hack!
2019-07-31 10:11:29 +00:00
Jens Petersen 6250e0ee75 add some patches from Debian (thanks!)
https://salsa.debian.org/haskell-team/DHG_packages/tree/master/p/ghc/debian/patches

- rename 35a897782b6b0a252da7fdcf4921198ad4e1d96c.patch -> PprC-Add-support-for-adjacent-floats.patch
- add_-latomic_to_ghc-prim.patch
- e175aaf6918bb2b497b83618dc4c270a0d231a1c.patch (rts osReserveHeapMemory block alignment)
2019-07-31 10:11:29 +00:00
Jens Petersen bbd41d24d2 fix initgroups issue in process library
https://github.com/haskell/process/pull/148
2019-07-31 10:11:29 +00:00
Jens Petersen 5ee2271b2b update to ghc-8.6.5 (backported from ghc:8.6) 2019-07-31 10:11:29 +00:00
Jens Petersen 63a3f34ef2 haddock: add --hoogle & --quickjump 2019-07-31 10:11:29 +00:00
Jens Petersen 850e71d743 lock manual bcond to with_haddock
We should probably just use haddock until Hadrian...
2019-07-31 10:11:29 +00:00
Jens Petersen 48dd6aa4cd major rework of ghc packaging: particularly prof and doc subpackages
- bump release to 99
- drop ghc-doc-index script and cronjob
- lock compiler to ghc-base-devel verrel
- switch from %without_prof to %with_ghc_prof
- split docs bcond to %with_haddock and %with_manual
- disable debuginfo for quickbuild
- BR ghc-rpm-macros 2.0 and make
- allow python2-sphinx for current fedora releases
- lighten ghc: only suggest ghc-doc, ghc-doc-index, ghc-manual, ghc-prof
- drop support for rhel6 builds
- use %ghc_set_gcc_flags
- remove alternatives
- filetriggers for haddock index updating

- in future we might separate static devel subpackages too (if cabal
  can handle vanilla or dyn only)
2019-07-31 10:11:29 +00:00
Fedora Release Engineering 79d5111c4f - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-07-25 01:58:32 +00:00
Jens Petersen 0d665079cd add transfiletriggers to replace individual post/postun scriptlets 2019-06-28 04:15:51 +00:00
Jens Petersen 05e47a1520 fix 32bit adjacent floats on 64bit unregisterized
upstream patch for https://ghc.haskell.org/trac/ghc/ticket/15853
2019-03-04 14:04:48 +08:00
Jens Petersen 81d7c8d8c4 leave stripping to rpm 2019-02-16 07:50:45 +08:00
Jens Petersen cf89f14c20 add upstream fix for sphinx-1.8 2019-02-16 01:30:47 +08:00
Jens Petersen 40733c85d7 update to 8.4 (rebase to 8.4 branch) 2019-02-16 00:30:41 +08:00
Jens Petersen 0e2215916b backport tweaks from ghc:8.4
- add ghc_unregisterized_arches
- Recommends zlib-devel
- epel6 tweaks
2019-02-08 10:29:42 +08:00
Fedora Release Engineering bbb03aa71e - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-01-31 21:03:15 +00:00
Zbigniew Jędrzejewski-Szmek 93ee9c0485 Use C.UTF-8 locale 2018-11-18 23:52:46 +01:00
Jens Petersen 4ada0e9763 Recommends for ghc-manual and ghc-doc-cron 2018-10-22 17:56:17 +09:00
Jens Petersen c2ba5d5fdd update ghc wiki Platforms url 2018-10-17 18:22:46 +09:00
Jens Petersen aba55d0da9 add missing ghc-warnings.mk-CC-Wall.patch 2018-10-17 12:33:07 +09:00
Jens Petersen 65eec31b69 backport build configs from 8.4 module; extend quickbuild to perf_build
- backport quickbuild config from 8.4 module
- disable -Wall on s390x like in 8.4 module to silence warning flood
  and simplify setting of CFLAGS
- setup build.mk in setup section, taken from copr and module
- enable buildpath-abi-stability.patch (from Debian)
2018-10-17 12:07:29 +09:00
Peter Robinson 20edd0d34e Update alternatives dependencies 2018-10-16 12:33:21 +01:00
Miro Hrončok 381b73e8f4 Use python3-sphinx to build the docs 2018-08-06 21:53:40 +02:00
Jens Petersen c07f27990b (aarch64/s390) remove -Wall and -Werror=format-security separately 2018-07-24 19:14:11 +09:00
Fedora Release Engineering ccd70e89cb - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-07-13 01:28:32 +00:00
Jens Petersen 11936da42f ghc manpage is now built 2018-07-09 12:29:54 +02:00
Jens Petersen eccc41df53 improve testsuite comment 2018-07-08 07:50:52 +02:00
Jens Petersen 849bd207fc add manpages from Debian 2018-07-08 07:50:26 +02:00
Jens Petersen ee61410c16 use uppercase YES and NO in build.mk
lowercase is not supported
2018-07-01 20:39:51 +09:00
Jens Petersen 5219736e17 disable testsuite, bootstrap and build fixes 2018-06-01 16:05:10 +09:00
Jens Petersen f77e76b10e add ghc_llvm_archs 2018-05-30 16:45:25 +09:00
Jens Petersen e8d82ec703 add changelogs for docs build changes 2018-05-29 00:03:28 +09:00
Jens Petersen 7f6a73b913 merge manual and haddock bcond to docs
disabling haddock seems to disable manual anyway
https://ghc.haskell.org/trac/ghc/ticket/15190
2018-05-28 20:37:39 +09:00
Jens Petersen 52da5da5ad try fixing sphinx-build --version detection in configure
https://github.com/ghc/ghc/pull/143
2018-05-28 13:29:30 +09:00
Jens Petersen 8a638fc974 extend and simplify bcond for build configuration
- move manuals to ghc-manual.noarch
- rename ghc-doc-index to ghc-doc-cron.noarch
- drop bootstrap builds and do ABI hash checks unless ghc version changed
- no longer need autotools on aarch64
2018-05-28 11:58:23 +09:00
Jens Petersen d42cad8307 drop unstable url from D4159.patch and add D4159 url 2018-05-23 11:18:05 +09:00
Jens Petersen 4e4a2d2f6b silence the ghc-pkg abi-depends warnings when installing packages
forward-port from f28 branch
2018-05-03 00:52:51 +09:00
Jens Petersen 330a973466 move manuals to ghc-doc package again
after a long break...
2018-05-02 22:41:06 +09:00
Jens Petersen 7552d58a21 ghost ghc-doc-index local state and more libraries index files 2018-05-02 22:36:35 +09:00
Igor Gnatenko d6663edd84
Escape macros in %changelog
Reference: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/Y2ZUKK2B7T2IKXPMODNF6HB2O5T5TS6H/
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-02-09 09:04:35 +01:00
Fedora Release Engineering bdcdb9aad9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-02-07 11:11:05 +00:00
Jens Petersen 22bda2eed9 upstream patch under review in Phabricator to workaround shadow hash issue
https://ghc.haskell.org/trac/ghc/ticket/14381
2018-01-30 00:58:52 +01:00
Jens Petersen a389265b13 add 8.2.2 testsuite tarball 2018-01-24 18:45:50 +01:00
Jens Petersen e7dfcf7528 8.2.2 perf build 2018-01-24 18:34:47 +01:00
Jens Petersen f54dabd8b3 update to 8.2.2: backport from fedora-haskell/ghc
bootstrap build
2018-01-24 00:12:56 +01:00
Jens Petersen a122fc3e75 python2 and comment out %mandir properly 2017-12-28 17:41:20 +01:00
Jens Petersen 32be9d0079 correct source url 2017-11-22 15:23:53 +05:30
Jens Petersen 428b709769 update source urls to the ones they redirected to 2017-10-27 13:59:40 +09:00
Jens Petersen 7a8b99ca5e mark other subpackages correctly as BSD license 2017-10-26 23:24:17 +09:00
Jens Petersen 98bb662b6d more license fields cleanup
put in explicit BSD's and only use %quote for macros args
2017-10-26 23:17:19 +09:00
Jens Petersen 6b6b783809 fix space %BSDHaskellReport macro for rpm-4.14 2017-10-26 20:21:58 +09:00
Jens Petersen 8ad1d461c8 exclude ghc-boot from ghc-libraries
but ghc-boot-th should be there for TH
2017-10-26 20:19:31 +09:00
Fedora Release Engineering 1564a79df6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild 2017-08-02 21:09:08 +00:00
Fedora Release Engineering 8bcd1313fb - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild 2017-07-26 09:30:47 +00:00
Petr Písař 30f7d48eb5 perl dependency renamed to perl-interpreter <https://fedoraproject.org/wiki/Changes/perl_Package_to_Install_Core_Modules> 2017-07-12 14:16:12 +02:00
Jens Petersen 51ebe87923 do not fail id (ABI) check if package uninstalled 2017-02-18 07:15:15 +09:00
Jens Petersen 494c76ae55 fix ABI check for uninstalled package
(which may be redundant now)

ghc-xhtml is not built for bootstrap, so check was failing
2017-02-18 00:35:18 +09:00
Jens Petersen c044884574 8.0.2 perf build 2017-02-17 21:55:41 +09:00
Jens Petersen c46f228d49 add ghc-8.0.2/ to .gitignore 2017-02-17 16:43:39 +09:00
Jens Petersen 6bf3b9f3c5 update to ghc-8.0.2 2017-02-17 14:29:06 +09:00
Jens Petersen 9eb04c2900 fix rebuild with latest ghc-rpm-macros; config llc and optc 2017-02-13 19:31:13 +09:00
Fedora Release Engineering d5dd5b3d98 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild 2017-02-10 10:30:21 +00:00
Igor Gnatenko 052e0f7eef Rebuild for readline 7.x
Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
2017-01-12 17:30:28 +01:00
Jens Petersen f523fd5da5 quote echo'd %license and %dir macros 2016-10-26 15:27:24 +09:00
Jens Petersen 9ddab99f44 condition removal of libffi-tarballs for rhel7/fedora 2016-10-26 15:26:19 +09:00
Jens Petersen f12a79f598 BR perl 2016-10-26 12:46:05 +09:00
Jens Petersen c0222f1be5 some lesser spec file cleanups
- drop ghc_without_shared comment block
- drop mention of haskell-platform
- update url to https
- drop dph and feldspar obsoletes
- minor refresh and reformat of description
- obsolete ghc-doc-index when building without_haddock
2016-10-26 11:43:58 +09:00
Jens Petersen a652054958 backport some trivial changes from github fedora-haskell/ghc
ghclibdocdir -> ghc_html_libraries_dir
ghcdocbasedir -> ghc_html_dir
2016-10-07 18:25:20 +09:00
Jens Petersen 025bb04cd1 use %license 2016-09-28 18:17:28 +09:00
Jens Petersen 3374f6364c update subpackaging for latest ghc-rpm-macros 2016-09-05 17:37:07 +09:00
Jens Petersen d8e33b5510 the ABI hash checking requires all of ghc to be installed 2016-07-14 16:35:20 +09:00
Jens Petersen d25903fbb8 more ABI hash fix/improvements 2016-07-14 14:55:11 +09:00
Jens Petersen 3687ae4b04 ABI check tweaks and fix 2016-07-13 18:58:26 +09:00
Jens Petersen 4874a3b925 add an ABI change check to prevent unexpected hash changes 2016-07-13 17:18:25 +09:00
Jens Petersen 7748407e4e obsolete haskell98 and haskell2010 2016-07-12 14:45:27 +09:00
Jens Petersen a88a864e2e perf build 2016-06-03 16:09:48 +09:00
Jens Petersen 96eae76cd8 add missing changelog for 7.10.3-49! 2016-06-03 16:09:01 +09:00
Jens Petersen f50ec379b6 update to 7.10.3 from petersen/ghc-7.10.3 copr
- quick build
- use 7.10.3b respin tarballs
- no longer need:
  - ghc-glibc-2.20_BSD_SOURCE.patch
  - ghc-7.8-arm-use-ld-gold.patch
  - ghc-7.8-arm7_saner-linker-opt-handling-9873.patch
  - ghc-config.mk.in-Enable-SMP-and-GHCi-support-for-Aarch64.patch
  - build_minimum_smp
- add Debian packages:
  - buildpath-abi-stability
  - no-missing-haddock-file-warning
  - reproducible-tmp-names
- use llvm35
- add libraries-versions.sh script
- all library versions updates except xhtml
- BR ghc-rpm-macros-extra for all OS versions
- support building on EL6
- deprecated libraries: haskell2010, haskell98, old-locale, old-time
- symlink for integer-gmp2
- add llvm_major
2016-06-03 14:29:26 +09:00
Jens Petersen 9f9aa45539 do not package ghc-split on MIPS (#1294873) 2016-03-08 01:24:41 +09:00
Jens Petersen 9451e9f663 drop the last use of %ghc_arches_with_ghci 2016-03-07 22:38:31 +09:00
Dennis Gilmore e48880c434 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild 2016-02-03 21:21:56 +00:00
Jens Petersen c80b9281a9 rebuild
for unstable 64bit array ABI hash
2015-06-16 18:12:59 +09:00
Jens Petersen 27128a0af5 fix aarch64 case in aclocal.m4 2015-06-15 17:47:33 +09:00
Jens Petersen 31153d40ac use ld.gold and re-enable dynamic linking of ghc programs
Reverting "revert ld.gold to armv7 only; static ghc progs for aarch64"

This reverts commit bc51500a32.
2015-06-11 22:56:02 +09:00
Jens Petersen bc51500a32 revert ld.gold to armv7 only; static ghc progs for aarch64
- ld.gold patch didn't fix subprocess output problem

aarch64 ghci crashes with both gold and bfd but TH seems to work
2015-04-28 13:02:15 +09:00
Jens Petersen 8b0348fcf1 use "make -j2" for s390 (#1212374) 2015-04-24 14:11:15 +09:00
Jens Petersen 6bb2991c51 use ld.gold for aarch64 and "make -j3" for s390 2015-04-22 19:04:55 +09:00
Jens Petersen 4a07cbb90c turn on SMP and ghci for aarch64
patch by Erik de Castro Lopo from
https://ghc.haskell.org/trac/ghc/ticket/9673
2015-04-10 22:33:17 +05:30
Jens Petersen 682be3ab66 aarch64 production build 2015-03-30 23:19:15 +09:00
Jens Petersen 23bd910b3d bootstrap aarch64 again for ghc-deps.sh fixes 2015-03-23 18:56:46 +09:00
Jens Petersen b86c4e0703 aarch64 production build; use -j16 again on intel archs 2015-03-23 12:52:09 +09:00
Jens Petersen 164918f877 abi-check.sh now downloads builds from koji and compares their hashes 2015-03-23 12:50:33 +09:00
Jens Petersen 07d0caef36 make abi-check.sh executable 2015-03-23 11:48:00 +09:00
Jens Petersen d5825747ca a primitive ABI checking script 2015-03-23 11:45:54 +09:00
Jens Petersen 6441298c76 disable ld hardening also for armv7 and secondary 64bit archs 2015-03-20 17:57:55 +09:00
Jens Petersen 915ee24569 aarch64 bootstrap without dyn ghc(i) and llvm, disable ld hardening on 64bit
llvm needs 3.6
2015-03-20 09:12:59 +09:00
Jens Petersen 42fee54b90 setup make -j more carefully, add %build_minimum_smp
minimum -j12 for intel, can be overriden with %build_minimum_smp
2015-03-01 20:04:36 +09:00
Jens Petersen 25a760a22f use llvm for aarch64 and fix build.mk BuildFlavour setup 2015-03-01 19:58:47 +09:00
Jens Petersen b42ca29adc override "make %{?_smp_mflags}" in mock/koji if not -j16
- in koji HOSTNAME is ""
- from testing in koji: -j8 was too small and -j12 seemed big enough
2015-02-15 21:59:29 +09:00
Jens Petersen 3118c56ef3 better _smp_mflags echo output 2015-02-15 01:15:38 +09:00
Jens Petersen 932a5964b8 only echo _smp_mflags if it is defined 2015-02-15 01:11:15 +09:00
Jens Petersen f8a0b1d0a6 try "make -j16" on Intel arches to keep ABI hashes same as -40 2015-02-15 01:06:21 +09:00
Jens Petersen dfca0e839a production build; use %ghc_bootstrapping to control bootstrap setup 2015-02-09 18:16:47 +01:00
Jens Petersen 37dd51b1af update the arm64 patch for 7.8.4 2015-02-07 18:25:23 +01:00
Jens Petersen 43f536af8e bootstrap for secondary arches, with bindir/ghci 2015-02-07 16:55:30 +01:00
Jens Petersen 1cb2f64c61 drop unversioned htmldir patch
remove two old patches
2015-01-18 22:55:40 +09:00
Jens Petersen 3cca06965a production build 2015-01-18 15:58:37 +09:00
Jens Petersen b032d481b4 use ld.gold on ARMv7
see https://ghc.haskell.org/trac/ghc/ticket/8976
for workaround patches posted upstream by nomeata

remove some old leftover patches (fedpkg unused-patches)
2015-01-17 23:13:52 +09:00
Jens Petersen 98bb637a26 Revert back to ghc-7.8 and update to 7.8.4
version bumps for base and Cabal

This reverts commit 083d826dd6.

Conflicts:
	ghc.spec
2015-01-17 16:55:56 +09:00
Jens Petersen 10d9a860f8 update changelog date 2014-11-18 18:28:18 +09:00
Jens Petersen 47fc293b36 backport more changes from 7.8.3 spec to 7.6.3 spec
- remove the build hack to switch from llvm to llvm34 (#1161049)
- use rpm internal dependency generator with ghc.attr on F21+
- fix bash-ism in ghc-doc-index (#1146733)
- do "quick" build when bootstrapping
- setup LDFLAGS
2014-11-18 12:44:57 +09:00
Jens Petersen 44c2d294cb require and use llvm34 instead of llvm-3.5 for arm 2014-11-17 17:53:19 +09:00
Jens Petersen 083d826dd6 revert to 7.6.3-26 (current f21) 2014-11-17 12:24:08 +09:00
Jens Petersen cfae44c249 update patches for armv7 for ghc-7.8
- LlvmCodeGen-llvm-version-warning patch no needed
  since 3.4 supported now, but rawhide is now on 3.5!
- update no NEON patch
2014-11-05 12:28:37 +09:00
Jens Petersen 138479e435 - undefine ghc_without_shared if it is defined for now
- ghc-ppc64el.patch is in 7.8.3
- use quick/quick-llvm when building
- set LDFLAGS
- probably no bindir/ghci now on archs without ghci
2014-10-20 11:43:44 +09:00
Jens Petersen 6066ff4e49 update Debian/Ubuntu arm64 patch to 7.8.3 2014-10-01 11:27:29 +09:00
Jens Petersen 3f871b8dab add changelog entry for bash-ism fix 2014-09-29 13:39:30 +09:00
Jens Petersen 597b182ead ghc-doc-index: drop bash-ism (#1146733) 2014-09-29 13:35:40 +09:00
Jens Petersen 4ebfefdb13 use rpm internal dependency generator with ghc.attr on F22
requires ghc-rpm-macros ghc.attr - currently only in rawhide
2014-09-05 16:15:21 +09:00
Jens Petersen b5e06b43ba change Cabal install bindir warning; drop use of ghc_without_shared 2014-08-29 17:01:38 +09:00
Peter Robinson 994a85e95f - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild 2014-08-16 14:26:57 +00:00
Jens Petersen adee73e6ef major update to 7.8.3: bootstrap build 2014-08-03 23:54:24 +09:00
38 changed files with 1894 additions and 925 deletions

19
.gitignore vendored
View File

@ -12,3 +12,22 @@ testsuite-6.12.3.tar.bz2
/ghc-7.6.3-src.tar.bz2
/ghc-7.6.3-testsuite.tar.bz2
/ghc-7.6.3/
/ghc-7.8.3-src.tar.xz
/ghc-7.8.3-testsuite.tar.xz
/ghc-7.8.4-src.tar.xz
/ghc-7.8.4-testsuite.tar.xz
/ghc-7.8.4/
/ghc-7.10.3/
/ghc-7.10.3b-src.tar.xz
/ghc-7.10.3b-testsuite.tar.xz
/ghc-8.0.2-testsuite.tar.xz
/ghc-8.0.2-src.tar.xz
/ghc-8.0.2/
/ghc-8.2.2-src.tar.xz
/ghc-8.2.2-testsuite.tar.xz
/ghc-8.4.4-src.tar.xz
/ghc-8.6.5-src.tar.xz
/ghc-8.8.3-src.tar.xz
/ghc-8.8.3-src.tar.xz.sig
/ghc-8.8.4-src.tar.xz.sig
/ghc-8.8.4-src.tar.xz

View File

@ -0,0 +1,277 @@
From 6e361d895dda4600a85e01c72ff219474b5c7190 Mon Sep 17 00:00:00 2001
From: Kavon Farvardin <kavon@farvard.in>
Date: Thu, 4 Oct 2018 13:44:55 -0400
Subject: [PATCH] Multiple fixes / improvements for LLVM backend
- Fix for #13904 -- stop "trashing" callee-saved registers, since it is
not actually doing anything useful.
- Fix for #14251 -- fixes the calling convention for functions passing
raw SSE-register values by adding padding as needed to get the values
in the right registers. This problem cropped up when some args were
unused an dropped from the live list.
- Fixed a typo in 'readnone' attribute
- Added 'lower-expect' pass to level 0 LLVM optimization passes to
improve block layout in LLVM for stack checks, etc.
Test Plan: `make test WAYS=optllvm` and `make test WAYS=llvm`
Reviewers: bgamari, simonmar, angerman
Reviewed By: angerman
Subscribers: rwbarton, carter
GHC Trac Issues: #13904, #14251
Differential Revision: https://phabricator.haskell.org/D5190
(cherry picked from commit adcb5fb47c0942671d409b940d8884daa9359ca4)
---
compiler/llvmGen/Llvm/Types.hs | 2 +-
compiler/llvmGen/LlvmCodeGen/Base.hs | 62 ++++++++++++++++++++----
compiler/llvmGen/LlvmCodeGen/CodeGen.hs | 59 +++++-----------------
compiler/main/DriverPipeline.hs | 2 +-
testsuite/tests/codeGen/should_run/all.T | 4 +-
5 files changed, 67 insertions(+), 62 deletions(-)
diff --git a/compiler/llvmGen/Llvm/Types.hs b/compiler/llvmGen/Llvm/Types.hs
index 87111499fc0..c1c51afcf0f 100644
--- a/compiler/llvmGen/Llvm/Types.hs
+++ b/compiler/llvmGen/Llvm/Types.hs
@@ -560,7 +560,7 @@ instance Outputable LlvmFuncAttr where
ppr OptSize = text "optsize"
ppr NoReturn = text "noreturn"
ppr NoUnwind = text "nounwind"
- ppr ReadNone = text "readnon"
+ ppr ReadNone = text "readnone"
ppr ReadOnly = text "readonly"
ppr Ssp = text "ssp"
ppr SspReq = text "ssqreq"
diff --git a/compiler/llvmGen/LlvmCodeGen/Base.hs b/compiler/llvmGen/LlvmCodeGen/Base.hs
index 6e20da48c1b..ec91bacc4c8 100644
--- a/compiler/llvmGen/LlvmCodeGen/Base.hs
+++ b/compiler/llvmGen/LlvmCodeGen/Base.hs
@@ -26,7 +26,7 @@ module LlvmCodeGen.Base (
cmmToLlvmType, widthToLlvmFloat, widthToLlvmInt, llvmFunTy,
llvmFunSig, llvmFunArgs, llvmStdFunAttrs, llvmFunAlign, llvmInfAlign,
- llvmPtrBits, tysToParams, llvmFunSection,
+ llvmPtrBits, tysToParams, llvmFunSection, padLiveArgs, isSSE,
strCLabel_llvm, strDisplayName_llvm, strProcedureName_llvm,
getGlobalPtr, generateExternDecls,
@@ -58,6 +58,8 @@ import ErrUtils
import qualified Stream
import Control.Monad (ap)
+import Data.List (sort)
+import Data.Maybe (mapMaybe)
-- ----------------------------------------------------------------------------
-- * Some Data Types
@@ -147,16 +149,58 @@ llvmFunSection dflags lbl
-- | A Function's arguments
llvmFunArgs :: DynFlags -> LiveGlobalRegs -> [LlvmVar]
llvmFunArgs dflags live =
- map (lmGlobalRegArg dflags) (filter isPassed (activeStgRegs platform))
+ map (lmGlobalRegArg dflags) (filter isPassed allRegs)
where platform = targetPlatform dflags
- isLive r = not (isSSE r) || r `elem` alwaysLive || r `elem` live
+ allRegs = activeStgRegs platform
+ paddedLive = map (\(_,r) -> r) $ padLiveArgs live
+ isLive r = r `elem` alwaysLive || r `elem` paddedLive
isPassed r = not (isSSE r) || isLive r
- isSSE (FloatReg _) = True
- isSSE (DoubleReg _) = True
- isSSE (XmmReg _) = True
- isSSE (YmmReg _) = True
- isSSE (ZmmReg _) = True
- isSSE _ = False
+
+
+isSSE :: GlobalReg -> Bool
+isSSE (FloatReg _) = True
+isSSE (DoubleReg _) = True
+isSSE (XmmReg _) = True
+isSSE (YmmReg _) = True
+isSSE (ZmmReg _) = True
+isSSE _ = False
+
+sseRegNum :: GlobalReg -> Maybe Int
+sseRegNum (FloatReg i) = Just i
+sseRegNum (DoubleReg i) = Just i
+sseRegNum (XmmReg i) = Just i
+sseRegNum (YmmReg i) = Just i
+sseRegNum (ZmmReg i) = Just i
+sseRegNum _ = Nothing
+
+-- the bool indicates whether the global reg was added as padding.
+-- the returned list is not sorted in any particular order,
+-- but does indicate the set of live registers needed, with SSE padding.
+padLiveArgs :: LiveGlobalRegs -> [(Bool, GlobalReg)]
+padLiveArgs live = allRegs
+ where
+ sseRegNums = sort $ mapMaybe sseRegNum live
+ (_, padding) = foldl assignSlots (1, []) $ sseRegNums
+ allRegs = padding ++ map (\r -> (False, r)) live
+
+ assignSlots (i, acc) regNum
+ | i == regNum = -- don't need padding here
+ (i+1, acc)
+ | i < regNum = let -- add padding for slots i .. regNum-1
+ numNeeded = regNum-i
+ acc' = genPad i numNeeded ++ acc
+ in
+ (regNum+1, acc')
+ | otherwise = error "padLiveArgs -- i > regNum ??"
+
+ genPad start n =
+ take n $ flip map (iterate (+1) start) (\i ->
+ (True, FloatReg i))
+ -- NOTE: Picking float should be fine for the following reasons:
+ -- (1) Float aliases with all the other SSE register types on
+ -- the given platform.
+ -- (2) The argument is not live anyways.
+
-- | Llvm standard fun attributes
llvmStdFunAttrs :: [LlvmFuncAttr]
diff --git a/compiler/llvmGen/LlvmCodeGen/CodeGen.hs b/compiler/llvmGen/LlvmCodeGen/CodeGen.hs
index e812dd445f1..a7121b7909a 100644
--- a/compiler/llvmGen/LlvmCodeGen/CodeGen.hs
+++ b/compiler/llvmGen/LlvmCodeGen/CodeGen.hs
@@ -14,7 +14,7 @@ import LlvmCodeGen.Base
import LlvmCodeGen.Regs
import BlockId
-import CodeGen.Platform ( activeStgRegs, callerSaves )
+import CodeGen.Platform ( activeStgRegs )
import CLabel
import Cmm
import PprCmm
@@ -211,7 +211,6 @@ genCall t@(PrimTarget (MO_Prefetch_Data localityInt)) [] args
fptr <- liftExprData $ getFunPtr funTy t
argVars' <- castVarsW Signed $ zip argVars argTy
- doTrashStmts
let argSuffix = [mkIntLit i32 0, mkIntLit i32 localityInt, mkIntLit i32 1]
statement $ Expr $ Call StdCall fptr (argVars' ++ argSuffix) []
| otherwise = panic $ "prefetch locality level integer must be between 0 and 3, given: " ++ (show localityInt)
@@ -294,7 +293,6 @@ genCall t@(PrimTarget op) [] args
fptr <- getFunPtrW funTy t
argVars' <- castVarsW Signed $ zip argVars argTy
- doTrashStmts
let alignVal = mkIntLit i32 align
arguments = argVars' ++ (alignVal:isVolVal)
statement $ Expr $ Call StdCall fptr arguments []
@@ -446,7 +444,6 @@ genCall target res args = runStmtsDecls $ do
| never_returns = statement $ Unreachable
| otherwise = return ()
- doTrashStmts
-- make the actual call
case retTy of
@@ -1759,12 +1756,9 @@ genLit _ CmmHighStackMark
funPrologue :: LiveGlobalRegs -> [CmmBlock] -> LlvmM StmtData
funPrologue live cmmBlocks = do
- trash <- getTrashRegs
let getAssignedRegs :: CmmNode O O -> [CmmReg]
getAssignedRegs (CmmAssign reg _) = [reg]
- -- Calls will trash all registers. Unfortunately, this needs them to
- -- be stack-allocated in the first place.
- getAssignedRegs (CmmUnsafeForeignCall _ rs _) = map CmmGlobal trash ++ map CmmLocal rs
+ getAssignedRegs (CmmUnsafeForeignCall _ rs _) = map CmmLocal rs
getAssignedRegs _ = []
getRegsBlock (_, body, _) = concatMap getAssignedRegs $ blockToList body
assignedRegs = nub $ concatMap (getRegsBlock . blockSplit) cmmBlocks
@@ -1794,14 +1788,9 @@ funPrologue live cmmBlocks = do
funEpilogue :: LiveGlobalRegs -> LlvmM ([LlvmVar], LlvmStatements)
funEpilogue live = do
- -- Have information and liveness optimisation is enabled?
- let liveRegs = alwaysLive ++ live
- isSSE (FloatReg _) = True
- isSSE (DoubleReg _) = True
- isSSE (XmmReg _) = True
- isSSE (YmmReg _) = True
- isSSE (ZmmReg _) = True
- isSSE _ = False
+ -- the bool indicates whether the register is padding.
+ let alwaysNeeded = map (\r -> (False, r)) alwaysLive
+ livePadded = alwaysNeeded ++ padLiveArgs live
-- Set to value or "undef" depending on whether the register is
-- actually live
@@ -1813,39 +1802,17 @@ funEpilogue live = do
let ty = (pLower . getVarType $ lmGlobalRegVar dflags r)
return (Just $ LMLitVar $ LMUndefLit ty, nilOL)
platform <- getDynFlag targetPlatform
- loads <- flip mapM (activeStgRegs platform) $ \r -> case () of
- _ | r `elem` liveRegs -> loadExpr r
- | not (isSSE r) -> loadUndef r
+ let allRegs = activeStgRegs platform
+ loads <- flip mapM allRegs $ \r -> case () of
+ _ | (False, r) `elem` livePadded
+ -> loadExpr r -- if r is not padding, load it
+ | not (isSSE r) || (True, r) `elem` livePadded
+ -> loadUndef r
| otherwise -> return (Nothing, nilOL)
let (vars, stmts) = unzip loads
return (catMaybes vars, concatOL stmts)
-
--- | A series of statements to trash all the STG registers.
---
--- In LLVM we pass the STG registers around everywhere in function calls.
--- So this means LLVM considers them live across the entire function, when
--- in reality they usually aren't. For Caller save registers across C calls
--- the saving and restoring of them is done by the Cmm code generator,
--- using Cmm local vars. So to stop LLVM saving them as well (and saving
--- all of them since it thinks they're always live, we trash them just
--- before the call by assigning the 'undef' value to them. The ones we
--- need are restored from the Cmm local var and the ones we don't need
--- are fine to be trashed.
-getTrashStmts :: LlvmM LlvmStatements
-getTrashStmts = do
- regs <- getTrashRegs
- stmts <- flip mapM regs $ \ r -> do
- reg <- getCmmReg (CmmGlobal r)
- let ty = (pLower . getVarType) reg
- return $ Store (LMLitVar $ LMUndefLit ty) reg
- return $ toOL stmts
-
-getTrashRegs :: LlvmM [GlobalReg]
-getTrashRegs = do plat <- getLlvmPlatform
- return $ filter (callerSaves plat) (activeStgRegs plat)
-
-- | Get a function pointer to the CLabel specified.
--
-- This is for Haskell functions, function type is assumed, so doesn't work
@@ -1967,7 +1934,3 @@ getCmmRegW = lift . getCmmReg
genLoadW :: Atomic -> CmmExpr -> CmmType -> WriterT LlvmAccum LlvmM LlvmVar
genLoadW atomic e ty = liftExprData $ genLoad atomic e ty
-doTrashStmts :: WriterT LlvmAccum LlvmM ()
-doTrashStmts = do
- stmts <- lift getTrashStmts
- tell $ LlvmAccum stmts mempty
diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs
index 86dd913461c..f4d5e7f553c 100644
--- a/compiler/main/DriverPipeline.hs
+++ b/compiler/main/DriverPipeline.hs
@@ -1465,7 +1465,7 @@ runPhase (RealPhase LlvmOpt) input_fn dflags
-- we always (unless -optlo specified) run Opt since we rely on it to
-- fix up some pretty big deficiencies in the code we generate
llvmOpts = case optLevel dflags of
- 0 -> "-mem2reg -globalopt"
+ 0 -> "-mem2reg -globalopt -lower-expect"
1 -> "-O1 -globalopt"
_ -> "-O2"

View File

@ -1,23 +0,0 @@
--- ghc-7.6.3/libraries/Cabal/Cabal/Distribution/Simple/GHC.hs~ 2013-04-19 06:32:04.000000000 +0900
+++ ghc-7.6.3/libraries/Cabal/Cabal/Distribution/Simple/GHC.hs 2013-06-12 11:35:39.832840754 +0900
@@ -837,6 +837,8 @@
dynamicOpts = vanillaOpts `mappend` mempty {
ghcOptDynamic = toFlag True,
+ ghcOptHiSuffix = toFlag "dyn_hi",
+ ghcOptObjSuffix = toFlag "dyn_o",
ghcOptExtra = ghcSharedOptions exeBi
}
@@ -855,9 +857,9 @@
-- with profiling. This is because the code that TH needs to
-- run at compile time needs to be the vanilla ABI so it can
-- be loaded up and run by the compiler.
- when (withProfExe lbi &&
+ when ((withProfExe lbi || withDynExe lbi) &&
EnableExtension TemplateHaskell `elem` allExtensions exeBi) $
- runGhcProg exeProfOpts { ghcOptNoLink = toFlag True }
+ runGhcProg vanillaOpts { ghcOptNoLink = toFlag True }
runGhcProg exeOpts { ghcOptOutputFile = toFlag (targetDir </> exeNameReal) }

View File

@ -0,0 +1,10 @@
--- ghc-8.8.0.20190721/libraries/containers/containers/include/containers.h~ 2019-06-26 20:39:26.000000000 +0000
+++ ghc-8.8.0.20190721/libraries/containers/containers/include/containers.h 2019-07-27 08:55:10.747060247 +0000
@@ -35,7 +35,6 @@
#ifdef __GLASGOW_HASKELL__
# define USE_ST_MONAD 1
-# define USE_UNBOXED_ARRAYS 1
#endif
#endif

48
abi-check.sh Executable file
View File

@ -0,0 +1,48 @@
#!/bin/sh
[ $# -ne 2 ] && echo "Usage: $(basename $0) ver-rel1 ver-rel2" && exit 1
if [ "$1" = "$2" ]; then
echo "ver-rel's must be different!"
exit 1
fi
#set -x
mkdir -p koji
cd koji
for i in $1 $2; do
if [ ! -d "$i" ]; then
mkdir -p $i/{x86_64,i686,armv7hl}
cd $i
for a in x86_64 i686 armv7hl; do
cd $a
koji download-build --arch=$a ghc-$i
cd ..
done
cd ..
fi
done
for a in x86_64 i686 armv7hl; do
echo "= $a ="
for i in $1/$a/*; do
PKGVER=$(rpm -qp --qf "%{name}-%{version}" $i)
PKG2=$(ls $2/$a/$PKGVER*.$a.rpm)
PROV1=$(rpm -qp --provides $i | grep ^ghc\( | grep -v =)
PROV2=$(rpm -qp --provides $PKG2 | grep ^ghc\( | grep -v =)
# if [ -n "$PROV1" ]; then
# echo $PROV1
# else
# echo "no provides for $i"
# fi
if [ -n "$PROV2" ]; then
if [ "$PROV1" != "$PROV2" ]; then
echo $PROV2
fi
# else
# echo "no provides for $PKG2"
fi
done
done

View File

@ -0,0 +1,23 @@
Forwarded to https://ghc.haskell.org/trac/ghc/ticket/10424
--- a/compiler/iface/MkIface.hs
+++ b/compiler/iface/MkIface.hs
@@ -681,7 +681,7 @@ addFingerprints hsc_env mb_old_fingerpri
iface_hash <- computeFingerprint putNameLiterally
(mod_hash,
ann_fn (mkVarOcc "module"), -- See mkIfaceAnnCache
- mi_usages iface0,
+ usages,
sorted_deps,
mi_hpc iface0)
@@ -714,6 +714,9 @@ addFingerprints hsc_env mb_old_fingerpri
(non_orph_fis, orph_fis) = mkOrphMap ifFamInstOrph (mi_fam_insts iface0)
fix_fn = mi_fix_fn iface0
ann_fn = mkIfaceAnnCache (mi_anns iface0)
+ -- Do not allow filenames to affect the interface
+ usages = [ case u of UsageFile _ fp -> UsageFile "" fp; _ -> u | u <- mi_usages iface0 ]
+
-- | Retrieve the orphan hashes 'mi_orphan_hash' for a list of modules
-- (in particular, the orphan modules which are transitively imported by the

View File

@ -0,0 +1,31 @@
Description: Allow unregisterised ghc-8.6 to build newer GHC
Commit af9b744bbf1 introduced a regression stopping existing unregisterised
compilers from being able to compile newer versions of GHC. The problem is
that the bootstrap compiler uses the newer `includes/stg/MiscClosures.h` file
where some defines have been renamed, resulting in the following error:
.
error: stg_atomicModifyMutVarzh undeclared (first use in this function); did you mean stg_atomicModifyMutVar2zh?
.
For more information, see https://gitlab.haskell.org/ghc/ghc/issues/17111.
.
This patch can be removed, once ghc-8.6 is no longer the bootstrap compiler.
Author: Ilias Tsitsimpis <iliastsi@debian.org>
Bug: https://gitlab.haskell.org/ghc/ghc/issues/17111
Index: b/includes/stg/MiscClosures.h
===================================================================
--- a/includes/stg/MiscClosures.h
+++ b/includes/stg/MiscClosures.h
@@ -390,8 +390,12 @@ RTS_FUN_DECL(stg_copySmallMutableArrayzh
RTS_FUN_DECL(stg_casSmallArrayzh);
RTS_FUN_DECL(stg_newMutVarzh);
+#if __GLASGOW_HASKELL__ < 808
+RTS_FUN_DECL(stg_atomicModifyMutVarzh);
+#else
RTS_FUN_DECL(stg_atomicModifyMutVar2zh);
RTS_FUN_DECL(stg_atomicModifyMutVarzuzh);
+#endif
RTS_FUN_DECL(stg_casMutVarzh);
RTS_FUN_DECL(stg_isEmptyMVarzh);

View File

@ -0,0 +1,51 @@
Description: Allow unregisterised ghc-8.2 to build newer GHC
Commit b68697e579d38ca29c2b84377dc2affa04659a28 introduced a regression
stopping existing unregisteristed compilers from being used to compile a newer
version of GHC. The problem is that the bootstrap compiler uses the newer Stg.h
where EB_, IB_, etc, definitions have changed resulting in the following error:
.
error: conflicting types for 'ghc_GhcPrelude_zdtrModule4_bytes'
note: in definition of macro 'EB_'
#define EB_(X) extern const char X[]
note: previous definition of 'ghc_GhcPrelude_zdtrModule4_bytes' was here
char ghc_GhcPrelude_zdtrModule4_bytes[] = "ghc";
.
For more information about the problem, see https://phabricator.haskell.org/D4114.
.
This patch is a rework of https://phabricator.haskell.org/D3741.
It modifies Stg.h to include the old definitions, if a compiler older than
8.4 is being used.
.
This patch can be removed, once ghc-8.2 is no longer the bootstrap compiler.
Author: Ilias Tsitsimpis <iliastsi@debian.org>
Bug: https://ghc.haskell.org/trac/ghc/ticket/15201
Index: b/includes/Stg.h
===================================================================
--- a/includes/Stg.h
+++ b/includes/Stg.h
@@ -232,6 +232,16 @@ typedef StgInt I_;
typedef StgWord StgWordArray[];
typedef StgFunPtr F_;
+#if __GLASGOW_HASKELL__ < 804
+#define EB_(X) extern char X[]
+#define IB_(X) static char X[]
+#define EI_(X) extern StgWordArray (X) GNU_ATTRIBUTE(aligned (8))
+#define II_(X) static StgWordArray (X) GNU_ATTRIBUTE(aligned (8))
+#define IF_(f) static StgFunPtr GNUC3_ATTRIBUTE(used) f(void)
+#define FN_(f) StgFunPtr f(void)
+#define EF_(f) StgFunPtr f(void) /* External Cmm functions */
+#define EFF_(f) void f() /* See Note [External function prototypes] */
+#else
/* byte arrays (and strings): */
#define EB_(X) extern const char X[]
#define IB_(X) static const char X[]
@@ -250,6 +260,7 @@ typedef StgFunPtr F_;
#define EF_(f) StgFunPtr f(void) /* External Cmm functions */
/* foreign functions: */
#define EFF_(f) void f() /* See Note [External function prototypes] */
+#endif /* __GLASGOW_HASKELL__ < 804 */
/* Note [External function prototypes] See Trac #8965, #11395
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@ -0,0 +1,58 @@
Description: Allow unregisterised ghc-8.4 to build newer GHC
Commit 4075656e8bb introduced a regression stopping existing unregisteristed
compilers from being able to compile newer versions of GHC. The problem is
that the bootstrap compiler uses the newer `rts/storage/ClosureTypes.h` file
where some defines have been renamed, resulting in the following error:
.
error: stg_MUT_ARR_PTRS_FROZEN0_info undeclared (first use in this function); did you mean stg_MUT_ARR_PTRS_FROZEN_DIRTY_info?
.
For more information, see https://gitlab.haskell.org/ghc/ghc/issues/15913.
.
This patch can be removed, once ghc-8.4 is no longer the bootstrap compiler.
Author: Ilias Tsitsimpis <iliastsi@debian.org>
Bug: https://gitlab.haskell.org/ghc/ghc/issues/15913
Bug-Debian: https://bugs.debian.org/932941
Index: b/includes/rts/storage/ClosureTypes.h
===================================================================
--- a/includes/rts/storage/ClosureTypes.h
+++ b/includes/rts/storage/ClosureTypes.h
@@ -82,5 +82,11 @@
#define SMALL_MUT_ARR_PTRS_DIRTY 60
#define SMALL_MUT_ARR_PTRS_FROZEN_DIRTY 61
#define SMALL_MUT_ARR_PTRS_FROZEN_CLEAN 62
+#if __GLASGOW_HASKELL__ < 806
+#define SMALL_MUT_ARR_PTRS_FROZEN0 SMALL_MUT_ARR_PTRS_FROZEN_DIRTY
+#define SMALL_MUT_ARR_PTRS_FROZEN SMALL_MUT_ARR_PTRS_FROZEN_CLEAN
+#define MUT_ARR_PTRS_FROZEN0 MUT_ARR_PTRS_FROZEN_DIRTY
+#define MUT_ARR_PTRS_FROZEN MUT_ARR_PTRS_FROZEN_CLEAN
+#endif
#define COMPACT_NFDATA 63
#define N_CLOSURE_TYPES 64
Index: b/includes/stg/MiscClosures.h
===================================================================
--- a/includes/stg/MiscClosures.h
+++ b/includes/stg/MiscClosures.h
@@ -116,12 +116,22 @@ RTS_ENTRY(stg_ARR_WORDS);
RTS_ENTRY(stg_MUT_ARR_WORDS);
RTS_ENTRY(stg_MUT_ARR_PTRS_CLEAN);
RTS_ENTRY(stg_MUT_ARR_PTRS_DIRTY);
+#if __GLASGOW_HASKELL__ < 806
+RTS_ENTRY(stg_MUT_ARR_PTRS_FROZEN);
+RTS_ENTRY(stg_MUT_ARR_PTRS_FROZEN0);
+#else
RTS_ENTRY(stg_MUT_ARR_PTRS_FROZEN_CLEAN);
RTS_ENTRY(stg_MUT_ARR_PTRS_FROZEN_DIRTY);
+#endif
RTS_ENTRY(stg_SMALL_MUT_ARR_PTRS_CLEAN);
RTS_ENTRY(stg_SMALL_MUT_ARR_PTRS_DIRTY);
+#if __GLASGOW_HASKELL__ < 806
+RTS_ENTRY(stg_SMALL_MUT_ARR_PTRS_FROZEN);
+RTS_ENTRY(stg_SMALL_MUT_ARR_PTRS_FROZEN0);
+#else
RTS_ENTRY(stg_SMALL_MUT_ARR_PTRS_FROZEN_CLEAN);
RTS_ENTRY(stg_SMALL_MUT_ARR_PTRS_FROZEN_DIRTY);
+#endif
RTS_ENTRY(stg_MUT_VAR_CLEAN);
RTS_ENTRY(stg_MUT_VAR_DIRTY);
RTS_ENTRY(stg_END_TSO_QUEUE);

View File

@ -1,11 +0,0 @@
--- a/rts/STM.c
+++ b/rts/STM.c
@@ -927,7 +927,7 @@ void stmPreGCHook (Capability *cap) {
static volatile StgInt64 max_commits = 0;
#if defined(THREADED_RTS)
-static volatile StgBool token_locked = FALSE;
+static volatile StgWord token_locked = FALSE;
static void getTokenBatch(Capability *cap) {
while (cas((void *)&token_locked, FALSE, TRUE) == TRUE) { /* nothing */ }

View File

@ -1,13 +0,0 @@
--- ghc-7.4.2/libraries/Cabal/Cabal/Distribution/Simple/Setup.hs~ 2012-06-07 02:10:40.000000000 +0900
+++ ghc-7.4.2/libraries/Cabal/Cabal/Distribution/Simple/Setup.hs 2012-08-24 20:33:00.032123967 +0900
@@ -313,7 +313,7 @@
configDistPref = Flag defaultDistPref,
configVerbosity = Flag normal,
configUserInstall = Flag False, --TODO: reverse this
- configGHCiLib = Flag True,
+ configGHCiLib = Flag False,
configSplitObjs = Flag False, -- takes longer, so turn off by default
configStripExes = Flag True,
configTests = Flag False,
Diff finished. Fri Aug 24 20:33:10 2012

View File

@ -1,37 +0,0 @@
From 08a38628f29df63ac842f4d083efb414f42d7bff Mon Sep 17 00:00:00 2001
From: "Edward Z. Yang" <ezyang@mit.edu>
Date: Tue, 9 Jul 2013 00:01:43 -0700
Subject: [PATCH] Disable executable stack for the linker note, fixing #703
(again)
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
---
compiler/main/DriverPipeline.hs | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs
index 67377e6..26425ae 100644
--- a/compiler/main/DriverPipeline.hs
+++ b/compiler/main/DriverPipeline.hs
@@ -1640,7 +1640,17 @@ mkNoteObjsToLinkIntoBinary dflags dep_packages = do
text elfSectionNote,
text "\n",
- text "\t.ascii \"", info', text "\"\n" ]
+ text "\t.ascii \"", info', text "\"\n",
+
+ -- ALL generated assembly must have this section to disable
+ -- executable stacks. See also
+ -- compiler/nativeGen/AsmCodeGen.lhs for another instance
+ -- where we need to do this.
+ (if platformHasGnuNonexecStack (targetPlatform dflags)
+ then text ".section .note.GNU-stack,\"\",@progbits\n"
+ else empty)
+
+ ]
where
info' = text $ escape info
--
1.8.1.2

View File

@ -1,11 +0,0 @@
--- ghc-7.6.3/compiler/llvmGen/LlvmCodeGen/Base.hs~ 2013-04-19 06:22:46.000000000 +0900
+++ ghc-7.6.3/compiler/llvmGen/LlvmCodeGen/Base.hs 2013-07-24 17:05:06.491900335 +0900
@@ -151,7 +151,7 @@
minSupportLlvmVersion = 28
maxSupportLlvmVersion :: LlvmVersion
-maxSupportLlvmVersion = 31
+maxSupportLlvmVersion = 34
-- ----------------------------------------------------------------------------
-- * Environment Handling

View File

@ -1,11 +0,0 @@
Index: rts/Adjustor.c
===================================================================
--- rts/Adjustor.c (revision c2870706b29c24ac86ae2a9e2359dd1e4af71ac8)
+++ rts/Adjustor.c (revision 27cf625ab871f34434d9fe86cecf85a31f73f0e5)
@@ -390,5 +390,5 @@
adjustorStub->call[0] = 0xe8;
- *(long*)&adjustorStub->call[1] = ((char*)&adjustorCode) - ((char*)adjustorStub + 5);
+ *(long*)&adjustorStub->call[1] = ((char*)&adjustorCode) - ((char*)code + 5);
adjustorStub->hptr = hptr;
adjustorStub->wptr = wptr;

View File

@ -0,0 +1,35 @@
--- ghc-8.6.3/docs/users_guide/flags.py~ 2018-09-21 06:18:23.000000000 +0800
+++ ghc-8.6.3/docs/users_guide/flags.py 2019-03-05 10:20:38.639782096 +0800
@@ -49,6 +49,8 @@
import sphinx
from sphinx import addnodes
from sphinx.domains.std import GenericObject
+from sphinx.domains import ObjType
+from sphinx.roles import XRefRole
from sphinx.errors import SphinxError
from distutils.version import LooseVersion
from utils import build_table_from_list
@@ -603,14 +605,21 @@
sphinx_version = LooseVersion(sphinx.__version__)
override_arg = {'override': True} if sphinx_version >= LooseVersion('1.8') else {}
+ # Yuck: We can't use app.add_object_type since we need to provide the
+ # Directive instance ourselves.
+ std_object_types = app.registry.domain_object_types.setdefault('std', {})
+
# Add ghc-flag directive, and override the class with our own
- app.add_object_type('ghc-flag', 'ghc-flag')
app.add_directive_to_domain('std', 'ghc-flag', Flag, **override_arg)
+ app.add_role_to_domain('std', 'ghc-flag', XRefRole())
+ std_object_types['ghc-flag'] = ObjType('ghc-flag', 'ghc-flag')
# Add extension directive, and override the class with our own
- app.add_object_type('extension', 'extension')
app.add_directive_to_domain('std', 'extension', LanguageExtension,
**override_arg)
+ app.add_role_to_domain('std', 'extension', XRefRole())
+ std_object_types['extension'] = ObjType('ghc-flag', 'ghc-flag')
+
# NB: language-extension would be misinterpreted by sphinx, and produce
# lang="extensions" XML attributes

View File

@ -0,0 +1,12 @@
--- ghc-8.2.2/libraries/Cabal/Cabal/Distribution/Simple/Install.hs~ 2017-05-05 23:51:43.000000000 +0900
+++ ghc-8.2.2/libraries/Cabal/Cabal/Distribution/Simple/Install.hs 2018-02-27 12:22:13.159432104 +0900
@@ -215,8 +215,7 @@
++ " in " ++ binPref)
inPath <- isInSearchPath binPref
when (not inPath) $
- warn verbosity ("The directory " ++ binPref
- ++ " is not in the system search path.")
+ warn verbosity ("Executable installed in " ++ binPref)
case compilerFlavor (compiler lbi) of
GHC -> GHC.installExe verbosity lbi binPref buildPref progFix pkg_descr exe
GHCJS -> GHCJS.installExe verbosity lbi binPref buildPref progFix pkg_descr exe

View File

@ -1,32 +0,0 @@
commit 08a38628f29df63ac842f4d083efb414f42d7bff
Author: Edward Z. Yang <ezyang@mit.edu>
Date: Tue Jul 9 00:01:43 2013 -0700
Disable executable stack for the linker note, fixing #703 (again)
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
Modified compiler/main/DriverPipeline.hs
diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs
index 67377e6..26425ae 100644
--- a/compiler/main/DriverPipeline.hs
+++ b/compiler/main/DriverPipeline.hs
@@ -1640,7 +1640,17 @@ mkNoteObjsToLinkIntoBinary dflags dep_packages = do
text elfSectionNote,
text "\n",
- text "\t.ascii \"", info', text "\"\n" ]
+ text "\t.ascii \"", info', text "\"\n",
+
+ -- ALL generated assembly must have this section to disable
+ -- executable stacks. See also
+ -- compiler/nativeGen/AsmCodeGen.lhs for another instance
+ -- where we need to do this.
+ (if platformHasGnuNonexecStack (targetPlatform dflags)
+ then text ".section .note.GNU-stack,\"\",@progbits\n"
+ else empty)
+
+ ]
where
info' = text $ escape info

View File

@ -1,188 +0,0 @@
Description: Add arm64 support
Author: Karel Gardas <karel.gardas@centrum.cz>
Author: Colin Watson <cjwatson@ubuntu.com>
Bug: https://ghc.haskell.org/trac/ghc/ticket/7942
Last-Update: 2014-04-04
Index: b/aclocal.m4
===================================================================
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -173,7 +173,7 @@
GET_ARM_ISA()
test -z "[$]2" || eval "[$]2=\"ArchARM {armISA = \$ARM_ISA, armISAExt = \$ARM_ISA_EXT, armABI = \$ARM_ABI}\""
;;
- alpha|mips|mipseb|mipsel|hppa|hppa1_1|ia64|m68k|rs6000|s390|s390x|sparc64|vax)
+ aarch64|alpha|mips|mipseb|mipsel|hppa|hppa1_1|ia64|m68k|rs6000|s390|s390x|sparc64|vax)
test -z "[$]2" || eval "[$]2=ArchUnknown"
;;
*)
@@ -1835,6 +1835,9 @@
# converts cpu from gnu to ghc naming, and assigns the result to $target_var
AC_DEFUN([GHC_CONVERT_CPU],[
case "$1" in
+ aarch64*)
+ $2="aarch64"
+ ;;
alpha*)
$2="alpha"
;;
Index: b/includes/stg/MachRegs.h
===================================================================
--- a/includes/stg/MachRegs.h
+++ b/includes/stg/MachRegs.h
@@ -43,6 +43,7 @@
#define powerpc_REGS (powerpc_TARGET_ARCH || powerpc64_TARGET_ARCH || rs6000_TARGET_ARCH)
#define sparc_REGS sparc_TARGET_ARCH
#define arm_REGS arm_TARGET_ARCH
+#define aarch64_REGS aarch64_TARGET_ARCH
#define darwin_REGS darwin_TARGET_OS
#else
#define i386_REGS i386_HOST_ARCH
@@ -50,6 +51,7 @@
#define powerpc_REGS (powerpc_HOST_ARCH || powerpc64_HOST_ARCH || rs6000_HOST_ARCH)
#define sparc_REGS sparc_HOST_ARCH
#define arm_REGS arm_HOST_ARCH
+#define aarch64_REGS aarch64_HOST_ARCH
#define darwin_REGS darwin_HOST_OS
#endif
@@ -461,6 +463,63 @@
#endif /* arm */
+/* -----------------------------------------------------------------------------
+ The ARMv8/AArch64 ABI register mapping
+
+ The AArch64 provides 31 64-bit general purpose registers
+ and 32 128-bit SIMD/floating point registers.
+
+ General purpose registers (see Chapter 5.1.1 in ARM IHI 0055B)
+
+ Register | Special | Role in the procedure call standard
+ ---------+---------+------------------------------------
+ SP | | The Stack Pointer
+ r30 | LR | The Link Register
+ r29 | FP | The Frame Pointer
+ r19-r28 | | Callee-saved registers
+ r18 | | The Platform Register, if needed;
+ | | or temporary register
+ r17 | IP1 | The second intra-procedure-call temporary register
+ r16 | IP0 | The first intra-procedure-call scratch register
+ r9-r15 | | Temporary registers
+ r8 | | Indirect result location register
+ r0-r7 | | Parameter/result registers
+
+
+ FPU/SIMD registers
+
+ s/d/q/v0-v7 Argument / result/ scratch registers
+ s/d/q/v8-v15 callee-saved registers (must be preserved across subrutine calls,
+ but only bottom 64-bit value needs to be preserved)
+ s/d/q/v16-v31 temporary registers
+
+ ----------------------------------------------------------------------------- */
+
+#if aarch64_REGS
+
+#define REG(x) __asm__(#x)
+
+#define REG_Base r19
+#define REG_Sp r20
+#define REG_Hp r21
+#define REG_R1 r22
+#define REG_R2 r23
+#define REG_R3 r24
+#define REG_R4 r25
+#define REG_R5 r26
+#define REG_R6 r27
+#define REG_SpLim r28
+
+#define REG_F1 s8
+#define REG_F2 s9
+#define REG_F3 s10
+#define REG_F4 s11
+
+#define REG_D1 d12
+#define REG_D2 d13
+
+#endif /* aarch64 */
+
#endif /* NO_REGS */
/* -----------------------------------------------------------------------------
Index: b/rts/StgCRun.c
===================================================================
--- a/rts/StgCRun.c
+++ b/rts/StgCRun.c
@@ -725,4 +725,70 @@
}
#endif
+#ifdef aarch64_HOST_ARCH
+
+StgRegTable *
+StgRun(StgFunPtr f, StgRegTable *basereg) {
+ StgRegTable * r;
+ __asm__ volatile (
+ /*
+ * save callee-saves registers on behalf of the STG code.
+ */
+ "stp x19, x20, [sp, #-16]!\n\t"
+ "stp x21, x22, [sp, #-16]!\n\t"
+ "stp x23, x24, [sp, #-16]!\n\t"
+ "stp x25, x26, [sp, #-16]!\n\t"
+ "stp x27, x28, [sp, #-16]!\n\t"
+ "stp ip0, ip1, [sp, #-16]!\n\t"
+ "str lr, [sp, #-8]!\n\t"
+
+ /*
+ * allocate some space for Stg machine's temporary storage.
+ * Note: RESERVER_C_STACK_BYTES has to be a round number here or
+ * the assembler can't assemble it.
+ */
+ "str lr, [sp, %3]"
+ /* "sub sp, sp, %3\n\t" */
+ /*
+ * Set BaseReg
+ */
+ "mov x19, %2\n\t"
+ /*
+ * Jump to function argument.
+ */
+ "bx %1\n\t"
+
+ ".globl " STG_RETURN "\n\t"
+ ".type " STG_RETURN ", %%function\n"
+ STG_RETURN ":\n\t"
+ /*
+ * Free the space we allocated
+ */
+ "ldr lr, [sp], %3\n\t"
+ /* "add sp, sp, %3\n\t" */
+ /*
+ * Return the new register table, taking it from Stg's R1 (ARM64's R22).
+ */
+ "mov %0, x22\n\t"
+ /*
+ * restore callee-saves registers.
+ */
+ "ldr lr, [sp], #8\n\t"
+ "ldp ip0, ip1, [sp], #16\n\t"
+ "ldp x27, x28, [sp], #16\n\t"
+ "ldp x25, x26, [sp], #16\n\t"
+ "ldp x23, x24, [sp], #16\n\t"
+ "ldp x21, x22, [sp], #16\n\t"
+ "ldp x19, x20, [sp], #16\n\t"
+
+ : "=r" (r)
+ : "r" (f), "r" (basereg), "i" (RESERVED_C_STACK_BYTES)
+ : "%x19", "%x20", "%x21", "%x22", "%x23", "%x24", "%x25", "%x26", "%x27", "%x28",
+ "%ip0", "%ip1", "%lr"
+ );
+ return r;
+}
+
+#endif
+
#endif /* !USE_MINIINTERPRETER */

View File

@ -1,7 +1,7 @@
--- ghc-7.6.3/aclocal.m4~ 2013-04-19 06:22:46.000000000 +0900
+++ ghc-7.6.3/aclocal.m4 2014-07-15 18:22:12.308929288 +0900
@@ -349,7 +349,7 @@
],
--- ghc-7.8.3/aclocal.m4~ 2014-07-10 13:27:16.000000000 +0900
+++ ghc-7.8.3/aclocal.m4 2014-11-05 12:19:08.530044128 +0900
@@ -408,7 +408,7 @@
)],
[changequote(, )dnl
ARM_ISA=ARMv7
- ARM_ISA_EXT="[VFPv3,NEON]"

View File

@ -1,13 +0,0 @@
--- ghc-7.6.3/utils/ghc-cabal/Main.hs~ 2013-04-19 06:22:47.000000000 +0900
+++ ghc-7.6.3/utils/ghc-cabal/Main.hs 2013-10-29 12:35:18.916340631 +0900
@@ -180,8 +180,8 @@
libsubdir = toPathTemplate "$pkgid",
docdir = toPathTemplate $
if relocatableBuild
- then "$topdir/../doc/html/libraries/$pkgid"
- else (myDocdir </> "$pkgid"),
+ then "$topdir/../doc/html/libraries/$pkg"
+ else (myDocdir </> "$pkg"),
htmldir = toPathTemplate "$docdir"
}
progs = withPrograms lbi

View File

@ -1,38 +0,0 @@
#!/bin/sh
LOCKFILE=/var/lock/ghc-doc-index.lock
# the lockfile is not meant to be perfect, it's just in case
# two cron scripts get run close to each other to keep
# them from stepping on each other's toes.
if [ -f $LOCKFILE ]; then
echo "Locked with $LOCKFILE"
exit 0
fi
if [ "$(id -u)" != "0" ]; then
echo Need to be root!
exit 1
fi
trap "{ rm -f $LOCKFILE ; exit 255; }" EXIT
touch $LOCKFILE
PKGDIRCACHE=/var/lib/ghc/pkg-dir.cache
LISTING="env LANG=C ls -dl"
# only re-index ghc docs when there are changes
cd /usr/share/doc/ghc/html/libraries
if [ -r "$PKGDIRCACHE" ]; then
$LISTING */ > $PKGDIRCACHE.new
DIR_DIFF=$(diff $PKGDIRCACHE $PKGDIRCACHE.new)
else
$LISTING */ > $PKGDIRCACHE
fi
if [ -x "gen_contents_index" -a ! -r "$PKGDIRCACHE.new" -o -n "$DIR_DIFF" ]; then
./gen_contents_index
fi
if [ -f $PKGDIRCACHE.new ]; then
mv -f $PKGDIRCACHE{.new,}
fi

View File

@ -1,9 +0,0 @@
#! /bin/bash
# updates the library documentation index after updates
# This can be disabled by uninstalling ghc-doc-index
# or adding ghc-doc-index to "./jobs-deny".
/usr/bin/ghc-doc-index
exit 0

View File

@ -1,7 +1,6 @@
--- ghc-7.6.3/libraries/gen_contents_index~ 2013-04-19 06:22:46.000000000 +0900
+++ ghc-7.6.3/libraries/gen_contents_index 2013-04-22 12:07:48.922152864 +0900
@@ -60,7 +60,7 @@
done
@@ -60,6 +60,6 @@
done
else
- HADDOCK=../../../../../bin/haddock

View File

@ -0,0 +1,11 @@
--- ghc-8.6.5/libraries/gen_contents_index~ 2020-02-24 15:02:26.318866694 +0800
+++ ghc-8.6.5/libraries/gen_contents_index 2020-04-09 18:18:40.290722327 +0800
@@ -47,6 +47,8 @@
HADDOCK_ARGS="$HADDOCK_ARGS $HADDOCK_ARG"
done
else
+ if ! ls */*.haddock &>/dev/null; then exit 0; fi
+
HADDOCK=/usr/bin/haddock
# We don't want the GHC API to swamp the index
HADDOCK_FILES=`ls -1 */*.haddock | grep -v '/ghc\.haddock' | sort`

View File

@ -1,26 +0,0 @@
From 7d738547049e686be4d90a19dcb9520418d5f72d Mon Sep 17 00:00:00 2001
From: Jens Petersen <petersen@redhat.com>
Date: Mon, 9 Jun 2014 15:48:41 +0900
Subject: [PATCH] define _DEFAULT_SOURCE in Stg.h to avoid warnings from glibc
2.20 (#9185)
---
includes/Stg.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/includes/Stg.h b/includes/Stg.h
index 1707c9b..fbcf643 100644
--- a/includes/Stg.h
+++ b/includes/Stg.h
@@ -47,6 +47,8 @@
// We need _BSD_SOURCE so that math.h defines things like gamma
// on Linux
# define _BSD_SOURCE
+// glibc 2.20 deprecates _BSD_SOURCE in favour of _DEFAULT_SOURCE
+# define _DEFAULT_SOURCE
#endif
#if IN_STG_CODE == 0 || defined(llvm_CC_FLAVOR)
--
1.9.3

View File

@ -1,46 +0,0 @@
commit db9b63105a541e4ad3f9c55e2cfadf716445ab87
Author: Geoffrey Mainland <gmainlan@microsoft.com>
Date: Wed Jun 12 14:31:49 2013 +0100
Avoid generating empty llvm.used definitions.
LLVM 3.3rc3 complains when the llvm.used global is an empty array, so don't
define llvm.used at all when it would be empty.
Modified compiler/llvmGen/LlvmCodeGen.hs
diff --git a/compiler/llvmGen/LlvmCodeGen.hs b/compiler/llvmGen/LlvmCodeGen.hs
index a157a25..4f2bded 100644
--- a/compiler/llvmGen/LlvmCodeGen.hs
+++ b/compiler/llvmGen/LlvmCodeGen.hs
@@ -117,19 +117,19 @@ cmmProcLlvmGens :: DynFlags -> BufHandle -> UniqSupply -> LlvmEnv -> [RawCmmDecl
-> [[LlvmVar]] -- ^ info tables that need to be marked as 'used'
-> IO ()
-cmmProcLlvmGens _ _ _ _ [] _ []
- = return ()
-
cmmProcLlvmGens dflags h _ _ [] _ ivars
- = let ivars' = concat ivars
- cast x = LMBitc (LMStaticPointer (pVarLift x)) i8Ptr
- ty = (LMArray (length ivars') i8Ptr)
- usedArray = LMStaticArray (map cast ivars') ty
- lmUsed = (LMGlobalVar (fsLit "llvm.used") ty Appending
- (Just $ fsLit "llvm.metadata") Nothing False, Just usedArray)
- in Prt.bufLeftRender h $ {-# SCC "llvm_used_ppr" #-}
- withPprStyleDoc dflags (mkCodeStyle CStyle) $
- pprLlvmData ([lmUsed], [])
+ | null ivars' = return ()
+ | otherwise = Prt.bufLeftRender h $
+ {-# SCC "llvm_used_ppr" #-}
+ withPprStyleDoc dflags (mkCodeStyle CStyle) $
+ pprLlvmData ([lmUsed], [])
+ where
+ ivars' = concat ivars
+ cast x = LMBitc (LMStaticPointer (pVarLift x)) i8Ptr
+ ty = (LMArray (length ivars') i8Ptr)
+ usedArray = LMStaticArray (map cast ivars') ty
+ lmUsed = (LMGlobalVar (fsLit "llvm.used") ty Appending
+ (Just $ fsLit "llvm.metadata") Nothing False, Just usedArray)
cmmProcLlvmGens dflags h us env ((CmmData _ _) : cmms) count ivars
= cmmProcLlvmGens dflags h us env cmms count ivars

228
ghc-pkg.man Normal file
View File

@ -0,0 +1,228 @@
.TH ghc-pkg 1 "2010-01-27"
.SH NAME
ghc-pkg \- GHC Haskell Cabal package manager
.SH SYNOPSIS
.B ghc-pkg
.I action
.RI [ OPTION ]...
.SH DESCRIPTION
A package is a library of Haskell modules known to the compiler. The
.B ghc-pkg
tool allows adding or removing them from a package database. By
default, the system-wide package database is modified, but
alternatively the user's local package database or another specified
file can be used.
.PP
To make a package available for
.BR ghc ,
.B ghc-pkg
can be used to register it. Unregistering it removes it from the
database. Also, packages can be hidden, to make
.B ghc
ignore the package by default, without uninstalling it. Exposing a
package makes a hidden package available. Additionally,
.B ghc-pkg
has various commands to query the package database.
.PP
Where a package name is required, the package can be named in full
including the version number (e.g.
.BR network-1.0 ),
or without the version number. Naming a package without the version
number matches all versions of the package; the specified action will
be applied to all the matching packages. A package specifier that
matches all version of the package can also be written
.BR pkg-* ,
to make it clearer that multiple packages are being matched.
.SH ACTIONS
.TP
\fBregister\fP \fIfilename\fP|\fB-\fP
Register the package using the specified installed package
description.
.TP
\fBupdate\fP \fIfilename\fP|\fB-\fP
Register the package, overwriting any other package with the same
name.
.TP
\fBunregister\fP \fIpkg-id\fP
Unregister the specified package.
.TP
\fBexpose\fP \fIpkg-id\fP
Expose the specified package.
.TP
\fBhide\fP \fIpkg-id\fP
Hide the specified package
.TP
\fBlist\fP \fR[\fIpkg\fR]...\fP
List registered packages in the global database, and also the user
database if
.B --user
is given. If a package name is given all the registered versions will
be listed in ascending order. Accepts the
.B --simple-output
flag.
.TP
.B dot
Generate a graph of the package dependencies in a form suitable for
input for the graphviz tools. For example, to generate a PDF of the
dependency graph:
.br
\fB dot \| tred \| dot -Tpdf >pkgs.pdf\fP
.TP
\fBfind-module\fP \fImodule\fP
List registered packages exposing module
.I module
in the global database, and also the user database if
.B --user
is given. All the registered versions will be listed in ascending
order. Accepts the
.B --simple-output
flag.
.TP
\fBlatest\fP \fIpkg-id\fP
Prints the highest registered version of a package.
.TP
.B check
Check the consistency of package dependencies and list broken
packages. Accepts the
.B --simple-output
flag.
.TP
\fBdescribe\fP \fIpkg\fP
Give the registered description for the
specified package. The description is returned in precisely the syntax
required by ghc-pkg register.
.TP
\fBfield\fP \fIpkg field\fP
Extract the specified field of the package description for the
specified package. Accepts comma-separated multiple fields.
.TP
.B dump
Dump the registered description for every package. This is like
.BR ghc-pkg\ describe\ '*' ,
expect that it is intended to be used by tools that parse the results,
rather than humans.
.TP
.B recache
Regenerate the package database cache. This command should only be
necessary if you added a package to the database by dropping a file
into the database directory manyally. By default, the global DB is
recached; to recache a different DB use
.B --user
or
.B --package-conf
as appropriate.
.SH OPTIONS
When asked to modify a database
.RB ( register ,\ unregister ,\ update ,\ hide ,\ expose ,\ and\ also\ check ),
.B ghc-pkg
modifies the global database by
default. Specifying
.B --user
causes it to act on the user database,
or
.B --package-conf
can be used to act on another database
entirely. When multiple of these options are given, the rightmost
one is used as the database to act upon.
.PP
Commands that query the package database
.RB ( list ,\ latest ,\ describe ,\ field )
operate on the list of databases specified by the flags
.BR --user ,\ --global ,
and
.BR --package-conf .
If none of these flags are
given, the default is
.BR --global\ --user .
.TP
.B --user
Use the current user's package database.
.TP
.B --global
Use the global package database.
.TP
\fB-f\fP \fIFILE\fP, \fB--package-conf=\fIFILE\fP
Use the specified package config file.
.TP
.BI --global-conf= FILE
Location of the global package config.
.TP
.B --force
Ignore missing dependencies, directories, and libraries.
.TP
.B --force-files
Ignore missing directories and libraries only.
.TP
.BR -g ,\ --auto-ghc-libs
Automatically build libs for GHCi (with register).
.TP
.BR -? ,\ --help
Display a help message and exit.
.TP
.BR -V ,\ --version
Output version information and exit.
.TP
.B --simple-output
Print output in easy-to-parse format for some commands.
.TP
.B --names-only
Only print package names, not versions; can only be used with
.BR list\ --simple-output .
.TP
.B --ignore-case
Ignore case for substring matching.
.SH ENVIRONMENT VARIABLES
.TP
.B GHC_PACKAGE_PATH
The
.B GHC_PACKAGE_PATH
environment variable may be set to a
.BR : -separated
list of files containing package databases. This list of package
databases is used by
.B ghc
and
.BR ghc-pkg ,
with earlier databases in the list overriding later ones. This order
was chosen to match the behaviour of the
.B PATH
environment variable; think of it as a list of package databases that
are searched left-to-right for packages.
If
.B GHC_PACKAGE_PATH
ends in a separator, then the default user and system package
databases are appended, in that order. e.g. to augment the usual set
of packages with a database of your own, you could say:
.br
\fB export GHC_PACKAGE_PATH=$HOME/.my-ghc-packages.conf:\fP
.br
To check whether your
.B GHC_PACKAGE_PATH
setting is doing the right thing,
.B ghc-pkg list
will list all the databases in use, in the reverse order they are
searched.
.SH FILES
Both of these locations are changed for Debian. Upstream still keeps
these under
.IR /usr .
Some programs may refer to that, but look in
.I /var
instead.
.TP
.I /var/lib/ghc/package.conf
Global package.conf file.
.TP
.I /var/lib/ghc/package.conf.d/
Directory for library specific package.conf files. These are added to
the global registry.
.SH "SEE ALSO"
.BR ghc (1),
.BR runghc (1),
.BR hugs (1).
.SH AUTHOR
This manual page was written by Kari Pahula <kaol@debian.org>, for the
Debian project (and may be used by others).

View File

@ -1,41 +0,0 @@
Description: Add ppc64el support
Author: Colin Watson <cjwatson@ubuntu.com>
Bug: https://ghc.haskell.org/trac/ghc/ticket/8965
Last-Update: 2014-04-12
Index: b/aclocal.m4
===================================================================
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -173,7 +173,7 @@
GET_ARM_ISA()
test -z "[$]2" || eval "[$]2=\"ArchARM {armISA = \$ARM_ISA, armISAExt = \$ARM_ISA_EXT, armABI = \$ARM_ABI}\""
;;
- alpha|mips|mipseb|mipsel|hppa|hppa1_1|ia64|m68k|rs6000|s390|s390x|sparc64|vax)
+ alpha|mips|mipseb|mipsel|hppa|hppa1_1|ia64|m68k|powerpc64le|rs6000|s390|s390x|sparc64|vax)
test -z "[$]2" || eval "[$]2=ArchUnknown"
;;
*)
@@ -1868,6 +1868,9 @@
mips*)
$2="mips"
;;
+ powerpc64le*)
+ $2="powerpc64le"
+ ;;
powerpc64*)
$2="powerpc64"
;;
Index: b/includes/Stg.h
===================================================================
--- a/includes/Stg.h
+++ b/includes/Stg.h
@@ -213,7 +213,7 @@
#define II_(X) static StgWordArray (X) GNU_ATTRIBUTE(aligned (8))
#define IF_(f) static StgFunPtr GNUC3_ATTRIBUTE(used) f(void)
#define FN_(f) StgFunPtr f(void)
-#define EF_(f) extern StgFunPtr f(void)
+#define EF_(f) extern StgFunPtr f()
/* -----------------------------------------------------------------------------
Tail calls

View File

@ -1,73 +0,0 @@
This patch could be replaced by a configure call if
http://hackage.haskell.org/trac/ghc/ticket/5743 were fixed.
Index: ghc-7.6.1/rts/package.conf.in
===================================================================
--- ghc-7.6.1.orig/rts/package.conf.in 2012-09-04 19:10:15.000000000 +0200
+++ ghc-7.6.1/rts/package.conf.in 2012-10-08 13:06:55.167887121 +0200
@@ -24,8 +24,9 @@
hs-libraries: "HSrts"
extra-libraries:
+ "ffi"
#ifdef HAVE_LIBM
- "m" /* for ldexp() */
+ , "m" /* for ldexp() */
#endif
#ifdef HAVE_LIBRT
, "rt"
Index: ghc-7.6.1/ghc.mk
===================================================================
--- ghc-7.6.1.orig/ghc.mk 2012-09-04 19:10:15.000000000 +0200
+++ ghc-7.6.1/ghc.mk 2012-10-08 13:06:55.171887120 +0200
@@ -600,7 +600,6 @@
$(MAYBE_GHCI) \
driver/ghc \
driver/haddock \
- libffi \
includes \
rts
Index: ghc-7.6.1/rts/ghc.mk
===================================================================
--- ghc-7.6.1.orig/rts/ghc.mk 2012-09-04 19:10:15.000000000 +0200
+++ ghc-7.6.1/rts/ghc.mk 2012-10-08 13:08:52.019882891 +0200
@@ -177,12 +177,12 @@
# Making a shared library for the RTS.
ifneq "$$(findstring dyn, $1)" ""
ifeq "$$(HostOS_CPP)" "mingw32"
-$$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(ALL_RTS_DEF_LIBS) rts/libs.depend rts/dist/build/$$(LIBFFI_DLL)
+$$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(ALL_RTS_DEF_LIBS) rts/libs.depend
"$$(RM)" $$(RM_OPTS) $$@
"$$(rts_dist_HC)" -package-name rts -shared -dynamic -dynload deploy \
-no-auto-link-packages -Lrts/dist/build -l$(LIBFFI_WINDOWS_LIB) `cat rts/libs.depend` $$(rts_$1_OBJS) $$(ALL_RTS_DEF_LIBS) -o $$@
else
-$$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(rts_$1_DTRACE_OBJS) rts/libs.depend rts/dist/build/libffi$$(soext)
+$$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(rts_$1_DTRACE_OBJS) rts/libs.depend
"$$(RM)" $$(RM_OPTS) $$@
"$$(rts_dist_HC)" -package-name rts -shared -dynamic -dynload deploy \
-no-auto-link-packages -Lrts/dist/build -lffi `cat rts/libs.depend` $$(rts_$1_OBJS) \
@@ -193,9 +193,9 @@
endif
endif
else
-$$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(rts_$1_DTRACE_OBJS) $$(rts_ffi_objs_stamp)
+$$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(rts_$1_DTRACE_OBJS)
"$$(RM)" $$(RM_OPTS) $$@
- echo $$(rts_ffi_objs) $$(rts_$1_OBJS) $$(rts_$1_DTRACE_OBJS) | "$$(XARGS)" $$(XARGS_OPTS) "$$(AR_STAGE1)" \
+ echo $$(rts_$1_OBJS) $$(rts_$1_DTRACE_OBJS) | "$$(XARGS)" $$(XARGS_OPTS) "$$(AR_STAGE1)" \
$$(AR_OPTS_STAGE1) $$(EXTRA_AR_ARGS_STAGE1) $$@
endif
@@ -509,10 +509,8 @@
# installing
INSTALL_LIBS += $(ALL_RTS_LIBS)
-INSTALL_LIBS += $(wildcard rts/dist/build/libffi$(soext)*)
-INSTALL_LIBS += $(wildcard rts/dist/build/$(LIBFFI_DLL))
-install: install_libffi_headers
+install:
.PHONY: install_libffi_headers
install_libffi_headers :

View File

@ -0,0 +1,12 @@
--- ghc-8.4.3/mk/warnings.mk~ 2018-02-04 02:30:11.000000000 +0900
+++ ghc-8.4.3/mk/warnings.mk 2018-09-29 14:33:37.607884921 +0900
@@ -1,6 +1,6 @@
# See Note [Order of warning flags].
-SRC_CC_OPTS += -Wall $(WERROR)
+#SRC_CC_OPTS += -Wall $(WERROR)
SRC_HC_OPTS += -Wall
# Don't add -Werror to SRC_HC_OPTS_STAGE0 (or SRC_HC_OPTS), because otherwise
# validate may unnecessarily fail when booting with an older compiler.
# It would be better to only exclude certain warnings from becoming errors
Diff finished. Sat Sep 29 14:35:43 2018

View File

@ -1,6 +0,0 @@
diff -u ghc-7.4.1/ghc/ghc.wrapper\~ ghc-7.4.1/ghc/ghc.wrapper
--- ghc-7.4.1/ghc/ghc.wrapper~ 2012-02-02 03:10:32.000000000 +0900
+++ ghc-7.4.1/ghc/ghc.wrapper 2012-05-02 19:39:05.503872527 +0900
@@ -1 +1 @@
-exec "$executablename" -B"$topdir" ${1+"$@"}
+exec "$executablename" -B"$topdir" -optc-I$(pkg-config --variable=includedir libffi) ${1+"$@"}

1076
ghc.spec

File diff suppressed because it is too large Load Diff

231
haddock.man Normal file
View File

@ -0,0 +1,231 @@
.TH HADDOCK 1 "July 2010" "Haddock, version 2.6.1" "Haddock documentation generator"
.SH NAME
haddock \- documentation tool for annotated Haskell source code
.SH SYNOPSIS
.B haddock
.RI [ options ] " file" ...
.SH DESCRIPTION
This manual page documents briefly the
.B haddock
command.
Extensive documentation is available in various other formats including DVI,
PostScript and HTML; see below.
.PP
.I file
is a filename containing a Haskell source module.
All the modules specified on the command line will be processed together.
When one module refers to an entity in another module being processed, the
documentation will link directly to that entity.
Entities that cannot be found, for example because they are in a module that
is not being processed as part of the current batch, simply will not be
hyperlinked in the generated documentation.
.B haddock
will emit warnings listing all the identifiers it could not resolve.
The modules should not be mutually recursive, as
.B haddock
does not like swimming in circles.
.SH OPTIONS
The programs follow the usual GNU command line syntax, with long
options starting with two dashes (`--').
A summary of options is included below.
For a complete description, see the other documentation.
.TP
\fB\-o \fIDIR\fP, \-\-odir=\fIDIR\fP
directory in which to put the output files
.TP
\fB\-i \fIFILE\fP, \-\-read-interface=\fIFILE\fP
read an interface from
.IR FILE .
.TP
\fB\-D \fIFILE\fP, \-\-dump\-interface=\fIFILE\fP
dump an interface for these modules in
.IR FILE .
.TP
\fB\-l \fIDIR\fP, \-\-lib=\fIDIR\fP
location of Haddock's auxiliary files
.TP
.BR \-h ", " \-\-html
Generate documentation in HTML format.
Several files will be generated into the current directory (or the specified
directory if the
.B \-o
option is given), including the following:
.RS
.TP
.I index.html
The top level page of the documentation:
lists the modules available, using indentation to represent the hierarchy if
the modules are hierarchical.
.TP
.I haddock.css
The stylesheet used by the generated HTML.
Feel free to modify this to change the colors or layout, or even specify
your own stylesheet using the
.B \-\-css
option.
.TP
.I module.html
An HTML page for each module.
.TP
.IR doc-index.html ", " doc-index-XX.html
The index, split into two (functions/constructors and types/classes, as per
Haskell namespaces) and further split alphabetically.
.RE
.TP
.B \-\-hoogle
output for Hoogle
.TP
\fB\-\-html\-help=\fIformat
produce index and table of contents in mshelp, mshelp2 or devhelp format
(with \fI\-h\fP)
.TP
\fB\-\-source\-base=\fPURL
Include links to the source files in the generated documentation, where URL
is the base URL where the source files can be found.
.TP
\fB\-s \fPURL, \fB\-\-source\-module=\fPURL
Include links to the source files in the generated documentation, where URL
is a source code link for each module (using the %{FILE} or %{MODULE} vars).
.TP
\fB\-\-source\-entity=\fPURL
Include links to the source files in the generated documentation, where URL
is a source code link for each entity (using the %{FILE}, %{MODULE} or %{NAME} vars).
.TP
\fB\-\-comments\-base=\fPURL
URL for a comments link on the contents and index pages.
.TP
\fB\-\-comments\-module=\fPURL
URL for a comments link for each module (using the %{MODULE} var).
.TP
\fB\-\-comments\-entity=\fPURL
URL for a comments link for each entity (using the %{FILE}, %{MODULE} or %{NAME} vars).
.TP
.BI \-\-css= FILE
Use the CSS
.I FILE
instead of the default stylesheet that comes with
.B haddock
for HTML output. It should specify certain classes: see the default stylesheet for details.
.TP
\fB\-p \fIFILE\fP, \-\-prologue=\fIFILE\fP
Specify a file containing prologue text.
.TP
\fB\-t \fITITLE\fP, \-\-title=\fITITLE\fP
Use \fITITLE\fP as the page heading for each page in the documentation.
This will normally be the name of the library being documented.
The title should be a plain string (no markup please!).
.TP
\fB\-k \fINAME\fP, \-\-package=\fINAME\fP
Specify the package name (optional).
.TP
.BR \-n ", " \-\-no\-implicit\-prelude
do not assume Prelude is imported
.TP
.BR \-d ", " \-\-debug
Enable extra debugging output.
.TP
.BR \-? ", " \-\-help
Display help.
.TP
.BR \-V ", " \-\-version
Display version.
.TP
.BR \-v ", " \-\-verbose
Verbose status reporting.
.TP
\fB\-\-use\-contents=\fPURL
Use a separately-generated HTML contents page.
.TP
.B \-\-gen\-contents
Generate an HTML contents from specified interfaces.
.TP
\fB\-\-use\-index=\fPURL
Use a separately-generated HTML index.
.TP
.B \-\-gen\-index
Generate an HTML index from specified interfaces.
.TP
.B \-\-ignore\-all\-exports
Behave as if all modules have the ignore-exports atribute
.TP
\fB\-\-hide=\fIMODULE
Behave as if \fIMODULE\fP has the hide attribute.
.TP
\fB\-\-use\-package=\fIPACKAGE
The modules being processed depend on \fIPACKAGE\fP.
.SH FILES
.I /usr/bin/haddock
.br
.I /usr/share/haddock-2.6.1/html/plus.gif
.br
.I /usr/share/haddock-2.6.1/html/minus.gif
.br
.I /usr/share/haddock-2.6.1/html/haskell_icon.gif
.br
.I /usr/share/haddock-2.6.1/html/haddock.js
.br
.I /usr/share/haddock-2.6.1/html/haddock.css
.br
.I /usr/share/haddock-2.6.1/html/haddock-DEBUG.css
.SH SEE ALSO
.IR /usr/share/doc/haddock/ ,
.br
the Haddock homepage
.UR http://haskell.org/haddock/
(http://haskell.org/haddock/)
.UE
.SH COPYRIGHT
Haddock version 2.6.1
Copyright 2006-2010 Simon Marlow <simonmar@microsoft.com>, Dawid Waern <david.waern@gmail.com>.
All rights reserved.
.SH AUTHOR
This manual page was written by Michael Weber <michaelw@debian.org>
for the Debian GNU/Linux system (but may be used by others).
.\" Local variables:
.\" mode: nroff
.\" End:

10
libraries-versions.sh Executable file
View File

@ -0,0 +1,10 @@
#!/bin/sh
if [ ! -d libraries ]; then
echo Is CWD a ghc source tree?
exit 1
fi
cd libraries
grep -i ^version: Cabal/Cabal/Cabal.cabal */*.cabal | grep -v -e "\(Win32\|gmp.old\|gmp2\|integer-simple\)" | sed -e "s!/.*: \+!-!"

View File

@ -0,0 +1,22 @@
Description: Do not emit a warning if the .haddock file is missing
As it is quite common on Debian installations to install the -dev package
without the -doc package.
Author: Joachim Breitner <nomeata@debian.org>
Index: ghc-8.0.2/utils/ghc-pkg/Main.hs
===================================================================
--- ghc-8.0.2.orig/utils/ghc-pkg/Main.hs
+++ ghc-8.0.2/utils/ghc-pkg/Main.hs
@@ -1588,8 +1588,10 @@
mapM_ (checkDir True "dynamic-library-dirs") (libraryDynDirs pkg)
mapM_ (checkDir True "include-dirs") (includeDirs pkg)
mapM_ (checkDir True "framework-dirs") (frameworkDirs pkg)
- mapM_ (checkFile True "haddock-interfaces") (haddockInterfaces pkg)
- mapM_ (checkDirURL True "haddock-html") (haddockHTMLs pkg)
+ -- In Debian, it is quite normal that the package is installed without the
+ -- documentation. Do not print a warning there.
+ -- mapM_ (checkFile True "haddock-interfaces") (haddockInterfaces pkg)
+ -- mapM_ (checkDirURL True "haddock-html") (haddockHTMLs pkg)
checkDuplicateModules pkg
checkExposedModules db_stack pkg
checkOtherModules pkg

45
runghc.man Normal file
View File

@ -0,0 +1,45 @@
.TH RUNGHC 1 "28 NOVEMBER 2007"
.SH NAME
runghc \- program to run Haskell programs without first having to compile them.
.SH SYNOPSIS
.B runghc
.RI
[runghc|flags] [GHC|flags] module [program|flags]...
.br
.SH DESCRIPTION
.B runghc
is considered a non-interactive interpreter and part of The Glasgow Haskell Compiler.
.B runghc
is a compiler that automatically runs its results at the end.
.PP
.SH OPTIONS
.TP
the flags are:
.TP
.B \-f
it tells runghc which GHC to use to run the program. If it is not given then runghc will search for GHC in the directories in the system search path. runghc -f /path/to/ghc
.TP
.B \--
runghc will try to work out where the boundaries between [runghc flags] and [GHC flags], and [GHC flags] and module are, but you can use a -- flag if it doesn't get it right. For example, runghc -- -fglasgow-exts Foo
means runghc won't try to use glasgow-exts as the path to GHC, but instead will pass the flag to GHC.
.SH EXAMPLES
.TP
.B runghc foo
.PP
.B runghc -f /path/to/ghc foo
.TP
.B runghc -- -fglasgow-exts Foo
.SH SEE ALSO
.BR ghc (1),
.BR ghci (1).
.br
.SH COPYRIGHT
Copyright 2002, The University Court of the University of Glasgow. All rights reserved.
.SH AUTHOR
This manual page was written by Efrain Valles Pulgar <effie.jayx@gmail.com>. This is free documentation; see the GNU
General Public Licence version 2 or later for copying conditions. There is NO WARRANTY.

View File

@ -1,2 +1,2 @@
986d1f90ca30d60f7b2820d75c6b8ea7 ghc-7.6.3-src.tar.bz2
66aa6177a31cc4b9d7eeb55cb1514918 ghc-7.6.3-testsuite.tar.bz2
SHA512 (ghc-8.8.4-src.tar.xz.sig) = 1ed2e64e8b75a147d7c66b0018119f54ac740131b6f74612aa975c9120d8f7a8a2286829cef22ef2cd16262af0604659daa41c09ef3bdec6c22b8d086fbc1166
SHA512 (ghc-8.8.4-src.tar.xz) = efd23bd819f7429486696a3a929a040471db7ea8a2d1f1d832e4cf0825b9e1e0c5e6ecad0ab8376f58b74e9c28c1d2f773bd126596d6d853c9e57d57e5ceb090

View File

@ -0,0 +1,27 @@
Description: Use native x86_64 instructions on x32
This patch enables a few native 64-bit integer instructions
on x32 which are available on this architecture despite using
32-bit pointers. These instructions are present on x86_64 but
not on x86 and ghc checks the size of (void *) to determine
that. This method fails on x32 since despite using 32-bit
pointers and hence sizeof(void *) == 4, it still uses the
full x86_64 instruction set and software-emulated variants
of the aforementioned 64-bit integer instructions are
therefore not present in the toolchain which will make ghc
fail to build on x32.
See: https://ghc.haskell.org/trac/ghc/ticket/11571
.
Index: ghc-8.0.2/rts/RtsSymbols.c
===================================================================
--- ghc-8.0.2.orig/rts/RtsSymbols.c
+++ ghc-8.0.2/rts/RtsSymbols.c
@@ -857,7 +857,7 @@
// 64-bit support functions in libgcc.a
-#if defined(__GNUC__) && SIZEOF_VOID_P <= 4 && !defined(_ABIN32)
+#if defined(__GNUC__) && SIZEOF_VOID_P <= 4 && !defined(_ABIN32) && !(defined(__x86_64__) && defined(__ILP32__))
#define RTS_LIBGCC_SYMBOLS \
SymI_NeedsProto(__divdi3) \
SymI_NeedsProto(__udivdi3) \