Index: head/lang/ghc/files843/patch-configure.ac =================================================================== --- head/lang/ghc/files843/patch-configure.ac (revision 545122) +++ head/lang/ghc/files843/patch-configure.ac (nonexistent) @@ -1,24 +0,0 @@ ---- configure.ac.orig 2018-04-17 19:30:22 UTC -+++ configure.ac -@@ -447,6 +447,9 @@ XCODE_VERSION() - dnl ** Building a cross compiler? - dnl -------------------------------------------------------------- - CrossCompiling=NO -+ -+build=`echo $build | sed -e 's/amd64-/x86_64-/g; s/armv[[67]]-/arm-/g; s/-freebsd.*$/-freebsd/g'` -+ - # If 'host' and 'target' differ, then this means we are building a cross-compiler. - if test "$TargetPlatform" != "$HostPlatform" ; then - CrossCompiling=YES -@@ -1163,6 +1158,11 @@ if test "$ac_cv_sizeof_void_p" -eq 8 ; t - # The flag MAP_NORESERVE is supported for source compatibility reasons, - # but is completely ignored by OS mmap - use_large_address_space=no -+ elif test "$ghc_host_os" = "freebsd" ; then -+ # FreeBSD does not support mmap with MAP_NORESERVE, removed in r273250. -+ # The flag MAP_NORESERVE is supported for source compatibility reasons, -+ # but is completely ignored by OS mmap -+ use_large_address_space=no - else - AC_CHECK_DECLS([MAP_NORESERVE, MADV_FREE, MADV_DONTNEED],[],[], - [ Property changes on: head/lang/ghc/files843/patch-configure.ac ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/lang/ghc/files843/extra-patch-aclocal.m4 =================================================================== --- head/lang/ghc/files843/extra-patch-aclocal.m4 (revision 545122) +++ head/lang/ghc/files843/extra-patch-aclocal.m4 (nonexistent) @@ -1,54 +0,0 @@ ---- aclocal.m4.orig 2018-03-25 21:22:32 UTC -+++ aclocal.m4 -@@ -648,6 +648,14 @@ AC_DEFUN([FPTOOLS_SET_C_LD_FLAGS], - $3="$$3 -D_HPUX_SOURCE" - $5="$$5 -D_HPUX_SOURCE" - ;; -+ arm*freebsd*) -+ # On arm/freebsd, tell gcc to generate Arm -+ # instructions (ie not Thumb) and to link using the gold linker. -+ # Forcing LD to be ld.gold is done in FIND_LD m4 macro. -+ $2="$$2 -marm" -+ $3="$$3 -Wl,-z,noexecstack" -+ $4="$$4 -z noexecstack" -+ ;; - arm*linux*) - # On arm/linux and arm/android, tell gcc to generate Arm - # instructions (ie not Thumb). -@@ -656,6 +664,11 @@ AC_DEFUN([FPTOOLS_SET_C_LD_FLAGS], - $4="$$4 -z noexecstack" - ;; - -+ aarch64*freebsd*) -+ $3="$$3 -Wl,-z,noexecstack" -+ $4="$$4 -z noexecstack" -+ ;; -+ - aarch64*linux*) - $3="$$3 -Wl,-z,noexecstack" - $4="$$4 -z noexecstack" -@@ -1917,6 +1930,10 @@ case "$1" in - # converts the canonicalized target into someting llvm can understand - AC_DEFUN([GHC_LLVM_TARGET], [ - case "$2-$3" in -+ *-freebsd*-gnueabihf) -+ llvm_target_vendor="unknown" -+ llvm_target_os="freebsd-gnueabihf" -+ ;; - hardfloat-*eabi) - llvm_target_vendor="unknown" - llvm_target_os="$3""hf" -@@ -2361,13 +2378,6 @@ AC_DEFUN([FIND_LD],[ - [enable_ld_override=yes]) - - find_ld() { -- # Make sure the user didn't specify LD manually. -- if test "z$LD" != "z"; then -- AC_CHECK_TARGET_TOOL([LD], [ld]) -- LD_NO_GOLD=$LD -- return -- fi -- - # Manually iterate over possible names since we want to ensure that, e.g., - # if ld.lld is installed but gcc doesn't support -fuse-ld=lld, that we - # then still try ld.gold and -fuse-ld=gold. Property changes on: head/lang/ghc/files843/extra-patch-aclocal.m4 ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/lang/ghc/files843/patch-configure =================================================================== --- head/lang/ghc/files843/patch-configure (revision 545122) +++ head/lang/ghc/files843/patch-configure (nonexistent) @@ -1,22 +0,0 @@ ---- configure.orig 2018-03-06 20:04:54 UTC -+++ configure -@@ -9108,6 +9108,19 @@ $as_echo_n "checking Setting up CFLAGS, LDFLAGS, IGNOR - IGNORE_LINKER_LD_FLAGS="$IGNORE_LINKER_LD_FLAGS -z noexecstack" - ;; - -+ arm*freebsd*) -+ # On arm/freebsd, tell gcc to generate Arm -+ # instructions (ie not Thumb). -+ CFLAGS="$CFLAGS -marm" -+ LDFLAGS="$LDFLAGS -Wl,-z,noexecstack" -+ IGNORE_LINKER_LD_FLAGS="$IGNORE_LINKER_LD_FLAGS -z noexecstack" -+ ;; -+ -+ aarch64*freebsd*) -+ LDFLAGS="$LDFLAGS -Wl,-z,noexecstack" -+ IGNORE_LINKER_LD_FLAGS="$IGNORE_LINKER_LD_FLAGS -z noexecstack" -+ ;; -+ - powerpc-ibm-aix*) - # We need `-D_THREAD_SAFE` to unlock the thread-local `errno`. - CFLAGS="$CFLAGS -D_THREAD_SAFE" Property changes on: head/lang/ghc/files843/patch-configure ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/lang/ghc/files843/build.mk.in =================================================================== --- head/lang/ghc/files843/build.mk.in (revision 545122) +++ head/lang/ghc/files843/build.mk.in (nonexistent) @@ -1,20 +0,0 @@ -docdir = %%PREFIX%%/share/doc/ghc-%%GHC_VERSION%% -htmldir = %%PREFIX%%/share/doc/ghc-%%GHC_VERSION%% -mandir = %%PREFIX%%/man -infodir = %%PREFIX%%/info -DYNAMIC_GHC_PROGRAMS = %%WITH_DYNAMIC%% -BUILD_PROF_LIBS = %%WITH_PROFILE%% -HADDOCK_DOCS = YES -HSCOLOUR_SRCS = %%WITH_DOCS%% -INTEGER_LIBRARY = %%INTEGER_LIBRARY%% -# disable xelatex: PR 231438 -BUILD_SPHINX_PDF = NO -BSD_PATH_TO_HSC2HS = %%HSC2HS%% -SRC_HC_OPTS += -I%%NCURSESINC%% -L%%NCURSESLIB%% -I%%LOCALBASE%%/include -L%%LOCALBASE%%/lib -SRC_CC_OPTS += %%CFLAGS%% -EXTRA_HSC2HS_OPTS += -I%%LOCALBASE%%/include --lflag=-L%%LOCALBASE%%/lib -EXTRA_LD_OPTS += -L%%LOCALBASE%%/lib -EXTRA_CABAL_CONFIGURE_FLAGS += --extra-include-dirs=%%LOCALBASE%%/include -EXTRA_CABAL_CONFIGURE_FLAGS += --extra-lib-dirs=%%LOCALBASE%%/lib -libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes=%%NCURSESINC%% --configure-option=--with-curses-libraries=%%NCURSESLIB%% -V = 0 Property changes on: head/lang/ghc/files843/build.mk.in ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/lang/ghc/files843/wrap.c =================================================================== --- head/lang/ghc/files843/wrap.c (revision 545122) +++ head/lang/ghc/files843/wrap.c (nonexistent) @@ -1,55 +0,0 @@ -/* -*- ugly-hack-mode -*- */ -/* $FreeBSD$ */ - -#include - -struct old_dirent; -struct old_stat; - -__asm(".symver old_readdir_r, readdir_r@FBSD_1.0"); -int old_readdir_r(void *dirp, struct old_dirent *entry, - struct old_dirent **result); -__asm(".symver old_stat, stat@FBSD_1.0"); -int old_stat(const char * restrict path, struct old_stat * restrict sb); -__asm(".symver old_lstat, lstat@FBSD_1.0"); -int old_lstat(const char * restrict path, struct old_stat * restrict sb); -__asm(".symver old_fstat, fstat@FBSD_1.0"); -int old_fstat(int fd, struct old_stat *sb); -__asm(".symver old_mknod, mknod@FBSD_1.0"); -int old_mknod(const char *path, mode_t mode, uint32_t dev); - -int -__wrap_readdir_r(void *dirp, struct old_dirent *entry, - struct old_dirent **result) -{ - - return (old_readdir_r(dirp, entry, result)); -} - -int -__wrap_stat(const char * restrict path, struct old_stat * restrict sb) -{ - - return (old_stat(path, sb)); -} - -int -__wrap_lstat(const char * restrict path, struct old_stat * restrict sb) -{ - - return (old_lstat(path, sb)); -} - -int -__wrap_fstat(int fd, struct old_stat *sb) -{ - - return (old_fstat(fd, sb)); -} - -int -__wrap_mknod(const char *path, mode_t mode, uint32_t dev) -{ - - return (old_mknod(path, mode, dev)); -} Property changes on: head/lang/ghc/files843/wrap.c ___________________________________________________________________ Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/lang/ghc/files843/patch-libraries__Cabal__Cabal__Distribution__Simple__Program__Builtin.hs =================================================================== --- head/lang/ghc/files843/patch-libraries__Cabal__Cabal__Distribution__Simple__Program__Builtin.hs (revision 545122) +++ head/lang/ghc/files843/patch-libraries__Cabal__Cabal__Distribution__Simple__Program__Builtin.hs (nonexistent) @@ -1,39 +0,0 @@ ---- libraries/Cabal/Cabal/Distribution/Simple/Program/Builtin.hs.orig 2017-11-28 16:40:34 UTC -+++ libraries/Cabal/Cabal/Distribution/Simple/Program/Builtin.hs -@@ -59,6 +59,8 @@ import Distribution.Compat.Exception - import Distribution.Verbosity - import Distribution.Version - -+import System.FilePath (takeDirectory) -+ - import qualified Data.Map as Map - - -- ------------------------------------------------------------ -@@ -265,11 +267,13 @@ alexProgram = (simpleProgram "alex") { - - gccProgram :: Program - gccProgram = (simpleProgram "gcc") { -- programFindVersion = findProgramVersion "-dumpversion" id -- } -+ programFindLocation = \v p -> findProgramOnSearchPath v p "%%CC%%" -+} - - arProgram :: Program --arProgram = simpleProgram "ar" -+arProgram = (simpleProgram "ar") { -+ programFindLocation = \v p -> findProgramOnSearchPath v p "%%AR%%" -+} - - stripProgram :: Program - stripProgram = (simpleProgram "strip") { -@@ -337,7 +341,9 @@ greencardProgram :: Program - greencardProgram = simpleProgram "greencard" - - ldProgram :: Program --ldProgram = simpleProgram "ld" -+ldProgram = (simpleProgram "ld") { -+ programFindLocation = \v p -> findProgramOnSearchPath v p "%%LD%%" -+ } - - tarProgram :: Program - tarProgram = (simpleProgram "tar") { Property changes on: head/lang/ghc/files843/patch-libraries__Cabal__Cabal__Distribution__Simple__Program__Builtin.hs ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/lang/ghc/files843/patch-ghc.mk =================================================================== --- head/lang/ghc/files843/patch-ghc.mk (revision 545122) +++ head/lang/ghc/files843/patch-ghc.mk (nonexistent) @@ -1,11 +0,0 @@ ---- ghc.mk.orig 2017-01-03 15:59:18 UTC -+++ ghc.mk -@@ -96,6 +96,7 @@ endif - # Catch make if it runs away into an infinite loop - ifeq "$(MAKE_RESTARTS)" "" - else ifeq "$(MAKE_RESTARTS)" "1" -+else ifeq "$(MAKE_RESTARTS)" "2" - else - $(error Make has restarted itself $(MAKE_RESTARTS) times; is there a makefile bug? See http://ghc.haskell.org/trac/ghc/wiki/Building/Troubleshooting#Makehasrestarteditself3timesisthereamakefilebug for details) - endif - Property changes on: head/lang/ghc/files843/patch-ghc.mk ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/lang/ghc/files843/patch-llvm-targets =================================================================== --- head/lang/ghc/files843/patch-llvm-targets (revision 545122) +++ head/lang/ghc/files843/patch-llvm-targets (nonexistent) @@ -1,10 +0,0 @@ ---- llvm-targets.orig 2018-03-17 14:04:41 UTC -+++ llvm-targets -@@ -20,4 +20,7 @@ - ,("aarch64-apple-ios", ("e-m:o-i64:64-i128:128-n32:64-S128", "generic", "+neon")) - ,("i386-apple-ios", ("e-m:o-p:32:32-f64:32:64-f80:128-n8:16:32-S128", "yonah", "")) - ,("x86_64-apple-ios", ("e-m:o-i64:64-f80:128-n8:16:32:64-S128", "core2", "")) -+,("armv6-unknown-freebsd-gnueabihf", ("e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64", "arm1176jzf-s", "+strict-align")) -+,("armv7-unknown-freebsd-gnueabihf", ("e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64", "generic", "+strict-align")) -+,("aarch64-unknown-freebsd", ("e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128", "generic", "+neon")) - ] Property changes on: head/lang/ghc/files843/patch-llvm-targets ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/lang/ghc/files844/patch-configure.ac =================================================================== --- head/lang/ghc/files844/patch-configure.ac (revision 545122) +++ head/lang/ghc/files844/patch-configure.ac (nonexistent) @@ -1,12 +0,0 @@ ---- configure.ac.orig 2018-04-17 19:30:22 UTC -+++ configure.ac -@@ -447,6 +447,9 @@ XCODE_VERSION() - dnl ** Building a cross compiler? - dnl -------------------------------------------------------------- - CrossCompiling=NO -+ -+build=`echo $build | sed -e 's/amd64-/x86_64-/g; s/armv[[67]]-/arm-/g; s/-freebsd.*$/-freebsd/g'` -+ - # If 'host' and 'target' differ, then this means we are building a cross-compiler. - if test "$TargetPlatform" != "$HostPlatform" ; then - CrossCompiling=YES Property changes on: head/lang/ghc/files844/patch-configure.ac ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/lang/ghc/files844/extra-patch-aclocal.m4 =================================================================== --- head/lang/ghc/files844/extra-patch-aclocal.m4 (revision 545122) +++ head/lang/ghc/files844/extra-patch-aclocal.m4 (nonexistent) @@ -1,54 +0,0 @@ ---- aclocal.m4.orig 2018-03-25 21:22:32 UTC -+++ aclocal.m4 -@@ -648,6 +648,14 @@ AC_DEFUN([FPTOOLS_SET_C_LD_FLAGS], - $3="$$3 -D_HPUX_SOURCE" - $5="$$5 -D_HPUX_SOURCE" - ;; -+ arm*freebsd*) -+ # On arm/freebsd, tell gcc to generate Arm -+ # instructions (ie not Thumb) and to link using the gold linker. -+ # Forcing LD to be ld.gold is done in FIND_LD m4 macro. -+ $2="$$2 -marm" -+ $3="$$3 -Wl,-z,noexecstack" -+ $4="$$4 -z noexecstack" -+ ;; - arm*linux*) - # On arm/linux and arm/android, tell gcc to generate Arm - # instructions (ie not Thumb). -@@ -656,6 +664,11 @@ AC_DEFUN([FPTOOLS_SET_C_LD_FLAGS], - $4="$$4 -z noexecstack" - ;; - -+ aarch64*freebsd*) -+ $3="$$3 -Wl,-z,noexecstack" -+ $4="$$4 -z noexecstack" -+ ;; -+ - aarch64*linux*) - $3="$$3 -Wl,-z,noexecstack" - $4="$$4 -z noexecstack" -@@ -1917,6 +1930,10 @@ case "$1" in - # converts the canonicalized target into someting llvm can understand - AC_DEFUN([GHC_LLVM_TARGET], [ - case "$2-$3" in -+ *-freebsd*-gnueabihf) -+ llvm_target_vendor="unknown" -+ llvm_target_os="freebsd-gnueabihf" -+ ;; - hardfloat-*eabi) - llvm_target_vendor="unknown" - llvm_target_os="$3""hf" -@@ -2361,13 +2378,6 @@ AC_DEFUN([FIND_LD],[ - [enable_ld_override=yes]) - - find_ld() { -- # Make sure the user didn't specify LD manually. -- if test "z$LD" != "z"; then -- AC_CHECK_TARGET_TOOL([LD], [ld]) -- LD_NO_GOLD=$LD -- return -- fi -- - # Manually iterate over possible names since we want to ensure that, e.g., - # if ld.lld is installed but gcc doesn't support -fuse-ld=lld, that we - # then still try ld.gold and -fuse-ld=gold. Property changes on: head/lang/ghc/files844/extra-patch-aclocal.m4 ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/lang/ghc/files844/patch-configure =================================================================== --- head/lang/ghc/files844/patch-configure (revision 545122) +++ head/lang/ghc/files844/patch-configure (nonexistent) @@ -1,22 +0,0 @@ ---- configure.orig 2018-03-06 20:04:54 UTC -+++ configure -@@ -9108,6 +9108,19 @@ $as_echo_n "checking Setting up CFLAGS, LDFLAGS, IGNOR - IGNORE_LINKER_LD_FLAGS="$IGNORE_LINKER_LD_FLAGS -z noexecstack" - ;; - -+ arm*freebsd*) -+ # On arm/freebsd, tell gcc to generate Arm -+ # instructions (ie not Thumb). -+ CFLAGS="$CFLAGS -marm" -+ LDFLAGS="$LDFLAGS -Wl,-z,noexecstack" -+ IGNORE_LINKER_LD_FLAGS="$IGNORE_LINKER_LD_FLAGS -z noexecstack" -+ ;; -+ -+ aarch64*freebsd*) -+ LDFLAGS="$LDFLAGS -Wl,-z,noexecstack" -+ IGNORE_LINKER_LD_FLAGS="$IGNORE_LINKER_LD_FLAGS -z noexecstack" -+ ;; -+ - powerpc-ibm-aix*) - # We need `-D_THREAD_SAFE` to unlock the thread-local `errno`. - CFLAGS="$CFLAGS -D_THREAD_SAFE" Property changes on: head/lang/ghc/files844/patch-configure ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/lang/ghc/files844/build.mk.in =================================================================== --- head/lang/ghc/files844/build.mk.in (revision 545122) +++ head/lang/ghc/files844/build.mk.in (nonexistent) @@ -1,20 +0,0 @@ -docdir = %%PREFIX%%/share/doc/ghc-%%GHC_VERSION%% -htmldir = %%PREFIX%%/share/doc/ghc-%%GHC_VERSION%% -mandir = %%PREFIX%%/man -infodir = %%PREFIX%%/info -DYNAMIC_GHC_PROGRAMS = %%WITH_DYNAMIC%% -BUILD_PROF_LIBS = %%WITH_PROFILE%% -HADDOCK_DOCS = YES -HSCOLOUR_SRCS = %%WITH_DOCS%% -INTEGER_LIBRARY = %%INTEGER_LIBRARY%% -# disable xelatex: PR 231438 -BUILD_SPHINX_PDF = NO -BSD_PATH_TO_HSC2HS = %%HSC2HS%% -SRC_HC_OPTS += -I%%NCURSESINC%% -L%%NCURSESLIB%% -I%%LOCALBASE%%/include -L%%LOCALBASE%%/lib -SRC_CC_OPTS += %%CFLAGS%% -EXTRA_HSC2HS_OPTS += -I%%LOCALBASE%%/include --lflag=-L%%LOCALBASE%%/lib -EXTRA_LD_OPTS += -L%%LOCALBASE%%/lib -EXTRA_CABAL_CONFIGURE_FLAGS += --extra-include-dirs=%%LOCALBASE%%/include -EXTRA_CABAL_CONFIGURE_FLAGS += --extra-lib-dirs=%%LOCALBASE%%/lib -libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes=%%NCURSESINC%% --configure-option=--with-curses-libraries=%%NCURSESLIB%% -V = 0 Property changes on: head/lang/ghc/files844/build.mk.in ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/lang/ghc/files844/patch-rts_posix_OSMem.c =================================================================== --- head/lang/ghc/files844/patch-rts_posix_OSMem.c (revision 545122) +++ head/lang/ghc/files844/patch-rts_posix_OSMem.c (nonexistent) @@ -1,250 +0,0 @@ ---- rts/posix/OSMem.c.orig 2017-11-28 16:39:14 UTC -+++ rts/posix/OSMem.c -@@ -36,6 +36,10 @@ - #if defined(HAVE_NUMAIF_H) - #include - #endif -+#if defined(HAVE_SYS_RESOURCE_H) && defined(HAVE_SYS_TIME_H) -+#include -+#include -+#endif - - #include - -@@ -45,6 +49,29 @@ - #include - #endif - -+#ifndef MAP_FAILED -+# define MAP_FAILED ((void *)-1) -+#endif -+ -+#if defined(hpux_HOST_OS) -+# ifndef MAP_ANON -+# define MAP_ANON MAP_ANONYMOUS -+# endif -+#endif -+ -+#ifndef darwin_HOST_OS -+# undef RESERVE_FLAGS -+# if defined(MAP_GUARD) -+# define RESERVE_FLAGS MAP_GUARD /* FreeBSD */ -+# elif defined(MAP_NORESERVE) -+# define RESERVE_FLAGS MAP_NORESERVE | MAP_ANON | MAP_PRIVATE; -+# else -+# if defined(USE_LARGE_ADDRESS_SPACE) -+# error USE_LARGE_ADDRESS_SPACE needs MAP_NORESERVE or MAP_GUARD -+# endif -+# endif -+#endif -+ - static void *next_request = 0; - - void osMemInit(void) -@@ -98,8 +125,10 @@ - The naming is chosen from the Win32 API (VirtualAlloc) which does the - same thing and has done so forever, while support for this in Unix systems - has only been added recently and is hidden in the posix portability mess. -- It is confusing because to get the reserve behavior we need MAP_NORESERVE -- (which tells the kernel not to allocate backing space), but heh... -+ The Linux manpage suggests that mmap must be passed MAP_NORESERVE in order -+ to get reservation-only behavior. It is confusing because to get the reserve -+ behavior we need MAP_NORESERVE (which tells the kernel not to allocate backing -+ space), but heh... - */ - enum - { -@@ -108,6 +137,44 @@ - MEM_RESERVE_AND_COMMIT = MEM_RESERVE | MEM_COMMIT - }; - -+#if defined(linux_HOST_OS) -+static void * -+linux_retry_mmap(int operation, W_ size, void *ret, void *addr, int prot, int flags) -+{ -+ if (addr != 0 && (operation & MEM_RESERVE)) { -+ // Try again with no hint address. -+ // It's not clear that this can ever actually help, -+ // but since our alternative is to abort, we may as well try. -+ ret = mmap(0, size, prot, flags, -1, 0); -+ } -+ if (ret == MAP_FAILED && errno == EPERM) { -+ // Linux is not willing to give us any mapping, -+ // so treat this as an out-of-memory condition -+ // (really out of virtual address space). -+ errno = ENOMEM; -+ } -+ return ret; -+} -+#endif /* defined(linux_HOST_OS) */ -+ -+static void -+post_mmap_madvise(int operation, W_ size, void *ret) -+{ -+#if defined(MADV_WILLNEED) -+ if (operation & MEM_COMMIT) { -+ madvise(ret, size, MADV_WILLNEED); -+# if defined(MADV_DODUMP) -+ madvise(ret, size, MADV_DODUMP); -+# endif -+ } else { -+ madvise(ret, size, MADV_DONTNEED); -+# if defined(MADV_DONTDUMP) -+ madvise(ret, size, MADV_DONTDUMP); -+# endif -+ } -+#endif -+} -+ - /* Returns NULL on failure; errno set */ - static void * - my_mmap (void *addr, W_ size, int operation) -@@ -149,69 +216,44 @@ - VM_PROT_READ|VM_PROT_WRITE); - } - --#else -+#else /* defined(darwin_HOST_OS) */ - - int prot, flags; -- if (operation & MEM_COMMIT) -+ if (operation & MEM_COMMIT) { - prot = PROT_READ | PROT_WRITE; -- else -+ } else { - prot = PROT_NONE; -- if (operation == MEM_RESERVE) --# if defined(MAP_NORESERVE) -- flags = MAP_NORESERVE; -+ } -+ -+ if (operation == MEM_RESERVE) { -+# if defined(RESERVE_FLAGS) -+ flags = RESERVE_FLAGS; - # else --# if defined(USE_LARGE_ADDRESS_SPACE) --# error USE_LARGE_ADDRESS_SPACE needs MAP_NORESERVE --# endif - errorBelch("my_mmap(,,MEM_RESERVE) not supported on this platform"); - # endif -- else if (operation == MEM_COMMIT) -- flags = MAP_FIXED; -- else -- flags = 0; -+ } else if (operation == MEM_COMMIT) { -+ flags = MAP_FIXED | MAP_ANON | MAP_PRIVATE; -+ } else { -+ flags = MAP_ANON | MAP_PRIVATE; -+ } - --#if defined(hpux_HOST_OS) -- ret = mmap(addr, size, prot, flags | MAP_ANONYMOUS | MAP_PRIVATE, -1, 0); --#elif defined(linux_HOST_OS) -- ret = mmap(addr, size, prot, flags | MAP_ANON | MAP_PRIVATE, -1, 0); -- if (ret == (void *)-1 && errno == EPERM) { -+ ret = mmap(addr, size, prot, flags, -1, 0); -+# if defined(linux_HOST_OS) -+ if (ret == MAP_FAILED && errno == EPERM) { - // Linux may return EPERM if it tried to give us - // a chunk of address space below mmap_min_addr, - // See Trac #7500. -- if (addr != 0 && (operation & MEM_RESERVE)) { -- // Try again with no hint address. -- // It's not clear that this can ever actually help, -- // but since our alternative is to abort, we may as well try. -- ret = mmap(0, size, prot, flags | MAP_ANON | MAP_PRIVATE, -1, 0); -- } -- if (ret == (void *)-1 && errno == EPERM) { -- // Linux is not willing to give us any mapping, -- // so treat this as an out-of-memory condition -- // (really out of virtual address space). -- errno = ENOMEM; -- } -+ ret = linux_retry_mmap(operation, size, ret, addr, prot, flags); - } -- -- if (operation & MEM_COMMIT) { -- madvise(ret, size, MADV_WILLNEED); --#if defined(MADV_DODUMP) -- madvise(ret, size, MADV_DODUMP); --#endif -- } else { -- madvise(ret, size, MADV_DONTNEED); --#if defined(MADV_DONTDUMP) -- madvise(ret, size, MADV_DONTDUMP); --#endif -- } -- --#else -- ret = mmap(addr, size, prot, flags | MAP_ANON | MAP_PRIVATE, -1, 0); --#endif --#endif -- -- if (ret == (void *)-1) { -+# endif -+ if (ret == MAP_FAILED) { - return NULL; - } -+#endif /* defined(darwin_HOST_OS) */ -+ -+ // Map in committed pages rather than take a fault for each chunk. -+ // Also arrange to include them in core-dump files. -+ post_mmap_madvise(operation, size, ret); - - return ret; - } -@@ -435,6 +477,8 @@ - void *base, *top; - void *start, *end; - -+ ASSERT((len & ~MBLOCK_MASK) == len); -+ - /* We try to allocate len + MBLOCK_SIZE, - because we need memory which is MBLOCK_SIZE aligned, - and then we discard what we don't need */ -@@ -500,8 +544,19 @@ - (void*)startAddress, (void*)minimumAddress); - } - -+#if defined(HAVE_SYS_RESOURCE_H) && defined(HAVE_SYS_TIME_H) -+ struct rlimit limit; -+ if (!getrlimit(RLIMIT_AS, &limit) -+ && limit.rlim_cur > 0 -+ && *len > limit.rlim_cur) { -+ *len = limit.rlim_cur; -+ } -+#endif -+ - attempt = 0; - while (1) { -+ *len &= ~MBLOCK_MASK; -+ - if (*len < MBLOCK_SIZE) { - // Give up if the system won't even give us 16 blocks worth of heap - barf("osReserveHeapMemory: Failed to allocate heap storage"); -@@ -512,9 +567,14 @@ - if (at == NULL) { - // This means that mmap failed which we take to mean that we asked - // for too much memory. This can happen due to POSIX resource -- // limits. In this case we reduce our allocation request by a factor -- // of two and try again. -- *len /= 2; -+ // limits. In this case we reduce our allocation request by a -+ // fraction of the current size and try again. -+ // -+ // Note that the previously would instead decrease the request size -+ // by a factor of two; however, this meant that significant amounts -+ // of memory will be wasted (e.g. imagine a machine with 512GB of -+ // physical memory but a 511GB ulimit). See #14492. -+ *len -= *len / 8; - } else if ((W_)at >= minimumAddress) { - // Success! We were given a block of memory starting above the 8 GB - // mark, which is what we were looking for. -@@ -536,7 +596,7 @@ - { - void *r = my_mmap(at, size, MEM_COMMIT); - if (r == NULL) { -- barf("Unable to commit %d bytes of memory", size); -+ barf("Unable to commit %" FMT_Word " bytes of memory", size); - } - } Property changes on: head/lang/ghc/files844/patch-rts_posix_OSMem.c ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/lang/ghc/files844/wrap.c =================================================================== --- head/lang/ghc/files844/wrap.c (revision 545122) +++ head/lang/ghc/files844/wrap.c (nonexistent) @@ -1,55 +0,0 @@ -/* -*- ugly-hack-mode -*- */ -/* $FreeBSD$ */ - -#include - -struct old_dirent; -struct old_stat; - -__asm(".symver old_readdir_r, readdir_r@FBSD_1.0"); -int old_readdir_r(void *dirp, struct old_dirent *entry, - struct old_dirent **result); -__asm(".symver old_stat, stat@FBSD_1.0"); -int old_stat(const char * restrict path, struct old_stat * restrict sb); -__asm(".symver old_lstat, lstat@FBSD_1.0"); -int old_lstat(const char * restrict path, struct old_stat * restrict sb); -__asm(".symver old_fstat, fstat@FBSD_1.0"); -int old_fstat(int fd, struct old_stat *sb); -__asm(".symver old_mknod, mknod@FBSD_1.0"); -int old_mknod(const char *path, mode_t mode, uint32_t dev); - -int -__wrap_readdir_r(void *dirp, struct old_dirent *entry, - struct old_dirent **result) -{ - - return (old_readdir_r(dirp, entry, result)); -} - -int -__wrap_stat(const char * restrict path, struct old_stat * restrict sb) -{ - - return (old_stat(path, sb)); -} - -int -__wrap_lstat(const char * restrict path, struct old_stat * restrict sb) -{ - - return (old_lstat(path, sb)); -} - -int -__wrap_fstat(int fd, struct old_stat *sb) -{ - - return (old_fstat(fd, sb)); -} - -int -__wrap_mknod(const char *path, mode_t mode, uint32_t dev) -{ - - return (old_mknod(path, mode, dev)); -} Property changes on: head/lang/ghc/files844/wrap.c ___________________________________________________________________ Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/lang/ghc/files844/patch-libraries__Cabal__Cabal__Distribution__Simple__Program__Builtin.hs =================================================================== --- head/lang/ghc/files844/patch-libraries__Cabal__Cabal__Distribution__Simple__Program__Builtin.hs (revision 545122) +++ head/lang/ghc/files844/patch-libraries__Cabal__Cabal__Distribution__Simple__Program__Builtin.hs (nonexistent) @@ -1,39 +0,0 @@ ---- libraries/Cabal/Cabal/Distribution/Simple/Program/Builtin.hs.orig 2017-11-28 16:40:34 UTC -+++ libraries/Cabal/Cabal/Distribution/Simple/Program/Builtin.hs -@@ -59,6 +59,8 @@ import Distribution.Compat.Exception - import Distribution.Verbosity - import Distribution.Version - -+import System.FilePath (takeDirectory) -+ - import qualified Data.Map as Map - - -- ------------------------------------------------------------ -@@ -265,11 +267,13 @@ alexProgram = (simpleProgram "alex") { - - gccProgram :: Program - gccProgram = (simpleProgram "gcc") { -- programFindVersion = findProgramVersion "-dumpversion" id -- } -+ programFindLocation = \v p -> findProgramOnSearchPath v p "%%CC%%" -+} - - arProgram :: Program --arProgram = simpleProgram "ar" -+arProgram = (simpleProgram "ar") { -+ programFindLocation = \v p -> findProgramOnSearchPath v p "%%AR%%" -+} - - stripProgram :: Program - stripProgram = (simpleProgram "strip") { -@@ -337,7 +341,9 @@ greencardProgram :: Program - greencardProgram = simpleProgram "greencard" - - ldProgram :: Program --ldProgram = simpleProgram "ld" -+ldProgram = (simpleProgram "ld") { -+ programFindLocation = \v p -> findProgramOnSearchPath v p "%%LD%%" -+ } - - tarProgram :: Program - tarProgram = (simpleProgram "tar") { Property changes on: head/lang/ghc/files844/patch-libraries__Cabal__Cabal__Distribution__Simple__Program__Builtin.hs ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/lang/ghc/files844/patch-fix-build-on-arm =================================================================== --- head/lang/ghc/files844/patch-fix-build-on-arm (revision 545122) +++ head/lang/ghc/files844/patch-fix-build-on-arm (nonexistent) @@ -1,231 +0,0 @@ -From d8495549ba9d194815c2d0eaee6797fc7c00756a Mon Sep 17 00:00:00 2001 -From: Kavon Farvardin -Date: Sun, 28 Oct 2018 12:11:49 -0400 -Subject: [PATCH] Fix for T14251 on ARM - -We now calculate the SSE register padding needed to fix the calling -convention in LLVM in a robust way: grouping them by whether -registers in that class overlap (with the same class overlapping -itself). - -My prior patch assumed that no matter the platform, physical -register Fx aliases with Dx, etc, for our calling convention. - -This is unfortunately not the case for any platform except x86-64. - -Test Plan: -Only know how to test on x86-64, but it should be tested on ARM with: - -`make test WAYS=llvm && make test WAYS=optllvm` - -Reviewers: bgamari, angerman - -Reviewed By: bgamari - -Subscribers: rwbarton, carter - -GHC Trac Issues: #15780, #14251, #15747 - -Differential Revision: https://phabricator.haskell.org/D5254 ---- - compiler/llvmGen/LlvmCodeGen/Base.hs | 123 ++++++++++++++++++++++---------- - compiler/llvmGen/LlvmCodeGen/CodeGen.hs | 6 +- - 2 files changed, 90 insertions(+), 39 deletions(-) - -diff --git a/compiler/llvmGen/LlvmCodeGen/Base.hs b/compiler/llvmGen/LlvmCodeGen/Base.hs -index ec91bac..0a40b73 100644 ---- compiler/llvmGen/LlvmCodeGen/Base.hs -+++ compiler/llvmGen/LlvmCodeGen/Base.hs -@@ -26,7 +26,7 @@ module LlvmCodeGen.Base ( - - cmmToLlvmType, widthToLlvmFloat, widthToLlvmInt, llvmFunTy, - llvmFunSig, llvmFunArgs, llvmStdFunAttrs, llvmFunAlign, llvmInfAlign, -- llvmPtrBits, tysToParams, llvmFunSection, padLiveArgs, isSSE, -+ llvmPtrBits, tysToParams, llvmFunSection, padLiveArgs, isFPR, - - strCLabel_llvm, strDisplayName_llvm, strProcedureName_llvm, - getGlobalPtr, generateExternDecls, -@@ -47,6 +47,7 @@ import CodeGen.Platform ( activeStgRegs ) - import DynFlags - import FastString - import Cmm hiding ( succ ) -+import CmmUtils ( regsOverlap ) - import Outputable as Outp - import Platform - import UniqFM -@@ -58,8 +59,7 @@ import ErrUtils - import qualified Stream - - import Control.Monad (ap) --import Data.List (sort) --import Data.Maybe (mapMaybe) -+import Data.List (sort, groupBy, head) - - -- ---------------------------------------------------------------------------- - -- * Some Data Types -@@ -152,36 +152,91 @@ llvmFunArgs dflags live = - map (lmGlobalRegArg dflags) (filter isPassed allRegs) - where platform = targetPlatform dflags - allRegs = activeStgRegs platform -- paddedLive = map (\(_,r) -> r) $ padLiveArgs live -+ paddedLive = map (\(_,r) -> r) $ padLiveArgs dflags live - isLive r = r `elem` alwaysLive || r `elem` paddedLive -- isPassed r = not (isSSE r) || isLive r -- -- --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 -+ isPassed r = not (isFPR r) || isLive r -+ -+ -+isFPR :: GlobalReg -> Bool -+isFPR (FloatReg _) = True -+isFPR (DoubleReg _) = True -+isFPR (XmmReg _) = True -+isFPR (YmmReg _) = True -+isFPR (ZmmReg _) = True -+isFPR _ = False -+ -+sameFPRClass :: GlobalReg -> GlobalReg -> Bool -+sameFPRClass (FloatReg _) (FloatReg _) = True -+sameFPRClass (DoubleReg _) (DoubleReg _) = True -+sameFPRClass (XmmReg _) (XmmReg _) = True -+sameFPRClass (YmmReg _) (YmmReg _) = True -+sameFPRClass (ZmmReg _) (ZmmReg _) = True -+sameFPRClass _ _ = False -+ -+normalizeFPRNum :: GlobalReg -> GlobalReg -+normalizeFPRNum (FloatReg _) = FloatReg 1 -+normalizeFPRNum (DoubleReg _) = DoubleReg 1 -+normalizeFPRNum (XmmReg _) = XmmReg 1 -+normalizeFPRNum (YmmReg _) = YmmReg 1 -+normalizeFPRNum (ZmmReg _) = ZmmReg 1 -+normalizeFPRNum _ = error "normalizeFPRNum expected only FPR regs" -+ -+getFPRCtor :: GlobalReg -> Int -> GlobalReg -+getFPRCtor (FloatReg _) = FloatReg -+getFPRCtor (DoubleReg _) = DoubleReg -+getFPRCtor (XmmReg _) = XmmReg -+getFPRCtor (YmmReg _) = YmmReg -+getFPRCtor (ZmmReg _) = ZmmReg -+getFPRCtor _ = error "getFPRCtor expected only FPR regs" -+ -+fprRegNum :: GlobalReg -> Int -+fprRegNum (FloatReg i) = i -+fprRegNum (DoubleReg i) = i -+fprRegNum (XmmReg i) = i -+fprRegNum (YmmReg i) = i -+fprRegNum (ZmmReg i) = i -+fprRegNum _ = error "fprRegNum expected only FPR regs" -+ -+-- | Input: dynflags, and the list of live registers -+-- -+-- Output: An augmented list of live registers, where padding was -+-- added to the list of registers to ensure the calling convention is -+-- correctly used by LLVM. -+-- -+-- Each global reg in the returned list is tagged with a bool, which -+-- indicates whether the global reg was added as padding, or was an original -+-- live register. -+-- -+-- That is, True => padding, False => a real, live global register. -+-- -+-- Also, the returned list is not sorted in any particular order. -+-- -+padLiveArgs :: DynFlags -> LiveGlobalRegs -> [(Bool, GlobalReg)] -+padLiveArgs dflags live = -+ if platformUnregisterised plat -+ then taggedLive -- not using GHC's register convention for platform. -+ else padding ++ taggedLive -+ where -+ taggedLive = map (\x -> (False, x)) live -+ plat = targetPlatform dflags -+ -+ fprLive = filter isFPR live -+ padding = concatMap calcPad $ groupBy sharesClass fprLive -+ -+ sharesClass :: GlobalReg -> GlobalReg -> Bool -+ sharesClass a b = sameFPRClass a b || overlappingClass -+ where -+ overlappingClass = regsOverlap dflags (norm a) (norm b) -+ norm = CmmGlobal . normalizeFPRNum -+ -+ calcPad :: [GlobalReg] -> [(Bool, GlobalReg)] -+ calcPad rs = getFPRPadding (getFPRCtor $ head rs) rs -+ -+getFPRPadding :: (Int -> GlobalReg) -> LiveGlobalRegs -> [(Bool, GlobalReg)] -+getFPRPadding paddingCtor live = padding - where -- sseRegNums = sort $ mapMaybe sseRegNum live -- (_, padding) = foldl assignSlots (1, []) $ sseRegNums -- allRegs = padding ++ map (\r -> (False, r)) live -+ fprRegNums = sort $ map fprRegNum live -+ (_, padding) = foldl assignSlots (1, []) $ fprRegNums - - assignSlots (i, acc) regNum - | i == regNum = -- don't need padding here -@@ -195,11 +250,7 @@ padLiveArgs live = allRegs - - 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. -+ (True, paddingCtor i)) - - - -- | Llvm standard fun attributes -diff --git a/compiler/llvmGen/LlvmCodeGen/CodeGen.hs b/compiler/llvmGen/LlvmCodeGen/CodeGen.hs -index 1873400..21abc65 100644 ---- compiler/llvmGen/LlvmCodeGen/CodeGen.hs -+++ compiler/llvmGen/LlvmCodeGen/CodeGen.hs -@@ -1814,14 +1814,14 @@ funPrologue live cmmBlocks = do - -- STG Liveness optimisation done here. - funEpilogue :: LiveGlobalRegs -> LlvmM ([LlvmVar], LlvmStatements) - funEpilogue live = do -+ dflags <- getDynFlags - - -- the bool indicates whether the register is padding. - let alwaysNeeded = map (\r -> (False, r)) alwaysLive -- livePadded = alwaysNeeded ++ padLiveArgs live -+ livePadded = alwaysNeeded ++ padLiveArgs dflags live - - -- Set to value or "undef" depending on whether the register is - -- actually live -- dflags <- getDynFlags - let loadExpr r = do - (v, _, s) <- getCmmRegVal (CmmGlobal r) - return (Just $ v, s) -@@ -1833,7 +1833,7 @@ funEpilogue live = do - 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 -+ | not (isFPR r) || (True, r) `elem` livePadded - -> loadUndef r - | otherwise -> return (Nothing, nilOL) - --- -1.9.1 - Property changes on: head/lang/ghc/files844/patch-fix-build-on-arm ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/lang/ghc/files844/patch-ghc.mk =================================================================== --- head/lang/ghc/files844/patch-ghc.mk (revision 545122) +++ head/lang/ghc/files844/patch-ghc.mk (nonexistent) @@ -1,11 +0,0 @@ ---- ghc.mk.orig 2017-01-03 15:59:18 UTC -+++ ghc.mk -@@ -96,6 +96,7 @@ endif - # Catch make if it runs away into an infinite loop - ifeq "$(MAKE_RESTARTS)" "" - else ifeq "$(MAKE_RESTARTS)" "1" -+else ifeq "$(MAKE_RESTARTS)" "2" - else - $(error Make has restarted itself $(MAKE_RESTARTS) times; is there a makefile bug? See http://ghc.haskell.org/trac/ghc/wiki/Building/Troubleshooting#Makehasrestarteditself3timesisthereamakefilebug for details) - endif - Property changes on: head/lang/ghc/files844/patch-ghc.mk ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/lang/ghc/files844/patch-llvm-targets =================================================================== --- head/lang/ghc/files844/patch-llvm-targets (revision 545122) +++ head/lang/ghc/files844/patch-llvm-targets (nonexistent) @@ -1,12 +0,0 @@ ---- llvm-targets.orig 2018-03-17 14:04:41 UTC -+++ llvm-targets -@@ -20,4 +20,9 @@ - ,("aarch64-apple-ios", ("e-m:o-i64:64-i128:128-n32:64-S128", "generic", "+neon")) - ,("i386-apple-ios", ("e-m:o-p:32:32-f64:32:64-f80:128-n8:16:32-S128", "yonah", "")) - ,("x86_64-apple-ios", ("e-m:o-i64:64-f80:128-n8:16:32:64-S128", "core2", "")) -+,("armv6-unknown-freebsd-gnueabihf", ("e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64", "arm1176jzf-s", "+strict-align")) -+,("armv7-unknown-freebsd-gnueabihf", ("e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64", "generic", "+strict-align")) -+,("aarch64-unknown-freebsd", ("e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128", "generic", "+neon")) -+,("amd64-portbld-freebsd", ("e-m:e-i64:64-f80:128-n8:16:32:64-S128", "x86-64", "")) -+,("i386-portbld-freebsd", ("e-m:e-p:32:32-f64:32:64-f80:32-n8:16:32-S128", "i486", "")) - ] Property changes on: head/lang/ghc/files844/patch-llvm-targets ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/lang/ghc/files862/patch-configure.ac =================================================================== --- head/lang/ghc/files862/patch-configure.ac (revision 545122) +++ head/lang/ghc/files862/patch-configure.ac (nonexistent) @@ -1,12 +0,0 @@ ---- configure.ac.orig 2018-04-17 19:30:22 UTC -+++ configure.ac -@@ -447,6 +447,9 @@ XCODE_VERSION() - dnl ** Building a cross compiler? - dnl -------------------------------------------------------------- - CrossCompiling=NO -+ -+build=`echo $build | sed -e 's/amd64-/x86_64-/g; s/armv[[67]]-/arm-/g; s/-freebsd.*$/-freebsd/g'` -+ - # If 'host' and 'target' differ, then this means we are building a cross-compiler. - if test "$TargetPlatform" != "$HostPlatform" ; then - CrossCompiling=YES Property changes on: head/lang/ghc/files862/patch-configure.ac ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/lang/ghc/files862/extra-patch-aclocal.m4 =================================================================== --- head/lang/ghc/files862/extra-patch-aclocal.m4 (revision 545122) +++ head/lang/ghc/files862/extra-patch-aclocal.m4 (nonexistent) @@ -1,16 +0,0 @@ ---- aclocal.m4.orig 2018-03-25 21:22:32 UTC -+++ aclocal.m4 -@@ -2361,13 +2378,6 @@ AC_DEFUN([FIND_LD],[ - [enable_ld_override=yes]) - - find_ld() { -- # Make sure the user didn't specify LD manually. -- if test "z$LD" != "z"; then -- AC_CHECK_TARGET_TOOL([LD], [ld]) -- LD_NO_GOLD=$LD -- return -- fi -- - # Manually iterate over possible names since we want to ensure that, e.g., - # if ld.lld is installed but gcc doesn't support -fuse-ld=lld, that we - # then still try ld.gold and -fuse-ld=gold. Property changes on: head/lang/ghc/files862/extra-patch-aclocal.m4 ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/lang/ghc/files862/build.mk.in =================================================================== --- head/lang/ghc/files862/build.mk.in (revision 545122) +++ head/lang/ghc/files862/build.mk.in (nonexistent) @@ -1,20 +0,0 @@ -docdir = %%PREFIX%%/share/doc/ghc-%%GHC_VERSION%% -htmldir = %%PREFIX%%/share/doc/ghc-%%GHC_VERSION%% -mandir = %%PREFIX%%/man -infodir = %%PREFIX%%/info -DYNAMIC_GHC_PROGRAMS = %%WITH_DYNAMIC%% -BUILD_PROF_LIBS = %%WITH_PROFILE%% -HADDOCK_DOCS = YES -HSCOLOUR_SRCS = %%WITH_DOCS%% -INTEGER_LIBRARY = %%INTEGER_LIBRARY%% -# disable xelatex: PR 231438 -BUILD_SPHINX_PDF = NO -BSD_PATH_TO_HSC2HS = %%HSC2HS%% -SRC_HC_OPTS += -I%%NCURSESINC%% -L%%NCURSESLIB%% -I%%LOCALBASE%%/include -L%%LOCALBASE%%/lib -SRC_CC_OPTS += %%CFLAGS%% -EXTRA_HSC2HS_OPTS += -I%%LOCALBASE%%/include --lflag=-L%%LOCALBASE%%/lib -EXTRA_LD_OPTS += -L%%LOCALBASE%%/lib -EXTRA_CABAL_CONFIGURE_FLAGS += --extra-include-dirs=%%LOCALBASE%%/include -EXTRA_CABAL_CONFIGURE_FLAGS += --extra-lib-dirs=%%LOCALBASE%%/lib -libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes=%%NCURSESINC%% --configure-option=--with-curses-libraries=%%NCURSESLIB%% -V = 0 Property changes on: head/lang/ghc/files862/build.mk.in ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/lang/ghc/files862/patch-ppc64 =================================================================== --- head/lang/ghc/files862/patch-ppc64 (revision 545122) +++ head/lang/ghc/files862/patch-ppc64 (nonexistent) @@ -1,465 +0,0 @@ ---- libraries/containers/include/containers.h -+++ libraries/containers/include/containers.h -@@ -35,7 +35,6 @@ - - #ifdef __GLASGOW_HASKELL__ - # define USE_ST_MONAD 1 --# define USE_UNBOXED_ARRAYS 1 - #endif - - #endif - -From f4399ce96514ab58d766de999896780e93c886c6 Mon Sep 17 00:00:00 2001 -From: Peter Trommler -Date: Fri, 28 Dec 2018 23:52:31 +0100 -Subject: [PATCH] PPC NCG: Make calling convention more general - -All operating systems except AIX and Darwin follow the ELF -specification. ---- - compiler/nativeGen/PPC/CodeGen.hs | 11 +++++------ - 1 file changed, 5 insertions(+), 6 deletions(-) - -diff --git a/compiler/nativeGen/PPC/CodeGen.hs b/compiler/nativeGen/PPC/CodeGen.hs -index efd9591c71..56e3bc280b 100644 ---- compiler/nativeGen/PPC/CodeGen.hs -+++ compiler/nativeGen/PPC/CodeGen.hs -@@ -1565,18 +1565,17 @@ genCCall target dest_regs argsAndHints - = panic "genCall: Wrong number of arguments/results for fabs" - - -- TODO: replace 'Int' by an enum such as 'PPC_64ABI' --data GenCCallPlatform = GCPLinux | GCPDarwin | GCPLinux64ELF !Int | GCPAIX -+data GenCCallPlatform = GCP32ELF | GCP64ELF !Int | GCPAIX | GCPDarwin - - platformToGCP :: Platform -> GenCCallPlatform - platformToGCP platform = case platformOS platform of -- OSLinux -> case platformArch platform of -- ArchPPC -> GCPLinux -- ArchPPC_64 ELF_V1 -> GCPLinux64ELF 1 -- ArchPPC_64 ELF_V2 -> GCPLinux64ELF 2 -- _ -> panic "PPC.CodeGen.platformToGCP: Unknown Linux" - OSAIX -> GCPAIX - OSDarwin -> GCPDarwin -- _ -> panic "PPC.CodeGen.platformToGCP: not defined for this OS" -+ _ -> case platformArch platform of -+ ArchPPC -> GCP32ELF -+ ArchPPC_64 ELF_V1 -> GCP64ELF 1 -+ ArchPPC_64 ELF_V2 -> GCP64ELF 2 -+ _ -> panic "platformToGCP: Not PowerPC" - - - genCCall' - - - --- -2.19.2 - -From fa2128cb78a8b365d822c23b8da19fa14ac23ce3 Mon Sep 17 00:00:00 2001 -From: Peter Trommler -Date: Fri, 28 Dec 2018 23:55:35 +0100 -Subject: [PATCH] PPC NCG: Make `stackHeaderSize` more general - ---- - compiler/nativeGen/PPC/Instr.hs | 13 ++++++------- - 1 file changed, 6 insertions(+), 7 deletions(-) - -diff --git a/compiler/nativeGen/PPC/Instr.hs b/compiler/nativeGen/PPC/Instr.hs -index 8eb5e8fa8d..ce421ed4bf 100644 ---- compiler/nativeGen/PPC/Instr.hs -+++ compiler/nativeGen/PPC/Instr.hs -@@ -573,15 +573,14 @@ ppc_mkLoadInstr dflags reg delta slot - stackFrameHeaderSize :: DynFlags -> Int - stackFrameHeaderSize dflags - = case platformOS platform of -- OSLinux -> case platformArch platform of -- -- header + parameter save area -- ArchPPC -> 64 -- TODO: check ABI spec -- ArchPPC_64 ELF_V1 -> 48 + 8 * 8 -- ArchPPC_64 ELF_V2 -> 32 + 8 * 8 -- _ -> panic "PPC.stackFrameHeaderSize: Unknown Linux" - OSAIX -> 24 + 8 * 4 - OSDarwin -> 64 -- TODO: check ABI spec -- _ -> panic "PPC.stackFrameHeaderSize: not defined for this OS" -+ _ -> case platformArch platform of -+ -- header + parameter save area -+ ArchPPC -> 64 -- TODO: check ABI spec -+ ArchPPC_64 ELF_V1 -> 48 + 8 * 8 -+ ArchPPC_64 ELF_V2 -> 32 + 8 * 8 -+ _ -> panic "PPC.stackFrameHeaderSize: not defined for this OS" - where platform = targetPlatform dflags - - -- | The maximum number of bytes required to spill a register. PPC32 - - - --- -2.19.2 - -From 3472824eee7c616aaf755c147ef2c3e4d79fbec4 Mon Sep 17 00:00:00 2001 -From: Peter Trommler -Date: Sat, 29 Dec 2018 10:12:48 +0100 -Subject: [PATCH] PPC NCG: GOT declaration for all 64-bit ELF systems - ---- - compiler/nativeGen/PIC.hs | 8 +++----- - 1 file changed, 3 insertions(+), 5 deletions(-) - -diff --git a/compiler/nativeGen/PIC.hs b/compiler/nativeGen/PIC.hs -index 2f300c4614..7be7a860f7 100644 ---- compiler/nativeGen/PIC.hs -+++ compiler/nativeGen/PIC.hs -@@ -527,19 +527,17 @@ pprGotDeclaration _ _ OSAIX - ] - - ---- PPC 64 ELF v1 needs a Table Of Contents (TOC) on Linux --pprGotDeclaration _ (ArchPPC_64 ELF_V1) OSLinux -+-- PPC 64 ELF v1 needs a Table Of Contents (TOC) -+pprGotDeclaration _ (ArchPPC_64 ELF_V1) _ - = text ".section \".toc\",\"aw\"" - -- In ELF v2 we also need to tell the assembler that we want ABI - -- version 2. This would normally be done at the top of the file - -- right after a file directive, but I could not figure out how - -- to do that. --pprGotDeclaration _ (ArchPPC_64 ELF_V2) OSLinux -+pprGotDeclaration _ (ArchPPC_64 ELF_V2) _ - = vcat [ text ".abiversion 2", - text ".section \".toc\",\"aw\"" - ] --pprGotDeclaration _ (ArchPPC_64 _) _ -- = panic "pprGotDeclaration: ArchPPC_64 only Linux supported" - - -- Emit GOT declaration - -- Output whatever needs to be output once per .s file. - - - --- -2.19.2 - -From 749e343ef07aeeb71fe38c432f1b88ad8a6d2a58 Mon Sep 17 00:00:00 2001 -From: Peter Trommler -Date: Sat, 29 Dec 2018 10:14:12 +0100 -Subject: [PATCH] PPC NCG: Register definitions for all 64-bit systems - ---- - compiler/nativeGen/PPC/Regs.hs | 11 +++-------- - 1 file changed, 3 insertions(+), 8 deletions(-) - -diff --git a/compiler/nativeGen/PPC/Regs.hs b/compiler/nativeGen/PPC/Regs.hs -index 227517be88..7a6d6ed8e5 100644 ---- compiler/nativeGen/PPC/Regs.hs -+++ compiler/nativeGen/PPC/Regs.hs -@@ -229,12 +229,8 @@ allArgRegs = map regSingle [3..10] - - -- these are the regs which we cannot assume stay alive over a C call. - callClobberedRegs :: Platform -> [Reg] --callClobberedRegs platform -- = case platformOS platform of -- OSAIX -> map regSingle (0:[2..12] ++ map fReg [0..13]) -- OSDarwin -> map regSingle (0:[2..12] ++ map fReg [0..13]) -- OSLinux -> map regSingle (0:[2..13] ++ map fReg [0..13]) -- _ -> panic "PPC.Regs.callClobberedRegs: not defined for this architecture" -+callClobberedRegs _platform -+ = map regSingle (0:[2..12] ++ map fReg [0..13]) - - - allMachRegNos :: [RegNo] -@@ -265,11 +261,10 @@ allFPArgRegs platform - = case platformOS platform of - OSAIX -> map (regSingle . fReg) [1..13] - OSDarwin -> map (regSingle . fReg) [1..13] -- OSLinux -> case platformArch platform of -+ _ -> case platformArch platform of - ArchPPC -> map (regSingle . fReg) [1..8] - ArchPPC_64 _ -> map (regSingle . fReg) [1..13] - _ -> panic "PPC.Regs.allFPArgRegs: unknown PPC Linux" -- _ -> panic "PPC.Regs.allFPArgRegs: not defined for this architecture" - - fits16Bits :: Integral a => a -> Bool - fits16Bits x = x >= -32768 && x < 32768 - - - --- -2.19.2 - -From 19731a77ed203870f76a53eaf01758efbb5144d3 Mon Sep 17 00:00:00 2001 -From: Peter Trommler -Date: Sun, 13 Jan 2019 15:16:28 +0100 -Subject: [PATCH] PPC NCG: Emit type declaration on all ELF systems - ---- - compiler/nativeGen/PPC/Ppr.hs | 5 ++--- - 1 file changed, 2 insertions(+), 3 deletions(-) - -diff --git a/compiler/nativeGen/PPC/Ppr.hs b/compiler/nativeGen/PPC/Ppr.hs -index 2f64d82ee5..82726d90d9 100644 ---- compiler/nativeGen/PPC/Ppr.hs -+++ compiler/nativeGen/PPC/Ppr.hs -@@ -142,9 +142,8 @@ pprGloblDecl lbl - pprTypeAndSizeDecl :: CLabel -> SDoc - pprTypeAndSizeDecl lbl - = sdocWithPlatform $ \platform -> -- if platformOS platform == OSLinux && externallyVisibleCLabel lbl -- then text ".type " <> -- ppr lbl <> text ", @object" -+ if osElfTarget (platformOS platform) && externallyVisibleCLabel lbl -+ then text "\t.type " <> ppr lbl <> text ", @object" - else empty - - pprLabel :: CLabel -> SDoc --- -2.19.2 - ---- compiler/nativeGen/PPC/CodeGen.hs.orig 2018-09-16 22:53:54.000000000 +0200 -+++ compiler/nativeGen/PPC/CodeGen.hs 2019-01-17 10:03:25.018164000 +0100 -@@ -1047,7 +1047,7 @@ genJump tree - - genJump' :: CmmExpr -> GenCCallPlatform -> NatM InstrBlock - --genJump' tree (GCPLinux64ELF 1) -+genJump' tree (GCP64ELF 1) - = do - (target,code) <- getSomeReg tree - return (code -@@ -1057,7 +1057,7 @@ genJump' tree (GCPLinux64ELF 1) - `snocOL` LD II64 r11 (AddrRegImm target (ImmInt 16)) - `snocOL` BCTR [] Nothing) - --genJump' tree (GCPLinux64ELF 2) -+genJump' tree (GCP64ELF 2) - = do - (target,code) <- getSomeReg tree - return (code -@@ -1667,7 +1667,7 @@ genCCall' dflags gcp target dest_regs args - Right dyn -> do -- implement call through function pointer - (dynReg, dynCode) <- getSomeReg dyn - case gcp of -- GCPLinux64ELF 1 -> return ( dynCode -+ GCP64ELF 1 -> return ( dynCode - `appOL` codeBefore - `snocOL` ST spFormat toc (AddrRegImm sp (ImmInt 40)) - `snocOL` LD II64 r11 (AddrRegImm dynReg (ImmInt 0)) -@@ -1677,7 +1677,7 @@ genCCall' dflags gcp target dest_regs args - `snocOL` BCTRL usedRegs - `snocOL` LD spFormat toc (AddrRegImm sp (ImmInt 40)) - `appOL` codeAfter) -- GCPLinux64ELF 2 -> return ( dynCode -+ GCP64ELF 2 -> return ( dynCode - `appOL` codeBefore - `snocOL` ST spFormat toc (AddrRegImm sp (ImmInt 24)) - `snocOL` MR r12 dynReg -@@ -1715,9 +1715,9 @@ genCCall' dflags gcp target dest_regs args - initialStackOffset = case gcp of - GCPAIX -> 24 - GCPDarwin -> 24 -- GCPLinux -> 8 -- GCPLinux64ELF 1 -> 48 -- GCPLinux64ELF 2 -> 32 -+ GCP32ELF -> 8 -+ GCP64ELF 1 -> 48 -+ GCP64ELF 2 -> 32 - _ -> panic "genCall': unknown calling convention" - -- size of linkage area + size of arguments, in bytes - stackDelta finalStack = case gcp of -@@ -1727,12 +1727,12 @@ genCCall' dflags gcp target dest_regs args - GCPDarwin -> - roundTo 16 $ (24 +) $ max 32 $ sum $ - map (widthInBytes . typeWidth) argReps -- GCPLinux -> roundTo 16 finalStack -- GCPLinux64ELF 1 -> -+ GCP32ELF -> roundTo 16 finalStack -+ GCP64ELF 1 -> - roundTo 16 $ (48 +) $ max 64 $ sum $ - map (roundTo 8 . widthInBytes . typeWidth) - argReps -- GCPLinux64ELF 2 -> -+ GCP64ELF 2 -> - roundTo 16 $ (32 +) $ max 64 $ sum $ - map (roundTo 8 . widthInBytes . typeWidth) - argReps -@@ -1765,13 +1765,14 @@ genCCall' dflags gcp target dest_regs args - -- link editor replaces the NOP instruction with a load of the TOC - -- from the stack to restore the TOC. - maybeNOP = case gcp of -+ GCP32ELF -> nilOL - -- See Section 3.9.4 of OpenPower ABI - GCPAIX -> unitOL NOP - -- See Section 3.5.11 of PPC64 ELF v1.9 -- GCPLinux64ELF 1 -> unitOL NOP -+ GCP64ELF 1 -> unitOL NOP - -- See Section 2.3.6 of PPC64 ELF v2 -- GCPLinux64ELF 2 -> unitOL NOP -- _ -> nilOL -+ GCP64ELF 2 -> unitOL NOP -+ _ -> panic "maybeNOP: Unknown PowerPC 64-bit ABI" - - passArguments [] _ _ stackOffset accumCode accumUsed = return (stackOffset, accumCode, accumUsed) - passArguments ((arg,arg_ty):args) gprs fprs stackOffset -@@ -1806,7 +1807,7 @@ genCCall' dflags gcp target dest_regs args - `snocOL` storeWord vr_hi gprs stackOffset - `snocOL` storeWord vr_lo (drop 1 gprs) (stackOffset+4)) - ((take 2 gprs) ++ accumUsed) -- GCPLinux -> -+ GCP32ELF -> - do let stackOffset' = roundTo 8 stackOffset - stackCode = accumCode `appOL` code - `snocOL` ST II32 vr_hi (AddrRegImm sp (ImmInt stackOffset')) -@@ -1826,7 +1827,7 @@ genCCall' dflags gcp target dest_regs args - _ -> -- only one or no regs left - passArguments args [] fprs (stackOffset'+8) - stackCode accumUsed -- GCPLinux64ELF _ -> panic "passArguments: 32 bit code" -+ GCP64ELF _ -> panic "passArguments: 32 bit code" - - passArguments ((arg,rep):args) gprs fprs stackOffset accumCode accumUsed - | reg : _ <- regs = do -@@ -1841,9 +1842,9 @@ genCCall' dflags gcp target dest_regs args - -- ... so does the PowerOpen ABI. - GCPAIX -> stackOffset + stackBytes - -- ... the SysV ABI 32-bit doesn't. -- GCPLinux -> stackOffset -+ GCP32ELF -> stackOffset - -- ... but SysV ABI 64-bit does. -- GCPLinux64ELF _ -> stackOffset + stackBytes -+ GCP64ELF _ -> stackOffset + stackBytes - passArguments args - (drop nGprs gprs) - (drop nFprs fprs) -@@ -1868,14 +1869,14 @@ genCCall' dflags gcp target dest_regs args - -- The 32bit PowerOPEN ABI is happy with - -- 32bit-alignment as well... - stackOffset -- GCPLinux -+ GCP32ELF - -- ... the SysV ABI requires 8-byte - -- alignment for doubles. - | isFloatType rep && typeWidth rep == W64 -> - roundTo 8 stackOffset - | otherwise -> - stackOffset -- GCPLinux64ELF _ -> -+ GCP64ELF _ -> - -- Everything on the stack is mapped to - -- 8-byte aligned doublewords - stackOffset -@@ -1886,7 +1887,7 @@ genCCall' dflags gcp target dest_regs args - -- "Single precision floating point values - -- are mapped to the second word in a single - -- doubleword" -- GCPLinux64ELF 1 -> stackOffset' + 4 -+ GCP64ELF 1 -> stackOffset' + 4 - _ -> stackOffset' - | otherwise = stackOffset' - -@@ -1925,7 +1926,7 @@ genCCall' dflags gcp target dest_regs args - FF64 -> (2, 1, 8, fprs) - II64 -> panic "genCCall' passArguments II64" - FF80 -> panic "genCCall' passArguments FF80" -- GCPLinux -> -+ GCP32ELF -> - case cmmTypeFormat rep of - II8 -> (1, 0, 4, gprs) - II16 -> (1, 0, 4, gprs) -@@ -1935,7 +1936,7 @@ genCCall' dflags gcp target dest_regs args - FF64 -> (0, 1, 8, fprs) - II64 -> panic "genCCall' passArguments II64" - FF80 -> panic "genCCall' passArguments FF80" -- GCPLinux64ELF _ -> -+ GCP64ELF _ -> - case cmmTypeFormat rep of - II8 -> (1, 0, 8, gprs) - II16 -> (1, 0, 8, gprs) ---- CodeGen.hs.orig 2018-09-16 22:53:54.000000000 +0200 ---- libraries/ghci/GHCi/InfoTable.hsc.orig 2019-07-06 09:00:10.880579000 +0200 -+++ libraries/ghci/GHCi/InfoTable.hsc 2019-07-06 08:59:23.613439000 +0200 -@@ -77,7 +77,7 @@ data Arch = ArchSPARC - | ArchARM - | ArchARM64 - | ArchPPC64 -- | ArchPPC64LE -+ | ArchPPC64_ELFv2 - | ArchUnknown - deriving Show - -@@ -99,8 +99,8 @@ platform = - ArchARM64 - #elif defined(powerpc64_HOST_ARCH) - ArchPPC64 --#elif defined(powerpc64le_HOST_ARCH) -- ArchPPC64LE -+#elif defined(_CALL_ELF) && (_CALL_ELF == 2) -+ ArchPPC64_ELFv2 - #else - # if defined(TABLES_NEXT_TO_CODE) - # error Unimplemented architecture -@@ -252,7 +252,7 @@ mkJumpToAddr a = case platform of - 0xE96C0010, - 0x4E800420] - -- ArchPPC64LE -> -+ ArchPPC64_ELFv2 -> - -- The ABI requires r12 to point to the function's entry point. - -- We use the medium code model where code resides in the first - -- two gigabytes, so loading a non-negative32 bit address ---- rts/StgCRun.c.orig 2019-04-07 21:39:58.000000000 +0200 -+++ rts/StgCRun.c 2019-07-06 08:57:54.735161000 +0200 -@@ -747,9 +747,8 @@ StgRunIsImplementedInAssembler(void) - Everything is in assembler, so we don't have to deal with GCC... - -------------------------------------------------------------------------- */ - --#if defined(powerpc64_HOST_ARCH) -+#if defined(ELF_V1) - --#if defined(linux_HOST_OS) - static void GNUC3_ATTRIBUTE(used) - StgRunIsImplementedInAssembler(void) - { -@@ -871,13 +870,9 @@ StgRunIsImplementedInAssembler(void) - : : "i"(RESERVED_C_STACK_BYTES+304 /*stack frame size*/)); - } - --#else // linux_HOST_OS --#error Only Linux support for power64 right now. - #endif - --#endif -- --#if defined(powerpc64le_HOST_ARCH) -+#if defined(ELF_V2) - /* ----------------------------------------------------------------------------- - PowerPC 64 little endian architecture - ---- rts/StgCRunAsm.S.orig 2018-06-12 22:33:31.000000000 +0200 -+++ rts/StgCRunAsm.S 2019-07-06 13:29:26.837367000 +0200 -@@ -1,8 +1,7 @@ - #include "ghcconfig.h" - #include "rts/Constants.h" - --#if defined(powerpc64le_HOST_ARCH) --# ifdef linux_HOST_OS -+#if defined(_CALL_ELF) && (_CALL_ELF == 2) - # define STACK_FRAME_SIZE RESERVED_C_STACK_BYTES+304 - .file "StgCRun.c" - .abiversion 2 -@@ -13,6 +12,8 @@ - .hidden StgRun - .type StgRun,@function - StgRun: -+ addis %r2, %r12, .TOC.-StgRun@ha -+ addi %r2, %r2, .TOC.-StgRun@l - .localentry StgRun,.-StgRun - mflr 0 - mr 5, 1 -@@ -108,9 +109,6 @@ StgReturn: - blr - - .section .note.GNU-stack,"",@progbits --# else // linux_HOST_OS --# error Only Linux support for power64 little endian right now. --# endif - - #elif defined(powerpc_HOST_ARCH) - # if defined(aix_HOST_OS) Property changes on: head/lang/ghc/files862/patch-ppc64 ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/lang/ghc/files862/wrap.c =================================================================== --- head/lang/ghc/files862/wrap.c (revision 545122) +++ head/lang/ghc/files862/wrap.c (nonexistent) @@ -1,55 +0,0 @@ -/* -*- ugly-hack-mode -*- */ -/* $FreeBSD$ */ - -#include - -struct old_dirent; -struct old_stat; - -__asm(".symver old_readdir_r, readdir_r@FBSD_1.0"); -int old_readdir_r(void *dirp, struct old_dirent *entry, - struct old_dirent **result); -__asm(".symver old_stat, stat@FBSD_1.0"); -int old_stat(const char * restrict path, struct old_stat * restrict sb); -__asm(".symver old_lstat, lstat@FBSD_1.0"); -int old_lstat(const char * restrict path, struct old_stat * restrict sb); -__asm(".symver old_fstat, fstat@FBSD_1.0"); -int old_fstat(int fd, struct old_stat *sb); -__asm(".symver old_mknod, mknod@FBSD_1.0"); -int old_mknod(const char *path, mode_t mode, uint32_t dev); - -int -__wrap_readdir_r(void *dirp, struct old_dirent *entry, - struct old_dirent **result) -{ - - return (old_readdir_r(dirp, entry, result)); -} - -int -__wrap_stat(const char * restrict path, struct old_stat * restrict sb) -{ - - return (old_stat(path, sb)); -} - -int -__wrap_lstat(const char * restrict path, struct old_stat * restrict sb) -{ - - return (old_lstat(path, sb)); -} - -int -__wrap_fstat(int fd, struct old_stat *sb) -{ - - return (old_fstat(fd, sb)); -} - -int -__wrap_mknod(const char *path, mode_t mode, uint32_t dev) -{ - - return (old_mknod(path, mode, dev)); -} Property changes on: head/lang/ghc/files862/wrap.c ___________________________________________________________________ Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/lang/ghc/files862/patch-libraries__Cabal__Cabal__Distribution__Simple__Program__Builtin.hs =================================================================== --- head/lang/ghc/files862/patch-libraries__Cabal__Cabal__Distribution__Simple__Program__Builtin.hs (revision 545122) +++ head/lang/ghc/files862/patch-libraries__Cabal__Cabal__Distribution__Simple__Program__Builtin.hs (nonexistent) @@ -1,39 +0,0 @@ ---- libraries/Cabal/Cabal/Distribution/Simple/Program/Builtin.hs.orig 2017-11-28 16:40:34 UTC -+++ libraries/Cabal/Cabal/Distribution/Simple/Program/Builtin.hs -@@ -59,6 +59,8 @@ import Distribution.Compat.Exception - import Distribution.Verbosity - import Distribution.Version - -+import System.FilePath (takeDirectory) -+ - import qualified Data.Map as Map - - -- ------------------------------------------------------------ -@@ -265,11 +267,13 @@ alexProgram = (simpleProgram "alex") { - - gccProgram :: Program - gccProgram = (simpleProgram "gcc") { -- programFindVersion = findProgramVersion "-dumpversion" id -- } -+ programFindLocation = \v p -> findProgramOnSearchPath v p "%%CC%%" -+} - - arProgram :: Program --arProgram = simpleProgram "ar" -+arProgram = (simpleProgram "ar") { -+ programFindLocation = \v p -> findProgramOnSearchPath v p "%%AR%%" -+} - - stripProgram :: Program - stripProgram = (simpleProgram "strip") { -@@ -337,7 +341,9 @@ greencardProgram :: Program - greencardProgram = simpleProgram "greencard" - - ldProgram :: Program --ldProgram = simpleProgram "ld" -+ldProgram = (simpleProgram "ld") { -+ programFindLocation = \v p -> findProgramOnSearchPath v p "%%LD%%" -+ } - - tarProgram :: Program - tarProgram = (simpleProgram "tar") { Property changes on: head/lang/ghc/files862/patch-libraries__Cabal__Cabal__Distribution__Simple__Program__Builtin.hs ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/lang/ghc/files862/patch-ghc.mk =================================================================== --- head/lang/ghc/files862/patch-ghc.mk (revision 545122) +++ head/lang/ghc/files862/patch-ghc.mk (nonexistent) @@ -1,11 +0,0 @@ ---- ghc.mk.orig 2018-09-16 20:53:54 UTC -+++ ghc.mk -@@ -96,6 +96,7 @@ endif - # Catch make if it runs away into an infinite loop - ifeq "$(MAKE_RESTARTS)" "" - else ifeq "$(MAKE_RESTARTS)" "1" -+else ifeq "$(MAKE_RESTARTS)" "2" - else - $(error Make has restarted itself $(MAKE_RESTARTS) times; is there a makefile bug? See http://ghc.haskell.org/trac/ghc/wiki/Building/Troubleshooting#Makehasrestarteditself3timesisthereamakefilebug for details) - endif - Property changes on: head/lang/ghc/files862/patch-ghc.mk ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/lang/ghc/files863/patch-configure.ac =================================================================== --- head/lang/ghc/files863/patch-configure.ac (revision 545122) +++ head/lang/ghc/files863/patch-configure.ac (nonexistent) @@ -1,12 +0,0 @@ ---- configure.ac.orig 2018-04-17 19:30:22 UTC -+++ configure.ac -@@ -447,6 +447,9 @@ XCODE_VERSION() - dnl ** Building a cross compiler? - dnl -------------------------------------------------------------- - CrossCompiling=NO -+ -+build=`echo $build | sed -e 's/amd64-/x86_64-/g; s/armv[[67]]-/arm-/g; s/-freebsd.*$/-freebsd/g'` -+ - # If 'host' and 'target' differ, then this means we are building a cross-compiler. - if test "$TargetPlatform" != "$HostPlatform" ; then - CrossCompiling=YES Property changes on: head/lang/ghc/files863/patch-configure.ac ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/lang/ghc/files863/extra-patch-aclocal.m4 =================================================================== --- head/lang/ghc/files863/extra-patch-aclocal.m4 (revision 545122) +++ head/lang/ghc/files863/extra-patch-aclocal.m4 (nonexistent) @@ -1,16 +0,0 @@ ---- aclocal.m4.orig 2018-03-25 21:22:32 UTC -+++ aclocal.m4 -@@ -2361,13 +2378,6 @@ AC_DEFUN([FIND_LD],[ - [enable_ld_override=yes]) - - find_ld() { -- # Make sure the user didn't specify LD manually. -- if test "z$LD" != "z"; then -- AC_CHECK_TARGET_TOOL([LD], [ld]) -- LD_NO_GOLD=$LD -- return -- fi -- - # Manually iterate over possible names since we want to ensure that, e.g., - # if ld.lld is installed but gcc doesn't support -fuse-ld=lld, that we - # then still try ld.gold and -fuse-ld=gold. Property changes on: head/lang/ghc/files863/extra-patch-aclocal.m4 ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/lang/ghc/files863/build.mk.in =================================================================== --- head/lang/ghc/files863/build.mk.in (revision 545122) +++ head/lang/ghc/files863/build.mk.in (nonexistent) @@ -1,20 +0,0 @@ -docdir = %%PREFIX%%/share/doc/ghc-%%GHC_VERSION%% -htmldir = %%PREFIX%%/share/doc/ghc-%%GHC_VERSION%% -mandir = %%PREFIX%%/man -infodir = %%PREFIX%%/info -DYNAMIC_GHC_PROGRAMS = %%WITH_DYNAMIC%% -BUILD_PROF_LIBS = %%WITH_PROFILE%% -HADDOCK_DOCS = YES -HSCOLOUR_SRCS = %%WITH_DOCS%% -INTEGER_LIBRARY = %%INTEGER_LIBRARY%% -# disable xelatex: PR 231438 -BUILD_SPHINX_PDF = NO -BSD_PATH_TO_HSC2HS = %%HSC2HS%% -SRC_HC_OPTS += -I%%NCURSESINC%% -L%%NCURSESLIB%% -I%%LOCALBASE%%/include -L%%LOCALBASE%%/lib -SRC_CC_OPTS += %%CFLAGS%% -EXTRA_HSC2HS_OPTS += -I%%LOCALBASE%%/include --lflag=-L%%LOCALBASE%%/lib -EXTRA_LD_OPTS += -L%%LOCALBASE%%/lib -EXTRA_CABAL_CONFIGURE_FLAGS += --extra-include-dirs=%%LOCALBASE%%/include -EXTRA_CABAL_CONFIGURE_FLAGS += --extra-lib-dirs=%%LOCALBASE%%/lib -libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes=%%NCURSESINC%% --configure-option=--with-curses-libraries=%%NCURSESLIB%% -V = 0 Property changes on: head/lang/ghc/files863/build.mk.in ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/lang/ghc/files863/patch-ppc64 =================================================================== --- head/lang/ghc/files863/patch-ppc64 (revision 545122) +++ head/lang/ghc/files863/patch-ppc64 (nonexistent) @@ -1,465 +0,0 @@ ---- libraries/containers/include/containers.h -+++ libraries/containers/include/containers.h -@@ -35,7 +35,6 @@ - - #ifdef __GLASGOW_HASKELL__ - # define USE_ST_MONAD 1 --# define USE_UNBOXED_ARRAYS 1 - #endif - - #endif - -From f4399ce96514ab58d766de999896780e93c886c6 Mon Sep 17 00:00:00 2001 -From: Peter Trommler -Date: Fri, 28 Dec 2018 23:52:31 +0100 -Subject: [PATCH] PPC NCG: Make calling convention more general - -All operating systems except AIX and Darwin follow the ELF -specification. ---- - compiler/nativeGen/PPC/CodeGen.hs | 11 +++++------ - 1 file changed, 5 insertions(+), 6 deletions(-) - -diff --git a/compiler/nativeGen/PPC/CodeGen.hs b/compiler/nativeGen/PPC/CodeGen.hs -index efd9591c71..56e3bc280b 100644 ---- compiler/nativeGen/PPC/CodeGen.hs -+++ compiler/nativeGen/PPC/CodeGen.hs -@@ -1565,18 +1565,17 @@ genCCall target dest_regs argsAndHints - = panic "genCall: Wrong number of arguments/results for fabs" - - -- TODO: replace 'Int' by an enum such as 'PPC_64ABI' --data GenCCallPlatform = GCPLinux | GCPDarwin | GCPLinux64ELF !Int | GCPAIX -+data GenCCallPlatform = GCP32ELF | GCP64ELF !Int | GCPAIX | GCPDarwin - - platformToGCP :: Platform -> GenCCallPlatform - platformToGCP platform = case platformOS platform of -- OSLinux -> case platformArch platform of -- ArchPPC -> GCPLinux -- ArchPPC_64 ELF_V1 -> GCPLinux64ELF 1 -- ArchPPC_64 ELF_V2 -> GCPLinux64ELF 2 -- _ -> panic "PPC.CodeGen.platformToGCP: Unknown Linux" - OSAIX -> GCPAIX - OSDarwin -> GCPDarwin -- _ -> panic "PPC.CodeGen.platformToGCP: not defined for this OS" -+ _ -> case platformArch platform of -+ ArchPPC -> GCP32ELF -+ ArchPPC_64 ELF_V1 -> GCP64ELF 1 -+ ArchPPC_64 ELF_V2 -> GCP64ELF 2 -+ _ -> panic "platformToGCP: Not PowerPC" - - - genCCall' - - - --- -2.19.2 - -From fa2128cb78a8b365d822c23b8da19fa14ac23ce3 Mon Sep 17 00:00:00 2001 -From: Peter Trommler -Date: Fri, 28 Dec 2018 23:55:35 +0100 -Subject: [PATCH] PPC NCG: Make `stackHeaderSize` more general - ---- - compiler/nativeGen/PPC/Instr.hs | 13 ++++++------- - 1 file changed, 6 insertions(+), 7 deletions(-) - -diff --git a/compiler/nativeGen/PPC/Instr.hs b/compiler/nativeGen/PPC/Instr.hs -index 8eb5e8fa8d..ce421ed4bf 100644 ---- compiler/nativeGen/PPC/Instr.hs -+++ compiler/nativeGen/PPC/Instr.hs -@@ -573,15 +573,14 @@ ppc_mkLoadInstr dflags reg delta slot - stackFrameHeaderSize :: DynFlags -> Int - stackFrameHeaderSize dflags - = case platformOS platform of -- OSLinux -> case platformArch platform of -- -- header + parameter save area -- ArchPPC -> 64 -- TODO: check ABI spec -- ArchPPC_64 ELF_V1 -> 48 + 8 * 8 -- ArchPPC_64 ELF_V2 -> 32 + 8 * 8 -- _ -> panic "PPC.stackFrameHeaderSize: Unknown Linux" - OSAIX -> 24 + 8 * 4 - OSDarwin -> 64 -- TODO: check ABI spec -- _ -> panic "PPC.stackFrameHeaderSize: not defined for this OS" -+ _ -> case platformArch platform of -+ -- header + parameter save area -+ ArchPPC -> 64 -- TODO: check ABI spec -+ ArchPPC_64 ELF_V1 -> 48 + 8 * 8 -+ ArchPPC_64 ELF_V2 -> 32 + 8 * 8 -+ _ -> panic "PPC.stackFrameHeaderSize: not defined for this OS" - where platform = targetPlatform dflags - - -- | The maximum number of bytes required to spill a register. PPC32 - - - --- -2.19.2 - -From 3472824eee7c616aaf755c147ef2c3e4d79fbec4 Mon Sep 17 00:00:00 2001 -From: Peter Trommler -Date: Sat, 29 Dec 2018 10:12:48 +0100 -Subject: [PATCH] PPC NCG: GOT declaration for all 64-bit ELF systems - ---- - compiler/nativeGen/PIC.hs | 8 +++----- - 1 file changed, 3 insertions(+), 5 deletions(-) - -diff --git a/compiler/nativeGen/PIC.hs b/compiler/nativeGen/PIC.hs -index 2f300c4614..7be7a860f7 100644 ---- compiler/nativeGen/PIC.hs -+++ compiler/nativeGen/PIC.hs -@@ -527,19 +527,17 @@ pprGotDeclaration _ _ OSAIX - ] - - ---- PPC 64 ELF v1 needs a Table Of Contents (TOC) on Linux --pprGotDeclaration _ (ArchPPC_64 ELF_V1) OSLinux -+-- PPC 64 ELF v1 needs a Table Of Contents (TOC) -+pprGotDeclaration _ (ArchPPC_64 ELF_V1) _ - = text ".section \".toc\",\"aw\"" - -- In ELF v2 we also need to tell the assembler that we want ABI - -- version 2. This would normally be done at the top of the file - -- right after a file directive, but I could not figure out how - -- to do that. --pprGotDeclaration _ (ArchPPC_64 ELF_V2) OSLinux -+pprGotDeclaration _ (ArchPPC_64 ELF_V2) _ - = vcat [ text ".abiversion 2", - text ".section \".toc\",\"aw\"" - ] --pprGotDeclaration _ (ArchPPC_64 _) _ -- = panic "pprGotDeclaration: ArchPPC_64 only Linux supported" - - -- Emit GOT declaration - -- Output whatever needs to be output once per .s file. - - - --- -2.19.2 - -From 749e343ef07aeeb71fe38c432f1b88ad8a6d2a58 Mon Sep 17 00:00:00 2001 -From: Peter Trommler -Date: Sat, 29 Dec 2018 10:14:12 +0100 -Subject: [PATCH] PPC NCG: Register definitions for all 64-bit systems - ---- - compiler/nativeGen/PPC/Regs.hs | 11 +++-------- - 1 file changed, 3 insertions(+), 8 deletions(-) - -diff --git a/compiler/nativeGen/PPC/Regs.hs b/compiler/nativeGen/PPC/Regs.hs -index 227517be88..7a6d6ed8e5 100644 ---- compiler/nativeGen/PPC/Regs.hs -+++ compiler/nativeGen/PPC/Regs.hs -@@ -229,12 +229,8 @@ allArgRegs = map regSingle [3..10] - - -- these are the regs which we cannot assume stay alive over a C call. - callClobberedRegs :: Platform -> [Reg] --callClobberedRegs platform -- = case platformOS platform of -- OSAIX -> map regSingle (0:[2..12] ++ map fReg [0..13]) -- OSDarwin -> map regSingle (0:[2..12] ++ map fReg [0..13]) -- OSLinux -> map regSingle (0:[2..13] ++ map fReg [0..13]) -- _ -> panic "PPC.Regs.callClobberedRegs: not defined for this architecture" -+callClobberedRegs _platform -+ = map regSingle (0:[2..12] ++ map fReg [0..13]) - - - allMachRegNos :: [RegNo] -@@ -265,11 +261,10 @@ allFPArgRegs platform - = case platformOS platform of - OSAIX -> map (regSingle . fReg) [1..13] - OSDarwin -> map (regSingle . fReg) [1..13] -- OSLinux -> case platformArch platform of -+ _ -> case platformArch platform of - ArchPPC -> map (regSingle . fReg) [1..8] - ArchPPC_64 _ -> map (regSingle . fReg) [1..13] - _ -> panic "PPC.Regs.allFPArgRegs: unknown PPC Linux" -- _ -> panic "PPC.Regs.allFPArgRegs: not defined for this architecture" - - fits16Bits :: Integral a => a -> Bool - fits16Bits x = x >= -32768 && x < 32768 - - - --- -2.19.2 - -From 19731a77ed203870f76a53eaf01758efbb5144d3 Mon Sep 17 00:00:00 2001 -From: Peter Trommler -Date: Sun, 13 Jan 2019 15:16:28 +0100 -Subject: [PATCH] PPC NCG: Emit type declaration on all ELF systems - ---- - compiler/nativeGen/PPC/Ppr.hs | 5 ++--- - 1 file changed, 2 insertions(+), 3 deletions(-) - -diff --git a/compiler/nativeGen/PPC/Ppr.hs b/compiler/nativeGen/PPC/Ppr.hs -index 2f64d82ee5..82726d90d9 100644 ---- compiler/nativeGen/PPC/Ppr.hs -+++ compiler/nativeGen/PPC/Ppr.hs -@@ -142,9 +142,8 @@ pprGloblDecl lbl - pprTypeAndSizeDecl :: CLabel -> SDoc - pprTypeAndSizeDecl lbl - = sdocWithPlatform $ \platform -> -- if platformOS platform == OSLinux && externallyVisibleCLabel lbl -- then text ".type " <> -- ppr lbl <> text ", @object" -+ if osElfTarget (platformOS platform) && externallyVisibleCLabel lbl -+ then text "\t.type " <> ppr lbl <> text ", @object" - else empty - - pprLabel :: CLabel -> SDoc --- -2.19.2 - ---- compiler/nativeGen/PPC/CodeGen.hs.orig 2018-09-16 22:53:54.000000000 +0200 -+++ compiler/nativeGen/PPC/CodeGen.hs 2019-01-17 10:03:25.018164000 +0100 -@@ -1047,7 +1047,7 @@ genJump tree - - genJump' :: CmmExpr -> GenCCallPlatform -> NatM InstrBlock - --genJump' tree (GCPLinux64ELF 1) -+genJump' tree (GCP64ELF 1) - = do - (target,code) <- getSomeReg tree - return (code -@@ -1057,7 +1057,7 @@ genJump' tree (GCPLinux64ELF 1) - `snocOL` LD II64 r11 (AddrRegImm target (ImmInt 16)) - `snocOL` BCTR [] Nothing) - --genJump' tree (GCPLinux64ELF 2) -+genJump' tree (GCP64ELF 2) - = do - (target,code) <- getSomeReg tree - return (code -@@ -1667,7 +1667,7 @@ genCCall' dflags gcp target dest_regs args - Right dyn -> do -- implement call through function pointer - (dynReg, dynCode) <- getSomeReg dyn - case gcp of -- GCPLinux64ELF 1 -> return ( dynCode -+ GCP64ELF 1 -> return ( dynCode - `appOL` codeBefore - `snocOL` ST spFormat toc (AddrRegImm sp (ImmInt 40)) - `snocOL` LD II64 r11 (AddrRegImm dynReg (ImmInt 0)) -@@ -1677,7 +1677,7 @@ genCCall' dflags gcp target dest_regs args - `snocOL` BCTRL usedRegs - `snocOL` LD spFormat toc (AddrRegImm sp (ImmInt 40)) - `appOL` codeAfter) -- GCPLinux64ELF 2 -> return ( dynCode -+ GCP64ELF 2 -> return ( dynCode - `appOL` codeBefore - `snocOL` ST spFormat toc (AddrRegImm sp (ImmInt 24)) - `snocOL` MR r12 dynReg -@@ -1715,9 +1715,9 @@ genCCall' dflags gcp target dest_regs args - initialStackOffset = case gcp of - GCPAIX -> 24 - GCPDarwin -> 24 -- GCPLinux -> 8 -- GCPLinux64ELF 1 -> 48 -- GCPLinux64ELF 2 -> 32 -+ GCP32ELF -> 8 -+ GCP64ELF 1 -> 48 -+ GCP64ELF 2 -> 32 - _ -> panic "genCall': unknown calling convention" - -- size of linkage area + size of arguments, in bytes - stackDelta finalStack = case gcp of -@@ -1727,12 +1727,12 @@ genCCall' dflags gcp target dest_regs args - GCPDarwin -> - roundTo 16 $ (24 +) $ max 32 $ sum $ - map (widthInBytes . typeWidth) argReps -- GCPLinux -> roundTo 16 finalStack -- GCPLinux64ELF 1 -> -+ GCP32ELF -> roundTo 16 finalStack -+ GCP64ELF 1 -> - roundTo 16 $ (48 +) $ max 64 $ sum $ - map (roundTo 8 . widthInBytes . typeWidth) - argReps -- GCPLinux64ELF 2 -> -+ GCP64ELF 2 -> - roundTo 16 $ (32 +) $ max 64 $ sum $ - map (roundTo 8 . widthInBytes . typeWidth) - argReps -@@ -1765,13 +1765,14 @@ genCCall' dflags gcp target dest_regs args - -- link editor replaces the NOP instruction with a load of the TOC - -- from the stack to restore the TOC. - maybeNOP = case gcp of -+ GCP32ELF -> nilOL - -- See Section 3.9.4 of OpenPower ABI - GCPAIX -> unitOL NOP - -- See Section 3.5.11 of PPC64 ELF v1.9 -- GCPLinux64ELF 1 -> unitOL NOP -+ GCP64ELF 1 -> unitOL NOP - -- See Section 2.3.6 of PPC64 ELF v2 -- GCPLinux64ELF 2 -> unitOL NOP -- _ -> nilOL -+ GCP64ELF 2 -> unitOL NOP -+ _ -> panic "maybeNOP: Unknown PowerPC 64-bit ABI" - - passArguments [] _ _ stackOffset accumCode accumUsed = return (stackOffset, accumCode, accumUsed) - passArguments ((arg,arg_ty):args) gprs fprs stackOffset -@@ -1806,7 +1807,7 @@ genCCall' dflags gcp target dest_regs args - `snocOL` storeWord vr_hi gprs stackOffset - `snocOL` storeWord vr_lo (drop 1 gprs) (stackOffset+4)) - ((take 2 gprs) ++ accumUsed) -- GCPLinux -> -+ GCP32ELF -> - do let stackOffset' = roundTo 8 stackOffset - stackCode = accumCode `appOL` code - `snocOL` ST II32 vr_hi (AddrRegImm sp (ImmInt stackOffset')) -@@ -1826,7 +1827,7 @@ genCCall' dflags gcp target dest_regs args - _ -> -- only one or no regs left - passArguments args [] fprs (stackOffset'+8) - stackCode accumUsed -- GCPLinux64ELF _ -> panic "passArguments: 32 bit code" -+ GCP64ELF _ -> panic "passArguments: 32 bit code" - - passArguments ((arg,rep):args) gprs fprs stackOffset accumCode accumUsed - | reg : _ <- regs = do -@@ -1841,9 +1842,9 @@ genCCall' dflags gcp target dest_regs args - -- ... so does the PowerOpen ABI. - GCPAIX -> stackOffset + stackBytes - -- ... the SysV ABI 32-bit doesn't. -- GCPLinux -> stackOffset -+ GCP32ELF -> stackOffset - -- ... but SysV ABI 64-bit does. -- GCPLinux64ELF _ -> stackOffset + stackBytes -+ GCP64ELF _ -> stackOffset + stackBytes - passArguments args - (drop nGprs gprs) - (drop nFprs fprs) -@@ -1868,14 +1869,14 @@ genCCall' dflags gcp target dest_regs args - -- The 32bit PowerOPEN ABI is happy with - -- 32bit-alignment as well... - stackOffset -- GCPLinux -+ GCP32ELF - -- ... the SysV ABI requires 8-byte - -- alignment for doubles. - | isFloatType rep && typeWidth rep == W64 -> - roundTo 8 stackOffset - | otherwise -> - stackOffset -- GCPLinux64ELF _ -> -+ GCP64ELF _ -> - -- Everything on the stack is mapped to - -- 8-byte aligned doublewords - stackOffset -@@ -1886,7 +1887,7 @@ genCCall' dflags gcp target dest_regs args - -- "Single precision floating point values - -- are mapped to the second word in a single - -- doubleword" -- GCPLinux64ELF 1 -> stackOffset' + 4 -+ GCP64ELF 1 -> stackOffset' + 4 - _ -> stackOffset' - | otherwise = stackOffset' - -@@ -1925,7 +1926,7 @@ genCCall' dflags gcp target dest_regs args - FF64 -> (2, 1, 8, fprs) - II64 -> panic "genCCall' passArguments II64" - FF80 -> panic "genCCall' passArguments FF80" -- GCPLinux -> -+ GCP32ELF -> - case cmmTypeFormat rep of - II8 -> (1, 0, 4, gprs) - II16 -> (1, 0, 4, gprs) -@@ -1935,7 +1936,7 @@ genCCall' dflags gcp target dest_regs args - FF64 -> (0, 1, 8, fprs) - II64 -> panic "genCCall' passArguments II64" - FF80 -> panic "genCCall' passArguments FF80" -- GCPLinux64ELF _ -> -+ GCP64ELF _ -> - case cmmTypeFormat rep of - II8 -> (1, 0, 8, gprs) - II16 -> (1, 0, 8, gprs) ---- CodeGen.hs.orig 2018-09-16 22:53:54.000000000 +0200 ---- libraries/ghci/GHCi/InfoTable.hsc.orig 2019-07-06 09:00:10.880579000 +0200 -+++ libraries/ghci/GHCi/InfoTable.hsc 2019-07-06 08:59:23.613439000 +0200 -@@ -77,7 +77,7 @@ data Arch = ArchSPARC - | ArchARM - | ArchARM64 - | ArchPPC64 -- | ArchPPC64LE -+ | ArchPPC64_ELFv2 - | ArchUnknown - deriving Show - -@@ -99,8 +99,8 @@ platform = - ArchARM64 - #elif defined(powerpc64_HOST_ARCH) - ArchPPC64 --#elif defined(powerpc64le_HOST_ARCH) -- ArchPPC64LE -+#elif defined(_CALL_ELF) && (_CALL_ELF == 2) -+ ArchPPC64_ELFv2 - #else - # if defined(TABLES_NEXT_TO_CODE) - # error Unimplemented architecture -@@ -252,7 +252,7 @@ mkJumpToAddr a = case platform of - 0xE96C0010, - 0x4E800420] - -- ArchPPC64LE -> -+ ArchPPC64_ELFv2 -> - -- The ABI requires r12 to point to the function's entry point. - -- We use the medium code model where code resides in the first - -- two gigabytes, so loading a non-negative32 bit address ---- rts/StgCRun.c.orig 2019-04-07 21:39:58.000000000 +0200 -+++ rts/StgCRun.c 2019-07-06 08:57:54.735161000 +0200 -@@ -747,9 +747,8 @@ StgRunIsImplementedInAssembler(void) - Everything is in assembler, so we don't have to deal with GCC... - -------------------------------------------------------------------------- */ - --#if defined(powerpc64_HOST_ARCH) -+#if defined(ELF_V1) - --#if defined(linux_HOST_OS) - static void GNUC3_ATTRIBUTE(used) - StgRunIsImplementedInAssembler(void) - { -@@ -871,13 +870,9 @@ StgRunIsImplementedInAssembler(void) - : : "i"(RESERVED_C_STACK_BYTES+304 /*stack frame size*/)); - } - --#else // linux_HOST_OS --#error Only Linux support for power64 right now. - #endif - --#endif -- --#if defined(powerpc64le_HOST_ARCH) -+#if defined(ELF_V2) - /* ----------------------------------------------------------------------------- - PowerPC 64 little endian architecture - ---- rts/StgCRunAsm.S.orig 2018-06-12 22:33:31.000000000 +0200 -+++ rts/StgCRunAsm.S 2019-07-06 13:29:26.837367000 +0200 -@@ -1,8 +1,7 @@ - #include "ghcconfig.h" - #include "rts/Constants.h" - --#if defined(powerpc64le_HOST_ARCH) --# ifdef linux_HOST_OS -+#if defined(_CALL_ELF) && (_CALL_ELF == 2) - # define STACK_FRAME_SIZE RESERVED_C_STACK_BYTES+304 - .file "StgCRun.c" - .abiversion 2 -@@ -13,6 +12,8 @@ - .hidden StgRun - .type StgRun,@function - StgRun: -+ addis %r2, %r12, .TOC.-StgRun@ha -+ addi %r2, %r2, .TOC.-StgRun@l - .localentry StgRun,.-StgRun - mflr 0 - mr 5, 1 -@@ -108,9 +109,6 @@ StgReturn: - blr - - .section .note.GNU-stack,"",@progbits --# else // linux_HOST_OS --# error Only Linux support for power64 little endian right now. --# endif - - #elif defined(powerpc_HOST_ARCH) - # if defined(aix_HOST_OS) Property changes on: head/lang/ghc/files863/patch-ppc64 ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/lang/ghc/files863/wrap.c =================================================================== --- head/lang/ghc/files863/wrap.c (revision 545122) +++ head/lang/ghc/files863/wrap.c (nonexistent) @@ -1,55 +0,0 @@ -/* -*- ugly-hack-mode -*- */ -/* $FreeBSD$ */ - -#include - -struct old_dirent; -struct old_stat; - -__asm(".symver old_readdir_r, readdir_r@FBSD_1.0"); -int old_readdir_r(void *dirp, struct old_dirent *entry, - struct old_dirent **result); -__asm(".symver old_stat, stat@FBSD_1.0"); -int old_stat(const char * restrict path, struct old_stat * restrict sb); -__asm(".symver old_lstat, lstat@FBSD_1.0"); -int old_lstat(const char * restrict path, struct old_stat * restrict sb); -__asm(".symver old_fstat, fstat@FBSD_1.0"); -int old_fstat(int fd, struct old_stat *sb); -__asm(".symver old_mknod, mknod@FBSD_1.0"); -int old_mknod(const char *path, mode_t mode, uint32_t dev); - -int -__wrap_readdir_r(void *dirp, struct old_dirent *entry, - struct old_dirent **result) -{ - - return (old_readdir_r(dirp, entry, result)); -} - -int -__wrap_stat(const char * restrict path, struct old_stat * restrict sb) -{ - - return (old_stat(path, sb)); -} - -int -__wrap_lstat(const char * restrict path, struct old_stat * restrict sb) -{ - - return (old_lstat(path, sb)); -} - -int -__wrap_fstat(int fd, struct old_stat *sb) -{ - - return (old_fstat(fd, sb)); -} - -int -__wrap_mknod(const char *path, mode_t mode, uint32_t dev) -{ - - return (old_mknod(path, mode, dev)); -} Property changes on: head/lang/ghc/files863/wrap.c ___________________________________________________________________ Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/lang/ghc/files863/patch-libraries__Cabal__Cabal__Distribution__Simple__Program__Builtin.hs =================================================================== --- head/lang/ghc/files863/patch-libraries__Cabal__Cabal__Distribution__Simple__Program__Builtin.hs (revision 545122) +++ head/lang/ghc/files863/patch-libraries__Cabal__Cabal__Distribution__Simple__Program__Builtin.hs (nonexistent) @@ -1,39 +0,0 @@ ---- libraries/Cabal/Cabal/Distribution/Simple/Program/Builtin.hs.orig 2017-11-28 16:40:34 UTC -+++ libraries/Cabal/Cabal/Distribution/Simple/Program/Builtin.hs -@@ -59,6 +59,8 @@ import Distribution.Compat.Exception - import Distribution.Verbosity - import Distribution.Version - -+import System.FilePath (takeDirectory) -+ - import qualified Data.Map as Map - - -- ------------------------------------------------------------ -@@ -265,11 +267,13 @@ alexProgram = (simpleProgram "alex") { - - gccProgram :: Program - gccProgram = (simpleProgram "gcc") { -- programFindVersion = findProgramVersion "-dumpversion" id -- } -+ programFindLocation = \v p -> findProgramOnSearchPath v p "%%CC%%" -+} - - arProgram :: Program --arProgram = simpleProgram "ar" -+arProgram = (simpleProgram "ar") { -+ programFindLocation = \v p -> findProgramOnSearchPath v p "%%AR%%" -+} - - stripProgram :: Program - stripProgram = (simpleProgram "strip") { -@@ -337,7 +341,9 @@ greencardProgram :: Program - greencardProgram = simpleProgram "greencard" - - ldProgram :: Program --ldProgram = simpleProgram "ld" -+ldProgram = (simpleProgram "ld") { -+ programFindLocation = \v p -> findProgramOnSearchPath v p "%%LD%%" -+ } - - tarProgram :: Program - tarProgram = (simpleProgram "tar") { Property changes on: head/lang/ghc/files863/patch-libraries__Cabal__Cabal__Distribution__Simple__Program__Builtin.hs ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/lang/ghc/files863/patch-ghc.mk =================================================================== --- head/lang/ghc/files863/patch-ghc.mk (revision 545122) +++ head/lang/ghc/files863/patch-ghc.mk (nonexistent) @@ -1,11 +0,0 @@ ---- ghc.mk.orig 2018-09-16 20:53:54 UTC -+++ ghc.mk -@@ -96,6 +96,7 @@ endif - # Catch make if it runs away into an infinite loop - ifeq "$(MAKE_RESTARTS)" "" - else ifeq "$(MAKE_RESTARTS)" "1" -+else ifeq "$(MAKE_RESTARTS)" "2" - else - $(error Make has restarted itself $(MAKE_RESTARTS) times; is there a makefile bug? See http://ghc.haskell.org/trac/ghc/wiki/Building/Troubleshooting#Makehasrestarteditself3timesisthereamakefilebug for details) - endif - Property changes on: head/lang/ghc/files863/patch-ghc.mk ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/lang/ghc/files864/patch-configure.ac =================================================================== --- head/lang/ghc/files864/patch-configure.ac (revision 545122) +++ head/lang/ghc/files864/patch-configure.ac (nonexistent) @@ -1,12 +0,0 @@ ---- configure.ac.orig 2018-04-17 19:30:22 UTC -+++ configure.ac -@@ -447,6 +447,9 @@ XCODE_VERSION() - dnl ** Building a cross compiler? - dnl -------------------------------------------------------------- - CrossCompiling=NO -+ -+build=`echo $build | sed -e 's/amd64-/x86_64-/g; s/armv[[67]]-/arm-/g; s/-freebsd.*$/-freebsd/g'` -+ - # If 'host' and 'target' differ, then this means we are building a cross-compiler. - if test "$TargetPlatform" != "$HostPlatform" ; then - CrossCompiling=YES Property changes on: head/lang/ghc/files864/patch-configure.ac ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/lang/ghc/files864/extra-patch-aclocal.m4 =================================================================== --- head/lang/ghc/files864/extra-patch-aclocal.m4 (revision 545122) +++ head/lang/ghc/files864/extra-patch-aclocal.m4 (nonexistent) @@ -1,16 +0,0 @@ ---- aclocal.m4.orig 2018-03-25 21:22:32 UTC -+++ aclocal.m4 -@@ -2361,13 +2378,6 @@ AC_DEFUN([FIND_LD],[ - [enable_ld_override=yes]) - - find_ld() { -- # Make sure the user didn't specify LD manually. -- if test "z$LD" != "z"; then -- AC_CHECK_TARGET_TOOL([LD], [ld]) -- LD_NO_GOLD=$LD -- return -- fi -- - # Manually iterate over possible names since we want to ensure that, e.g., - # if ld.lld is installed but gcc doesn't support -fuse-ld=lld, that we - # then still try ld.gold and -fuse-ld=gold. Property changes on: head/lang/ghc/files864/extra-patch-aclocal.m4 ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/lang/ghc/files864/build.mk.in =================================================================== --- head/lang/ghc/files864/build.mk.in (revision 545122) +++ head/lang/ghc/files864/build.mk.in (nonexistent) @@ -1,20 +0,0 @@ -docdir = %%PREFIX%%/share/doc/ghc-%%GHC_VERSION%% -htmldir = %%PREFIX%%/share/doc/ghc-%%GHC_VERSION%% -mandir = %%PREFIX%%/man -infodir = %%PREFIX%%/info -DYNAMIC_GHC_PROGRAMS = %%WITH_DYNAMIC%% -BUILD_PROF_LIBS = %%WITH_PROFILE%% -HADDOCK_DOCS = YES -HSCOLOUR_SRCS = %%WITH_DOCS%% -INTEGER_LIBRARY = %%INTEGER_LIBRARY%% -# disable xelatex: PR 231438 -BUILD_SPHINX_PDF = NO -BSD_PATH_TO_HSC2HS = %%HSC2HS%% -SRC_HC_OPTS += -I%%NCURSESINC%% -L%%NCURSESLIB%% -I%%LOCALBASE%%/include -L%%LOCALBASE%%/lib -SRC_CC_OPTS += %%CFLAGS%% -EXTRA_HSC2HS_OPTS += -I%%LOCALBASE%%/include --lflag=-L%%LOCALBASE%%/lib -EXTRA_LD_OPTS += -L%%LOCALBASE%%/lib -EXTRA_CABAL_CONFIGURE_FLAGS += --extra-include-dirs=%%LOCALBASE%%/include -EXTRA_CABAL_CONFIGURE_FLAGS += --extra-lib-dirs=%%LOCALBASE%%/lib -libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes=%%NCURSESINC%% --configure-option=--with-curses-libraries=%%NCURSESLIB%% -V = 0 Property changes on: head/lang/ghc/files864/build.mk.in ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/lang/ghc/files864/patch-ppc64 =================================================================== --- head/lang/ghc/files864/patch-ppc64 (revision 545122) +++ head/lang/ghc/files864/patch-ppc64 (nonexistent) @@ -1,465 +0,0 @@ ---- libraries/containers/include/containers.h -+++ libraries/containers/include/containers.h -@@ -35,7 +35,6 @@ - - #ifdef __GLASGOW_HASKELL__ - # define USE_ST_MONAD 1 --# define USE_UNBOXED_ARRAYS 1 - #endif - - #endif - -From f4399ce96514ab58d766de999896780e93c886c6 Mon Sep 17 00:00:00 2001 -From: Peter Trommler -Date: Fri, 28 Dec 2018 23:52:31 +0100 -Subject: [PATCH] PPC NCG: Make calling convention more general - -All operating systems except AIX and Darwin follow the ELF -specification. ---- - compiler/nativeGen/PPC/CodeGen.hs | 11 +++++------ - 1 file changed, 5 insertions(+), 6 deletions(-) - -diff --git a/compiler/nativeGen/PPC/CodeGen.hs b/compiler/nativeGen/PPC/CodeGen.hs -index efd9591c71..56e3bc280b 100644 ---- compiler/nativeGen/PPC/CodeGen.hs -+++ compiler/nativeGen/PPC/CodeGen.hs -@@ -1565,18 +1565,17 @@ genCCall target dest_regs argsAndHints - = panic "genCall: Wrong number of arguments/results for fabs" - - -- TODO: replace 'Int' by an enum such as 'PPC_64ABI' --data GenCCallPlatform = GCPLinux | GCPDarwin | GCPLinux64ELF !Int | GCPAIX -+data GenCCallPlatform = GCP32ELF | GCP64ELF !Int | GCPAIX | GCPDarwin - - platformToGCP :: Platform -> GenCCallPlatform - platformToGCP platform = case platformOS platform of -- OSLinux -> case platformArch platform of -- ArchPPC -> GCPLinux -- ArchPPC_64 ELF_V1 -> GCPLinux64ELF 1 -- ArchPPC_64 ELF_V2 -> GCPLinux64ELF 2 -- _ -> panic "PPC.CodeGen.platformToGCP: Unknown Linux" - OSAIX -> GCPAIX - OSDarwin -> GCPDarwin -- _ -> panic "PPC.CodeGen.platformToGCP: not defined for this OS" -+ _ -> case platformArch platform of -+ ArchPPC -> GCP32ELF -+ ArchPPC_64 ELF_V1 -> GCP64ELF 1 -+ ArchPPC_64 ELF_V2 -> GCP64ELF 2 -+ _ -> panic "platformToGCP: Not PowerPC" - - - genCCall' - - - --- -2.19.2 - -From fa2128cb78a8b365d822c23b8da19fa14ac23ce3 Mon Sep 17 00:00:00 2001 -From: Peter Trommler -Date: Fri, 28 Dec 2018 23:55:35 +0100 -Subject: [PATCH] PPC NCG: Make `stackHeaderSize` more general - ---- - compiler/nativeGen/PPC/Instr.hs | 13 ++++++------- - 1 file changed, 6 insertions(+), 7 deletions(-) - -diff --git a/compiler/nativeGen/PPC/Instr.hs b/compiler/nativeGen/PPC/Instr.hs -index 8eb5e8fa8d..ce421ed4bf 100644 ---- compiler/nativeGen/PPC/Instr.hs -+++ compiler/nativeGen/PPC/Instr.hs -@@ -573,15 +573,14 @@ ppc_mkLoadInstr dflags reg delta slot - stackFrameHeaderSize :: DynFlags -> Int - stackFrameHeaderSize dflags - = case platformOS platform of -- OSLinux -> case platformArch platform of -- -- header + parameter save area -- ArchPPC -> 64 -- TODO: check ABI spec -- ArchPPC_64 ELF_V1 -> 48 + 8 * 8 -- ArchPPC_64 ELF_V2 -> 32 + 8 * 8 -- _ -> panic "PPC.stackFrameHeaderSize: Unknown Linux" - OSAIX -> 24 + 8 * 4 - OSDarwin -> 64 -- TODO: check ABI spec -- _ -> panic "PPC.stackFrameHeaderSize: not defined for this OS" -+ _ -> case platformArch platform of -+ -- header + parameter save area -+ ArchPPC -> 64 -- TODO: check ABI spec -+ ArchPPC_64 ELF_V1 -> 48 + 8 * 8 -+ ArchPPC_64 ELF_V2 -> 32 + 8 * 8 -+ _ -> panic "PPC.stackFrameHeaderSize: not defined for this OS" - where platform = targetPlatform dflags - - -- | The maximum number of bytes required to spill a register. PPC32 - - - --- -2.19.2 - -From 3472824eee7c616aaf755c147ef2c3e4d79fbec4 Mon Sep 17 00:00:00 2001 -From: Peter Trommler -Date: Sat, 29 Dec 2018 10:12:48 +0100 -Subject: [PATCH] PPC NCG: GOT declaration for all 64-bit ELF systems - ---- - compiler/nativeGen/PIC.hs | 8 +++----- - 1 file changed, 3 insertions(+), 5 deletions(-) - -diff --git a/compiler/nativeGen/PIC.hs b/compiler/nativeGen/PIC.hs -index 2f300c4614..7be7a860f7 100644 ---- compiler/nativeGen/PIC.hs -+++ compiler/nativeGen/PIC.hs -@@ -527,19 +527,17 @@ pprGotDeclaration _ _ OSAIX - ] - - ---- PPC 64 ELF v1 needs a Table Of Contents (TOC) on Linux --pprGotDeclaration _ (ArchPPC_64 ELF_V1) OSLinux -+-- PPC 64 ELF v1 needs a Table Of Contents (TOC) -+pprGotDeclaration _ (ArchPPC_64 ELF_V1) _ - = text ".section \".toc\",\"aw\"" - -- In ELF v2 we also need to tell the assembler that we want ABI - -- version 2. This would normally be done at the top of the file - -- right after a file directive, but I could not figure out how - -- to do that. --pprGotDeclaration _ (ArchPPC_64 ELF_V2) OSLinux -+pprGotDeclaration _ (ArchPPC_64 ELF_V2) _ - = vcat [ text ".abiversion 2", - text ".section \".toc\",\"aw\"" - ] --pprGotDeclaration _ (ArchPPC_64 _) _ -- = panic "pprGotDeclaration: ArchPPC_64 only Linux supported" - - -- Emit GOT declaration - -- Output whatever needs to be output once per .s file. - - - --- -2.19.2 - -From 749e343ef07aeeb71fe38c432f1b88ad8a6d2a58 Mon Sep 17 00:00:00 2001 -From: Peter Trommler -Date: Sat, 29 Dec 2018 10:14:12 +0100 -Subject: [PATCH] PPC NCG: Register definitions for all 64-bit systems - ---- - compiler/nativeGen/PPC/Regs.hs | 11 +++-------- - 1 file changed, 3 insertions(+), 8 deletions(-) - -diff --git a/compiler/nativeGen/PPC/Regs.hs b/compiler/nativeGen/PPC/Regs.hs -index 227517be88..7a6d6ed8e5 100644 ---- compiler/nativeGen/PPC/Regs.hs -+++ compiler/nativeGen/PPC/Regs.hs -@@ -229,12 +229,8 @@ allArgRegs = map regSingle [3..10] - - -- these are the regs which we cannot assume stay alive over a C call. - callClobberedRegs :: Platform -> [Reg] --callClobberedRegs platform -- = case platformOS platform of -- OSAIX -> map regSingle (0:[2..12] ++ map fReg [0..13]) -- OSDarwin -> map regSingle (0:[2..12] ++ map fReg [0..13]) -- OSLinux -> map regSingle (0:[2..13] ++ map fReg [0..13]) -- _ -> panic "PPC.Regs.callClobberedRegs: not defined for this architecture" -+callClobberedRegs _platform -+ = map regSingle (0:[2..12] ++ map fReg [0..13]) - - - allMachRegNos :: [RegNo] -@@ -265,11 +261,10 @@ allFPArgRegs platform - = case platformOS platform of - OSAIX -> map (regSingle . fReg) [1..13] - OSDarwin -> map (regSingle . fReg) [1..13] -- OSLinux -> case platformArch platform of -+ _ -> case platformArch platform of - ArchPPC -> map (regSingle . fReg) [1..8] - ArchPPC_64 _ -> map (regSingle . fReg) [1..13] - _ -> panic "PPC.Regs.allFPArgRegs: unknown PPC Linux" -- _ -> panic "PPC.Regs.allFPArgRegs: not defined for this architecture" - - fits16Bits :: Integral a => a -> Bool - fits16Bits x = x >= -32768 && x < 32768 - - - --- -2.19.2 - -From 19731a77ed203870f76a53eaf01758efbb5144d3 Mon Sep 17 00:00:00 2001 -From: Peter Trommler -Date: Sun, 13 Jan 2019 15:16:28 +0100 -Subject: [PATCH] PPC NCG: Emit type declaration on all ELF systems - ---- - compiler/nativeGen/PPC/Ppr.hs | 5 ++--- - 1 file changed, 2 insertions(+), 3 deletions(-) - -diff --git a/compiler/nativeGen/PPC/Ppr.hs b/compiler/nativeGen/PPC/Ppr.hs -index 2f64d82ee5..82726d90d9 100644 ---- compiler/nativeGen/PPC/Ppr.hs -+++ compiler/nativeGen/PPC/Ppr.hs -@@ -142,9 +142,8 @@ pprGloblDecl lbl - pprTypeAndSizeDecl :: CLabel -> SDoc - pprTypeAndSizeDecl lbl - = sdocWithPlatform $ \platform -> -- if platformOS platform == OSLinux && externallyVisibleCLabel lbl -- then text ".type " <> -- ppr lbl <> text ", @object" -+ if osElfTarget (platformOS platform) && externallyVisibleCLabel lbl -+ then text "\t.type " <> ppr lbl <> text ", @object" - else empty - - pprLabel :: CLabel -> SDoc --- -2.19.2 - ---- compiler/nativeGen/PPC/CodeGen.hs.orig 2018-09-16 22:53:54.000000000 +0200 -+++ compiler/nativeGen/PPC/CodeGen.hs 2019-01-17 10:03:25.018164000 +0100 -@@ -1047,7 +1047,7 @@ genJump tree - - genJump' :: CmmExpr -> GenCCallPlatform -> NatM InstrBlock - --genJump' tree (GCPLinux64ELF 1) -+genJump' tree (GCP64ELF 1) - = do - (target,code) <- getSomeReg tree - return (code -@@ -1057,7 +1057,7 @@ genJump' tree (GCPLinux64ELF 1) - `snocOL` LD II64 r11 (AddrRegImm target (ImmInt 16)) - `snocOL` BCTR [] Nothing) - --genJump' tree (GCPLinux64ELF 2) -+genJump' tree (GCP64ELF 2) - = do - (target,code) <- getSomeReg tree - return (code -@@ -1667,7 +1667,7 @@ genCCall' dflags gcp target dest_regs args - Right dyn -> do -- implement call through function pointer - (dynReg, dynCode) <- getSomeReg dyn - case gcp of -- GCPLinux64ELF 1 -> return ( dynCode -+ GCP64ELF 1 -> return ( dynCode - `appOL` codeBefore - `snocOL` ST spFormat toc (AddrRegImm sp (ImmInt 40)) - `snocOL` LD II64 r11 (AddrRegImm dynReg (ImmInt 0)) -@@ -1677,7 +1677,7 @@ genCCall' dflags gcp target dest_regs args - `snocOL` BCTRL usedRegs - `snocOL` LD spFormat toc (AddrRegImm sp (ImmInt 40)) - `appOL` codeAfter) -- GCPLinux64ELF 2 -> return ( dynCode -+ GCP64ELF 2 -> return ( dynCode - `appOL` codeBefore - `snocOL` ST spFormat toc (AddrRegImm sp (ImmInt 24)) - `snocOL` MR r12 dynReg -@@ -1715,9 +1715,9 @@ genCCall' dflags gcp target dest_regs args - initialStackOffset = case gcp of - GCPAIX -> 24 - GCPDarwin -> 24 -- GCPLinux -> 8 -- GCPLinux64ELF 1 -> 48 -- GCPLinux64ELF 2 -> 32 -+ GCP32ELF -> 8 -+ GCP64ELF 1 -> 48 -+ GCP64ELF 2 -> 32 - _ -> panic "genCall': unknown calling convention" - -- size of linkage area + size of arguments, in bytes - stackDelta finalStack = case gcp of -@@ -1727,12 +1727,12 @@ genCCall' dflags gcp target dest_regs args - GCPDarwin -> - roundTo 16 $ (24 +) $ max 32 $ sum $ - map (widthInBytes . typeWidth) argReps -- GCPLinux -> roundTo 16 finalStack -- GCPLinux64ELF 1 -> -+ GCP32ELF -> roundTo 16 finalStack -+ GCP64ELF 1 -> - roundTo 16 $ (48 +) $ max 64 $ sum $ - map (roundTo 8 . widthInBytes . typeWidth) - argReps -- GCPLinux64ELF 2 -> -+ GCP64ELF 2 -> - roundTo 16 $ (32 +) $ max 64 $ sum $ - map (roundTo 8 . widthInBytes . typeWidth) - argReps -@@ -1765,13 +1765,14 @@ genCCall' dflags gcp target dest_regs args - -- link editor replaces the NOP instruction with a load of the TOC - -- from the stack to restore the TOC. - maybeNOP = case gcp of -+ GCP32ELF -> nilOL - -- See Section 3.9.4 of OpenPower ABI - GCPAIX -> unitOL NOP - -- See Section 3.5.11 of PPC64 ELF v1.9 -- GCPLinux64ELF 1 -> unitOL NOP -+ GCP64ELF 1 -> unitOL NOP - -- See Section 2.3.6 of PPC64 ELF v2 -- GCPLinux64ELF 2 -> unitOL NOP -- _ -> nilOL -+ GCP64ELF 2 -> unitOL NOP -+ _ -> panic "maybeNOP: Unknown PowerPC 64-bit ABI" - - passArguments [] _ _ stackOffset accumCode accumUsed = return (stackOffset, accumCode, accumUsed) - passArguments ((arg,arg_ty):args) gprs fprs stackOffset -@@ -1806,7 +1807,7 @@ genCCall' dflags gcp target dest_regs args - `snocOL` storeWord vr_hi gprs stackOffset - `snocOL` storeWord vr_lo (drop 1 gprs) (stackOffset+4)) - ((take 2 gprs) ++ accumUsed) -- GCPLinux -> -+ GCP32ELF -> - do let stackOffset' = roundTo 8 stackOffset - stackCode = accumCode `appOL` code - `snocOL` ST II32 vr_hi (AddrRegImm sp (ImmInt stackOffset')) -@@ -1826,7 +1827,7 @@ genCCall' dflags gcp target dest_regs args - _ -> -- only one or no regs left - passArguments args [] fprs (stackOffset'+8) - stackCode accumUsed -- GCPLinux64ELF _ -> panic "passArguments: 32 bit code" -+ GCP64ELF _ -> panic "passArguments: 32 bit code" - - passArguments ((arg,rep):args) gprs fprs stackOffset accumCode accumUsed - | reg : _ <- regs = do -@@ -1841,9 +1842,9 @@ genCCall' dflags gcp target dest_regs args - -- ... so does the PowerOpen ABI. - GCPAIX -> stackOffset + stackBytes - -- ... the SysV ABI 32-bit doesn't. -- GCPLinux -> stackOffset -+ GCP32ELF -> stackOffset - -- ... but SysV ABI 64-bit does. -- GCPLinux64ELF _ -> stackOffset + stackBytes -+ GCP64ELF _ -> stackOffset + stackBytes - passArguments args - (drop nGprs gprs) - (drop nFprs fprs) -@@ -1868,14 +1869,14 @@ genCCall' dflags gcp target dest_regs args - -- The 32bit PowerOPEN ABI is happy with - -- 32bit-alignment as well... - stackOffset -- GCPLinux -+ GCP32ELF - -- ... the SysV ABI requires 8-byte - -- alignment for doubles. - | isFloatType rep && typeWidth rep == W64 -> - roundTo 8 stackOffset - | otherwise -> - stackOffset -- GCPLinux64ELF _ -> -+ GCP64ELF _ -> - -- Everything on the stack is mapped to - -- 8-byte aligned doublewords - stackOffset -@@ -1886,7 +1887,7 @@ genCCall' dflags gcp target dest_regs args - -- "Single precision floating point values - -- are mapped to the second word in a single - -- doubleword" -- GCPLinux64ELF 1 -> stackOffset' + 4 -+ GCP64ELF 1 -> stackOffset' + 4 - _ -> stackOffset' - | otherwise = stackOffset' - -@@ -1925,7 +1926,7 @@ genCCall' dflags gcp target dest_regs args - FF64 -> (2, 1, 8, fprs) - II64 -> panic "genCCall' passArguments II64" - FF80 -> panic "genCCall' passArguments FF80" -- GCPLinux -> -+ GCP32ELF -> - case cmmTypeFormat rep of - II8 -> (1, 0, 4, gprs) - II16 -> (1, 0, 4, gprs) -@@ -1935,7 +1936,7 @@ genCCall' dflags gcp target dest_regs args - FF64 -> (0, 1, 8, fprs) - II64 -> panic "genCCall' passArguments II64" - FF80 -> panic "genCCall' passArguments FF80" -- GCPLinux64ELF _ -> -+ GCP64ELF _ -> - case cmmTypeFormat rep of - II8 -> (1, 0, 8, gprs) - II16 -> (1, 0, 8, gprs) ---- CodeGen.hs.orig 2018-09-16 22:53:54.000000000 +0200 ---- libraries/ghci/GHCi/InfoTable.hsc.orig 2019-07-06 09:00:10.880579000 +0200 -+++ libraries/ghci/GHCi/InfoTable.hsc 2019-07-06 08:59:23.613439000 +0200 -@@ -77,7 +77,7 @@ data Arch = ArchSPARC - | ArchARM - | ArchARM64 - | ArchPPC64 -- | ArchPPC64LE -+ | ArchPPC64_ELFv2 - | ArchUnknown - deriving Show - -@@ -99,8 +99,8 @@ platform = - ArchARM64 - #elif defined(powerpc64_HOST_ARCH) - ArchPPC64 --#elif defined(powerpc64le_HOST_ARCH) -- ArchPPC64LE -+#elif defined(_CALL_ELF) && (_CALL_ELF == 2) -+ ArchPPC64_ELFv2 - #else - # if defined(TABLES_NEXT_TO_CODE) - # error Unimplemented architecture -@@ -252,7 +252,7 @@ mkJumpToAddr a = case platform of - 0xE96C0010, - 0x4E800420] - -- ArchPPC64LE -> -+ ArchPPC64_ELFv2 -> - -- The ABI requires r12 to point to the function's entry point. - -- We use the medium code model where code resides in the first - -- two gigabytes, so loading a non-negative32 bit address ---- rts/StgCRun.c.orig 2019-04-07 21:39:58.000000000 +0200 -+++ rts/StgCRun.c 2019-07-06 08:57:54.735161000 +0200 -@@ -747,9 +747,8 @@ StgRunIsImplementedInAssembler(void) - Everything is in assembler, so we don't have to deal with GCC... - -------------------------------------------------------------------------- */ - --#if defined(powerpc64_HOST_ARCH) -+#if defined(ELF_V1) - --#if defined(linux_HOST_OS) - static void GNUC3_ATTRIBUTE(used) - StgRunIsImplementedInAssembler(void) - { -@@ -871,13 +870,9 @@ StgRunIsImplementedInAssembler(void) - : : "i"(RESERVED_C_STACK_BYTES+304 /*stack frame size*/)); - } - --#else // linux_HOST_OS --#error Only Linux support for power64 right now. - #endif - --#endif -- --#if defined(powerpc64le_HOST_ARCH) -+#if defined(ELF_V2) - /* ----------------------------------------------------------------------------- - PowerPC 64 little endian architecture - ---- rts/StgCRunAsm.S.orig 2018-06-12 22:33:31.000000000 +0200 -+++ rts/StgCRunAsm.S 2019-07-06 13:29:26.837367000 +0200 -@@ -1,8 +1,7 @@ - #include "ghcconfig.h" - #include "rts/Constants.h" - --#if defined(powerpc64le_HOST_ARCH) --# ifdef linux_HOST_OS -+#if defined(_CALL_ELF) && (_CALL_ELF == 2) - # define STACK_FRAME_SIZE RESERVED_C_STACK_BYTES+304 - .file "StgCRun.c" - .abiversion 2 -@@ -13,6 +12,8 @@ - .hidden StgRun - .type StgRun,@function - StgRun: -+ addis %r2, %r12, .TOC.-StgRun@ha -+ addi %r2, %r2, .TOC.-StgRun@l - .localentry StgRun,.-StgRun - mflr 0 - mr 5, 1 -@@ -108,9 +109,6 @@ StgReturn: - blr - - .section .note.GNU-stack,"",@progbits --# else // linux_HOST_OS --# error Only Linux support for power64 little endian right now. --# endif - - #elif defined(powerpc_HOST_ARCH) - # if defined(aix_HOST_OS) Property changes on: head/lang/ghc/files864/patch-ppc64 ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/lang/ghc/files864/wrap.c =================================================================== --- head/lang/ghc/files864/wrap.c (revision 545122) +++ head/lang/ghc/files864/wrap.c (nonexistent) @@ -1,55 +0,0 @@ -/* -*- ugly-hack-mode -*- */ -/* $FreeBSD$ */ - -#include - -struct old_dirent; -struct old_stat; - -__asm(".symver old_readdir_r, readdir_r@FBSD_1.0"); -int old_readdir_r(void *dirp, struct old_dirent *entry, - struct old_dirent **result); -__asm(".symver old_stat, stat@FBSD_1.0"); -int old_stat(const char * restrict path, struct old_stat * restrict sb); -__asm(".symver old_lstat, lstat@FBSD_1.0"); -int old_lstat(const char * restrict path, struct old_stat * restrict sb); -__asm(".symver old_fstat, fstat@FBSD_1.0"); -int old_fstat(int fd, struct old_stat *sb); -__asm(".symver old_mknod, mknod@FBSD_1.0"); -int old_mknod(const char *path, mode_t mode, uint32_t dev); - -int -__wrap_readdir_r(void *dirp, struct old_dirent *entry, - struct old_dirent **result) -{ - - return (old_readdir_r(dirp, entry, result)); -} - -int -__wrap_stat(const char * restrict path, struct old_stat * restrict sb) -{ - - return (old_stat(path, sb)); -} - -int -__wrap_lstat(const char * restrict path, struct old_stat * restrict sb) -{ - - return (old_lstat(path, sb)); -} - -int -__wrap_fstat(int fd, struct old_stat *sb) -{ - - return (old_fstat(fd, sb)); -} - -int -__wrap_mknod(const char *path, mode_t mode, uint32_t dev) -{ - - return (old_mknod(path, mode, dev)); -} Property changes on: head/lang/ghc/files864/wrap.c ___________________________________________________________________ Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/lang/ghc/files864/patch-libraries__Cabal__Cabal__Distribution__Simple__Program__Builtin.hs =================================================================== --- head/lang/ghc/files864/patch-libraries__Cabal__Cabal__Distribution__Simple__Program__Builtin.hs (revision 545122) +++ head/lang/ghc/files864/patch-libraries__Cabal__Cabal__Distribution__Simple__Program__Builtin.hs (nonexistent) @@ -1,39 +0,0 @@ ---- libraries/Cabal/Cabal/Distribution/Simple/Program/Builtin.hs.orig 2017-11-28 16:40:34 UTC -+++ libraries/Cabal/Cabal/Distribution/Simple/Program/Builtin.hs -@@ -59,6 +59,8 @@ import Distribution.Compat.Exception - import Distribution.Verbosity - import Distribution.Version - -+import System.FilePath (takeDirectory) -+ - import qualified Data.Map as Map - - -- ------------------------------------------------------------ -@@ -265,11 +267,13 @@ alexProgram = (simpleProgram "alex") { - - gccProgram :: Program - gccProgram = (simpleProgram "gcc") { -- programFindVersion = findProgramVersion "-dumpversion" id -- } -+ programFindLocation = \v p -> findProgramOnSearchPath v p "%%CC%%" -+} - - arProgram :: Program --arProgram = simpleProgram "ar" -+arProgram = (simpleProgram "ar") { -+ programFindLocation = \v p -> findProgramOnSearchPath v p "%%AR%%" -+} - - stripProgram :: Program - stripProgram = (simpleProgram "strip") { -@@ -337,7 +341,9 @@ greencardProgram :: Program - greencardProgram = simpleProgram "greencard" - - ldProgram :: Program --ldProgram = simpleProgram "ld" -+ldProgram = (simpleProgram "ld") { -+ programFindLocation = \v p -> findProgramOnSearchPath v p "%%LD%%" -+ } - - tarProgram :: Program - tarProgram = (simpleProgram "tar") { Property changes on: head/lang/ghc/files864/patch-libraries__Cabal__Cabal__Distribution__Simple__Program__Builtin.hs ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/lang/ghc/files864/patch-ghc.mk =================================================================== --- head/lang/ghc/files864/patch-ghc.mk (revision 545122) +++ head/lang/ghc/files864/patch-ghc.mk (nonexistent) @@ -1,11 +0,0 @@ ---- ghc.mk.orig 2018-09-16 20:53:54 UTC -+++ ghc.mk -@@ -96,6 +96,7 @@ endif - # Catch make if it runs away into an infinite loop - ifeq "$(MAKE_RESTARTS)" "" - else ifeq "$(MAKE_RESTARTS)" "1" -+else ifeq "$(MAKE_RESTARTS)" "2" - else - $(error Make has restarted itself $(MAKE_RESTARTS) times; is there a makefile bug? See http://ghc.haskell.org/trac/ghc/wiki/Building/Troubleshooting#Makehasrestarteditself3timesisthereamakefilebug for details) - endif - Property changes on: head/lang/ghc/files864/patch-ghc.mk ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/lang/ghc/files865/patch-configure.ac =================================================================== --- head/lang/ghc/files865/patch-configure.ac (revision 545122) +++ head/lang/ghc/files865/patch-configure.ac (nonexistent) @@ -1,12 +0,0 @@ ---- configure.ac.orig 2018-04-17 19:30:22 UTC -+++ configure.ac -@@ -447,6 +447,9 @@ XCODE_VERSION() - dnl ** Building a cross compiler? - dnl -------------------------------------------------------------- - CrossCompiling=NO -+ -+build=`echo $build | sed -e 's/amd64-/x86_64-/g; s/armv[[67]]-/arm-/g; s/-freebsd.*$/-freebsd/g'` -+ - # If 'host' and 'target' differ, then this means we are building a cross-compiler. - if test "$TargetPlatform" != "$HostPlatform" ; then - CrossCompiling=YES Property changes on: head/lang/ghc/files865/patch-configure.ac ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/lang/ghc/files865/extra-patch-aclocal.m4 =================================================================== --- head/lang/ghc/files865/extra-patch-aclocal.m4 (revision 545122) +++ head/lang/ghc/files865/extra-patch-aclocal.m4 (nonexistent) @@ -1,16 +0,0 @@ ---- aclocal.m4.orig 2018-03-25 21:22:32 UTC -+++ aclocal.m4 -@@ -2361,13 +2378,6 @@ AC_DEFUN([FIND_LD],[ - [enable_ld_override=yes]) - - find_ld() { -- # Make sure the user didn't specify LD manually. -- if test "z$LD" != "z"; then -- AC_CHECK_TARGET_TOOL([LD], [ld]) -- LD_NO_GOLD=$LD -- return -- fi -- - # Manually iterate over possible names since we want to ensure that, e.g., - # if ld.lld is installed but gcc doesn't support -fuse-ld=lld, that we - # then still try ld.gold and -fuse-ld=gold. Property changes on: head/lang/ghc/files865/extra-patch-aclocal.m4 ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/lang/ghc/files865/build.mk.in =================================================================== --- head/lang/ghc/files865/build.mk.in (revision 545122) +++ head/lang/ghc/files865/build.mk.in (nonexistent) @@ -1,20 +0,0 @@ -docdir = %%PREFIX%%/share/doc/ghc-%%GHC_VERSION%% -htmldir = %%PREFIX%%/share/doc/ghc-%%GHC_VERSION%% -mandir = %%PREFIX%%/man -infodir = %%PREFIX%%/info -DYNAMIC_GHC_PROGRAMS = %%WITH_DYNAMIC%% -BUILD_PROF_LIBS = %%WITH_PROFILE%% -HADDOCK_DOCS = YES -HSCOLOUR_SRCS = %%WITH_DOCS%% -INTEGER_LIBRARY = %%INTEGER_LIBRARY%% -# disable xelatex: PR 231438 -BUILD_SPHINX_PDF = NO -BSD_PATH_TO_HSC2HS = %%HSC2HS%% -SRC_HC_OPTS += -I%%NCURSESINC%% -L%%NCURSESLIB%% -I%%LOCALBASE%%/include -L%%LOCALBASE%%/lib -SRC_CC_OPTS += %%CFLAGS%% -EXTRA_HSC2HS_OPTS += -I%%LOCALBASE%%/include --lflag=-L%%LOCALBASE%%/lib -EXTRA_LD_OPTS += -L%%LOCALBASE%%/lib -EXTRA_CABAL_CONFIGURE_FLAGS += --extra-include-dirs=%%LOCALBASE%%/include -EXTRA_CABAL_CONFIGURE_FLAGS += --extra-lib-dirs=%%LOCALBASE%%/lib -libraries/terminfo_CONFIGURE_OPTS += --configure-option=--with-curses-includes=%%NCURSESINC%% --configure-option=--with-curses-libraries=%%NCURSESLIB%% -V = 0 Property changes on: head/lang/ghc/files865/build.mk.in ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/lang/ghc/files865/patch-ppc64 =================================================================== --- head/lang/ghc/files865/patch-ppc64 (revision 545122) +++ head/lang/ghc/files865/patch-ppc64 (nonexistent) @@ -1,465 +0,0 @@ ---- libraries/containers/include/containers.h -+++ libraries/containers/include/containers.h -@@ -35,7 +35,6 @@ - - #ifdef __GLASGOW_HASKELL__ - # define USE_ST_MONAD 1 --# define USE_UNBOXED_ARRAYS 1 - #endif - - #endif - -From f4399ce96514ab58d766de999896780e93c886c6 Mon Sep 17 00:00:00 2001 -From: Peter Trommler -Date: Fri, 28 Dec 2018 23:52:31 +0100 -Subject: [PATCH] PPC NCG: Make calling convention more general - -All operating systems except AIX and Darwin follow the ELF -specification. ---- - compiler/nativeGen/PPC/CodeGen.hs | 11 +++++------ - 1 file changed, 5 insertions(+), 6 deletions(-) - -diff --git a/compiler/nativeGen/PPC/CodeGen.hs b/compiler/nativeGen/PPC/CodeGen.hs -index efd9591c71..56e3bc280b 100644 ---- compiler/nativeGen/PPC/CodeGen.hs -+++ compiler/nativeGen/PPC/CodeGen.hs -@@ -1565,18 +1565,17 @@ genCCall target dest_regs argsAndHints - = panic "genCall: Wrong number of arguments/results for fabs" - - -- TODO: replace 'Int' by an enum such as 'PPC_64ABI' --data GenCCallPlatform = GCPLinux | GCPDarwin | GCPLinux64ELF !Int | GCPAIX -+data GenCCallPlatform = GCP32ELF | GCP64ELF !Int | GCPAIX | GCPDarwin - - platformToGCP :: Platform -> GenCCallPlatform - platformToGCP platform = case platformOS platform of -- OSLinux -> case platformArch platform of -- ArchPPC -> GCPLinux -- ArchPPC_64 ELF_V1 -> GCPLinux64ELF 1 -- ArchPPC_64 ELF_V2 -> GCPLinux64ELF 2 -- _ -> panic "PPC.CodeGen.platformToGCP: Unknown Linux" - OSAIX -> GCPAIX - OSDarwin -> GCPDarwin -- _ -> panic "PPC.CodeGen.platformToGCP: not defined for this OS" -+ _ -> case platformArch platform of -+ ArchPPC -> GCP32ELF -+ ArchPPC_64 ELF_V1 -> GCP64ELF 1 -+ ArchPPC_64 ELF_V2 -> GCP64ELF 2 -+ _ -> panic "platformToGCP: Not PowerPC" - - - genCCall' - - - --- -2.19.2 - -From fa2128cb78a8b365d822c23b8da19fa14ac23ce3 Mon Sep 17 00:00:00 2001 -From: Peter Trommler -Date: Fri, 28 Dec 2018 23:55:35 +0100 -Subject: [PATCH] PPC NCG: Make `stackHeaderSize` more general - ---- - compiler/nativeGen/PPC/Instr.hs | 13 ++++++------- - 1 file changed, 6 insertions(+), 7 deletions(-) - -diff --git a/compiler/nativeGen/PPC/Instr.hs b/compiler/nativeGen/PPC/Instr.hs -index 8eb5e8fa8d..ce421ed4bf 100644 ---- compiler/nativeGen/PPC/Instr.hs -+++ compiler/nativeGen/PPC/Instr.hs -@@ -573,15 +573,14 @@ ppc_mkLoadInstr dflags reg delta slot - stackFrameHeaderSize :: DynFlags -> Int - stackFrameHeaderSize dflags - = case platformOS platform of -- OSLinux -> case platformArch platform of -- -- header + parameter save area -- ArchPPC -> 64 -- TODO: check ABI spec -- ArchPPC_64 ELF_V1 -> 48 + 8 * 8 -- ArchPPC_64 ELF_V2 -> 32 + 8 * 8 -- _ -> panic "PPC.stackFrameHeaderSize: Unknown Linux" - OSAIX -> 24 + 8 * 4 - OSDarwin -> 64 -- TODO: check ABI spec -- _ -> panic "PPC.stackFrameHeaderSize: not defined for this OS" -+ _ -> case platformArch platform of -+ -- header + parameter save area -+ ArchPPC -> 64 -- TODO: check ABI spec -+ ArchPPC_64 ELF_V1 -> 48 + 8 * 8 -+ ArchPPC_64 ELF_V2 -> 32 + 8 * 8 -+ _ -> panic "PPC.stackFrameHeaderSize: not defined for this OS" - where platform = targetPlatform dflags - - -- | The maximum number of bytes required to spill a register. PPC32 - - - --- -2.19.2 - -From 3472824eee7c616aaf755c147ef2c3e4d79fbec4 Mon Sep 17 00:00:00 2001 -From: Peter Trommler -Date: Sat, 29 Dec 2018 10:12:48 +0100 -Subject: [PATCH] PPC NCG: GOT declaration for all 64-bit ELF systems - ---- - compiler/nativeGen/PIC.hs | 8 +++----- - 1 file changed, 3 insertions(+), 5 deletions(-) - -diff --git a/compiler/nativeGen/PIC.hs b/compiler/nativeGen/PIC.hs -index 2f300c4614..7be7a860f7 100644 ---- compiler/nativeGen/PIC.hs -+++ compiler/nativeGen/PIC.hs -@@ -527,19 +527,17 @@ pprGotDeclaration _ _ OSAIX - ] - - ---- PPC 64 ELF v1 needs a Table Of Contents (TOC) on Linux --pprGotDeclaration _ (ArchPPC_64 ELF_V1) OSLinux -+-- PPC 64 ELF v1 needs a Table Of Contents (TOC) -+pprGotDeclaration _ (ArchPPC_64 ELF_V1) _ - = text ".section \".toc\",\"aw\"" - -- In ELF v2 we also need to tell the assembler that we want ABI - -- version 2. This would normally be done at the top of the file - -- right after a file directive, but I could not figure out how - -- to do that. --pprGotDeclaration _ (ArchPPC_64 ELF_V2) OSLinux -+pprGotDeclaration _ (ArchPPC_64 ELF_V2) _ - = vcat [ text ".abiversion 2", - text ".section \".toc\",\"aw\"" - ] --pprGotDeclaration _ (ArchPPC_64 _) _ -- = panic "pprGotDeclaration: ArchPPC_64 only Linux supported" - - -- Emit GOT declaration - -- Output whatever needs to be output once per .s file. - - - --- -2.19.2 - -From 749e343ef07aeeb71fe38c432f1b88ad8a6d2a58 Mon Sep 17 00:00:00 2001 -From: Peter Trommler -Date: Sat, 29 Dec 2018 10:14:12 +0100 -Subject: [PATCH] PPC NCG: Register definitions for all 64-bit systems - ---- - compiler/nativeGen/PPC/Regs.hs | 11 +++-------- - 1 file changed, 3 insertions(+), 8 deletions(-) - -diff --git a/compiler/nativeGen/PPC/Regs.hs b/compiler/nativeGen/PPC/Regs.hs -index 227517be88..7a6d6ed8e5 100644 ---- compiler/nativeGen/PPC/Regs.hs -+++ compiler/nativeGen/PPC/Regs.hs -@@ -229,12 +229,8 @@ allArgRegs = map regSingle [3..10] - - -- these are the regs which we cannot assume stay alive over a C call. - callClobberedRegs :: Platform -> [Reg] --callClobberedRegs platform -- = case platformOS platform of -- OSAIX -> map regSingle (0:[2..12] ++ map fReg [0..13]) -- OSDarwin -> map regSingle (0:[2..12] ++ map fReg [0..13]) -- OSLinux -> map regSingle (0:[2..13] ++ map fReg [0..13]) -- _ -> panic "PPC.Regs.callClobberedRegs: not defined for this architecture" -+callClobberedRegs _platform -+ = map regSingle (0:[2..12] ++ map fReg [0..13]) - - - allMachRegNos :: [RegNo] -@@ -265,11 +261,10 @@ allFPArgRegs platform - = case platformOS platform of - OSAIX -> map (regSingle . fReg) [1..13] - OSDarwin -> map (regSingle . fReg) [1..13] -- OSLinux -> case platformArch platform of -+ _ -> case platformArch platform of - ArchPPC -> map (regSingle . fReg) [1..8] - ArchPPC_64 _ -> map (regSingle . fReg) [1..13] - _ -> panic "PPC.Regs.allFPArgRegs: unknown PPC Linux" -- _ -> panic "PPC.Regs.allFPArgRegs: not defined for this architecture" - - fits16Bits :: Integral a => a -> Bool - fits16Bits x = x >= -32768 && x < 32768 - - - --- -2.19.2 - -From 19731a77ed203870f76a53eaf01758efbb5144d3 Mon Sep 17 00:00:00 2001 -From: Peter Trommler -Date: Sun, 13 Jan 2019 15:16:28 +0100 -Subject: [PATCH] PPC NCG: Emit type declaration on all ELF systems - ---- - compiler/nativeGen/PPC/Ppr.hs | 5 ++--- - 1 file changed, 2 insertions(+), 3 deletions(-) - -diff --git a/compiler/nativeGen/PPC/Ppr.hs b/compiler/nativeGen/PPC/Ppr.hs -index 2f64d82ee5..82726d90d9 100644 ---- compiler/nativeGen/PPC/Ppr.hs -+++ compiler/nativeGen/PPC/Ppr.hs -@@ -142,9 +142,8 @@ pprGloblDecl lbl - pprTypeAndSizeDecl :: CLabel -> SDoc - pprTypeAndSizeDecl lbl - = sdocWithPlatform $ \platform -> -- if platformOS platform == OSLinux && externallyVisibleCLabel lbl -- then text ".type " <> -- ppr lbl <> text ", @object" -+ if osElfTarget (platformOS platform) && externallyVisibleCLabel lbl -+ then text "\t.type " <> ppr lbl <> text ", @object" - else empty - - pprLabel :: CLabel -> SDoc --- -2.19.2 - ---- compiler/nativeGen/PPC/CodeGen.hs.orig 2018-09-16 22:53:54.000000000 +0200 -+++ compiler/nativeGen/PPC/CodeGen.hs 2019-01-17 10:03:25.018164000 +0100 -@@ -1047,7 +1047,7 @@ genJump tree - - genJump' :: CmmExpr -> GenCCallPlatform -> NatM InstrBlock - --genJump' tree (GCPLinux64ELF 1) -+genJump' tree (GCP64ELF 1) - = do - (target,code) <- getSomeReg tree - return (code -@@ -1057,7 +1057,7 @@ genJump' tree (GCPLinux64ELF 1) - `snocOL` LD II64 r11 (AddrRegImm target (ImmInt 16)) - `snocOL` BCTR [] Nothing) - --genJump' tree (GCPLinux64ELF 2) -+genJump' tree (GCP64ELF 2) - = do - (target,code) <- getSomeReg tree - return (code -@@ -1667,7 +1667,7 @@ genCCall' dflags gcp target dest_regs args - Right dyn -> do -- implement call through function pointer - (dynReg, dynCode) <- getSomeReg dyn - case gcp of -- GCPLinux64ELF 1 -> return ( dynCode -+ GCP64ELF 1 -> return ( dynCode - `appOL` codeBefore - `snocOL` ST spFormat toc (AddrRegImm sp (ImmInt 40)) - `snocOL` LD II64 r11 (AddrRegImm dynReg (ImmInt 0)) -@@ -1677,7 +1677,7 @@ genCCall' dflags gcp target dest_regs args - `snocOL` BCTRL usedRegs - `snocOL` LD spFormat toc (AddrRegImm sp (ImmInt 40)) - `appOL` codeAfter) -- GCPLinux64ELF 2 -> return ( dynCode -+ GCP64ELF 2 -> return ( dynCode - `appOL` codeBefore - `snocOL` ST spFormat toc (AddrRegImm sp (ImmInt 24)) - `snocOL` MR r12 dynReg -@@ -1715,9 +1715,9 @@ genCCall' dflags gcp target dest_regs args - initialStackOffset = case gcp of - GCPAIX -> 24 - GCPDarwin -> 24 -- GCPLinux -> 8 -- GCPLinux64ELF 1 -> 48 -- GCPLinux64ELF 2 -> 32 -+ GCP32ELF -> 8 -+ GCP64ELF 1 -> 48 -+ GCP64ELF 2 -> 32 - _ -> panic "genCall': unknown calling convention" - -- size of linkage area + size of arguments, in bytes - stackDelta finalStack = case gcp of -@@ -1727,12 +1727,12 @@ genCCall' dflags gcp target dest_regs args - GCPDarwin -> - roundTo 16 $ (24 +) $ max 32 $ sum $ - map (widthInBytes . typeWidth) argReps -- GCPLinux -> roundTo 16 finalStack -- GCPLinux64ELF 1 -> -+ GCP32ELF -> roundTo 16 finalStack -+ GCP64ELF 1 -> - roundTo 16 $ (48 +) $ max 64 $ sum $ - map (roundTo 8 . widthInBytes . typeWidth) - argReps -- GCPLinux64ELF 2 -> -+ GCP64ELF 2 -> - roundTo 16 $ (32 +) $ max 64 $ sum $ - map (roundTo 8 . widthInBytes . typeWidth) - argReps -@@ -1765,13 +1765,14 @@ genCCall' dflags gcp target dest_regs args - -- link editor replaces the NOP instruction with a load of the TOC - -- from the stack to restore the TOC. - maybeNOP = case gcp of -+ GCP32ELF -> nilOL - -- See Section 3.9.4 of OpenPower ABI - GCPAIX -> unitOL NOP - -- See Section 3.5.11 of PPC64 ELF v1.9 -- GCPLinux64ELF 1 -> unitOL NOP -+ GCP64ELF 1 -> unitOL NOP - -- See Section 2.3.6 of PPC64 ELF v2 -- GCPLinux64ELF 2 -> unitOL NOP -- _ -> nilOL -+ GCP64ELF 2 -> unitOL NOP -+ _ -> panic "maybeNOP: Unknown PowerPC 64-bit ABI" - - passArguments [] _ _ stackOffset accumCode accumUsed = return (stackOffset, accumCode, accumUsed) - passArguments ((arg,arg_ty):args) gprs fprs stackOffset -@@ -1806,7 +1807,7 @@ genCCall' dflags gcp target dest_regs args - `snocOL` storeWord vr_hi gprs stackOffset - `snocOL` storeWord vr_lo (drop 1 gprs) (stackOffset+4)) - ((take 2 gprs) ++ accumUsed) -- GCPLinux -> -+ GCP32ELF -> - do let stackOffset' = roundTo 8 stackOffset - stackCode = accumCode `appOL` code - `snocOL` ST II32 vr_hi (AddrRegImm sp (ImmInt stackOffset')) -@@ -1826,7 +1827,7 @@ genCCall' dflags gcp target dest_regs args - _ -> -- only one or no regs left - passArguments args [] fprs (stackOffset'+8) - stackCode accumUsed -- GCPLinux64ELF _ -> panic "passArguments: 32 bit code" -+ GCP64ELF _ -> panic "passArguments: 32 bit code" - - passArguments ((arg,rep):args) gprs fprs stackOffset accumCode accumUsed - | reg : _ <- regs = do -@@ -1841,9 +1842,9 @@ genCCall' dflags gcp target dest_regs args - -- ... so does the PowerOpen ABI. - GCPAIX -> stackOffset + stackBytes - -- ... the SysV ABI 32-bit doesn't. -- GCPLinux -> stackOffset -+ GCP32ELF -> stackOffset - -- ... but SysV ABI 64-bit does. -- GCPLinux64ELF _ -> stackOffset + stackBytes -+ GCP64ELF _ -> stackOffset + stackBytes - passArguments args - (drop nGprs gprs) - (drop nFprs fprs) -@@ -1868,14 +1869,14 @@ genCCall' dflags gcp target dest_regs args - -- The 32bit PowerOPEN ABI is happy with - -- 32bit-alignment as well... - stackOffset -- GCPLinux -+ GCP32ELF - -- ... the SysV ABI requires 8-byte - -- alignment for doubles. - | isFloatType rep && typeWidth rep == W64 -> - roundTo 8 stackOffset - | otherwise -> - stackOffset -- GCPLinux64ELF _ -> -+ GCP64ELF _ -> - -- Everything on the stack is mapped to - -- 8-byte aligned doublewords - stackOffset -@@ -1886,7 +1887,7 @@ genCCall' dflags gcp target dest_regs args - -- "Single precision floating point values - -- are mapped to the second word in a single - -- doubleword" -- GCPLinux64ELF 1 -> stackOffset' + 4 -+ GCP64ELF 1 -> stackOffset' + 4 - _ -> stackOffset' - | otherwise = stackOffset' - -@@ -1925,7 +1926,7 @@ genCCall' dflags gcp target dest_regs args - FF64 -> (2, 1, 8, fprs) - II64 -> panic "genCCall' passArguments II64" - FF80 -> panic "genCCall' passArguments FF80" -- GCPLinux -> -+ GCP32ELF -> - case cmmTypeFormat rep of - II8 -> (1, 0, 4, gprs) - II16 -> (1, 0, 4, gprs) -@@ -1935,7 +1936,7 @@ genCCall' dflags gcp target dest_regs args - FF64 -> (0, 1, 8, fprs) - II64 -> panic "genCCall' passArguments II64" - FF80 -> panic "genCCall' passArguments FF80" -- GCPLinux64ELF _ -> -+ GCP64ELF _ -> - case cmmTypeFormat rep of - II8 -> (1, 0, 8, gprs) - II16 -> (1, 0, 8, gprs) ---- CodeGen.hs.orig 2018-09-16 22:53:54.000000000 +0200 ---- libraries/ghci/GHCi/InfoTable.hsc.orig 2019-07-06 09:00:10.880579000 +0200 -+++ libraries/ghci/GHCi/InfoTable.hsc 2019-07-06 08:59:23.613439000 +0200 -@@ -77,7 +77,7 @@ data Arch = ArchSPARC - | ArchARM - | ArchARM64 - | ArchPPC64 -- | ArchPPC64LE -+ | ArchPPC64_ELFv2 - | ArchUnknown - deriving Show - -@@ -99,8 +99,8 @@ platform = - ArchARM64 - #elif defined(powerpc64_HOST_ARCH) - ArchPPC64 --#elif defined(powerpc64le_HOST_ARCH) -- ArchPPC64LE -+#elif defined(_CALL_ELF) && (_CALL_ELF == 2) -+ ArchPPC64_ELFv2 - #else - # if defined(TABLES_NEXT_TO_CODE) - # error Unimplemented architecture -@@ -252,7 +252,7 @@ mkJumpToAddr a = case platform of - 0xE96C0010, - 0x4E800420] - -- ArchPPC64LE -> -+ ArchPPC64_ELFv2 -> - -- The ABI requires r12 to point to the function's entry point. - -- We use the medium code model where code resides in the first - -- two gigabytes, so loading a non-negative32 bit address ---- rts/StgCRun.c.orig 2019-04-07 21:39:58.000000000 +0200 -+++ rts/StgCRun.c 2019-07-06 08:57:54.735161000 +0200 -@@ -747,9 +747,8 @@ StgRunIsImplementedInAssembler(void) - Everything is in assembler, so we don't have to deal with GCC... - -------------------------------------------------------------------------- */ - --#if defined(powerpc64_HOST_ARCH) -+#if defined(_CALL_ELF) && (_CALL_ELF == 1) - --#if defined(linux_HOST_OS) - static void GNUC3_ATTRIBUTE(used) - StgRunIsImplementedInAssembler(void) - { -@@ -871,13 +870,9 @@ StgRunIsImplementedInAssembler(void) - : : "i"(RESERVED_C_STACK_BYTES+304 /*stack frame size*/)); - } - --#else // linux_HOST_OS --#error Only Linux support for power64 right now. - #endif - --#endif -- --#if defined(powerpc64le_HOST_ARCH) -+#if defined(_CALL_ELF) && (_CALL_ELF == 2) - /* ----------------------------------------------------------------------------- - PowerPC 64 little endian architecture - ---- rts/StgCRunAsm.S.orig 2018-06-12 22:33:31.000000000 +0200 -+++ rts/StgCRunAsm.S 2019-07-06 13:29:26.837367000 +0200 -@@ -1,8 +1,7 @@ - #include "ghcconfig.h" - #include "rts/Constants.h" - --#if defined(powerpc64le_HOST_ARCH) --# ifdef linux_HOST_OS -+#if defined(_CALL_ELF) && (_CALL_ELF == 2) - # define STACK_FRAME_SIZE RESERVED_C_STACK_BYTES+304 - .file "StgCRun.c" - .abiversion 2 -@@ -13,6 +12,8 @@ - .hidden StgRun - .type StgRun,@function - StgRun: -+ addis %r2, %r12, .TOC.-StgRun@ha -+ addi %r2, %r2, .TOC.-StgRun@l - .localentry StgRun,.-StgRun - mflr 0 - mr 5, 1 -@@ -108,9 +109,6 @@ StgReturn: - blr - - .section .note.GNU-stack,"",@progbits --# else // linux_HOST_OS --# error Only Linux support for power64 little endian right now. --# endif - - #elif defined(powerpc_HOST_ARCH) - # if defined(aix_HOST_OS) Property changes on: head/lang/ghc/files865/patch-ppc64 ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/lang/ghc/files865/wrap.c =================================================================== --- head/lang/ghc/files865/wrap.c (revision 545122) +++ head/lang/ghc/files865/wrap.c (nonexistent) @@ -1,55 +0,0 @@ -/* -*- ugly-hack-mode -*- */ -/* $FreeBSD$ */ - -#include - -struct old_dirent; -struct old_stat; - -__asm(".symver old_readdir_r, readdir_r@FBSD_1.0"); -int old_readdir_r(void *dirp, struct old_dirent *entry, - struct old_dirent **result); -__asm(".symver old_stat, stat@FBSD_1.0"); -int old_stat(const char * restrict path, struct old_stat * restrict sb); -__asm(".symver old_lstat, lstat@FBSD_1.0"); -int old_lstat(const char * restrict path, struct old_stat * restrict sb); -__asm(".symver old_fstat, fstat@FBSD_1.0"); -int old_fstat(int fd, struct old_stat *sb); -__asm(".symver old_mknod, mknod@FBSD_1.0"); -int old_mknod(const char *path, mode_t mode, uint32_t dev); - -int -__wrap_readdir_r(void *dirp, struct old_dirent *entry, - struct old_dirent **result) -{ - - return (old_readdir_r(dirp, entry, result)); -} - -int -__wrap_stat(const char * restrict path, struct old_stat * restrict sb) -{ - - return (old_stat(path, sb)); -} - -int -__wrap_lstat(const char * restrict path, struct old_stat * restrict sb) -{ - - return (old_lstat(path, sb)); -} - -int -__wrap_fstat(int fd, struct old_stat *sb) -{ - - return (old_fstat(fd, sb)); -} - -int -__wrap_mknod(const char *path, mode_t mode, uint32_t dev) -{ - - return (old_mknod(path, mode, dev)); -} Property changes on: head/lang/ghc/files865/wrap.c ___________________________________________________________________ Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:keywords ## -1 +0,0 ## -FreeBSD=%H \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/lang/ghc/files865/patch-libraries__Cabal__Cabal__Distribution__Simple__Program__Builtin.hs =================================================================== --- head/lang/ghc/files865/patch-libraries__Cabal__Cabal__Distribution__Simple__Program__Builtin.hs (revision 545122) +++ head/lang/ghc/files865/patch-libraries__Cabal__Cabal__Distribution__Simple__Program__Builtin.hs (nonexistent) @@ -1,39 +0,0 @@ ---- libraries/Cabal/Cabal/Distribution/Simple/Program/Builtin.hs.orig 2017-11-28 16:40:34 UTC -+++ libraries/Cabal/Cabal/Distribution/Simple/Program/Builtin.hs -@@ -59,6 +59,8 @@ import Distribution.Compat.Exception - import Distribution.Verbosity - import Distribution.Version - -+import System.FilePath (takeDirectory) -+ - import qualified Data.Map as Map - - -- ------------------------------------------------------------ -@@ -265,11 +267,13 @@ alexProgram = (simpleProgram "alex") { - - gccProgram :: Program - gccProgram = (simpleProgram "gcc") { -- programFindVersion = findProgramVersion "-dumpversion" id -- } -+ programFindLocation = \v p -> findProgramOnSearchPath v p "%%CC%%" -+} - - arProgram :: Program --arProgram = simpleProgram "ar" -+arProgram = (simpleProgram "ar") { -+ programFindLocation = \v p -> findProgramOnSearchPath v p "%%AR%%" -+} - - stripProgram :: Program - stripProgram = (simpleProgram "strip") { -@@ -337,7 +341,9 @@ greencardProgram :: Program - greencardProgram = simpleProgram "greencard" - - ldProgram :: Program --ldProgram = simpleProgram "ld" -+ldProgram = (simpleProgram "ld") { -+ programFindLocation = \v p -> findProgramOnSearchPath v p "%%LD%%" -+ } - - tarProgram :: Program - tarProgram = (simpleProgram "tar") { Property changes on: head/lang/ghc/files865/patch-libraries__Cabal__Cabal__Distribution__Simple__Program__Builtin.hs ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/lang/ghc/files865/patch-utils_iserv_ghc.mk =================================================================== --- head/lang/ghc/files865/patch-utils_iserv_ghc.mk (revision 545122) +++ head/lang/ghc/files865/patch-utils_iserv_ghc.mk (nonexistent) @@ -1,11 +0,0 @@ ---- utils/iserv/ghc.mk.orig 2020-03-23 22:25:01 UTC -+++ utils/iserv/ghc.mk -@@ -31,7 +31,7 @@ endif - # of overhead to startup and increases the binary sizes) but if you - # need it there's no alternative. - ifeq "$(TargetElf)" "YES" --ifneq "$(TargetOS_CPP)" "solaris2" -+ifeq "$(findstring $(TargetOS_CPP), solaris2 freebsd)" "" - # The Solaris linker does not support --export-dynamic option. It also - # does not need it since it exports all dynamic symbols by default - utils/iserv_stage2_MORE_HC_OPTS += -optl-Wl,--export-dynamic Property changes on: head/lang/ghc/files865/patch-utils_iserv_ghc.mk ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/lang/ghc/files865/patch-ghc.mk =================================================================== --- head/lang/ghc/files865/patch-ghc.mk (revision 545122) +++ head/lang/ghc/files865/patch-ghc.mk (nonexistent) @@ -1,11 +0,0 @@ ---- ghc.mk.orig 2018-09-16 20:53:54 UTC -+++ ghc.mk -@@ -96,6 +96,7 @@ endif - # Catch make if it runs away into an infinite loop - ifeq "$(MAKE_RESTARTS)" "" - else ifeq "$(MAKE_RESTARTS)" "1" -+else ifeq "$(MAKE_RESTARTS)" "2" - else - $(error Make has restarted itself $(MAKE_RESTARTS) times; is there a makefile bug? See http://ghc.haskell.org/trac/ghc/wiki/Building/Troubleshooting#Makehasrestarteditself3timesisthereamakefilebug for details) - endif - Property changes on: head/lang/ghc/files865/patch-ghc.mk ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/lang/ghc/Makefile =================================================================== --- head/lang/ghc/Makefile (revision 545122) +++ head/lang/ghc/Makefile (revision 545123) @@ -1,328 +1,295 @@ # Created by: Simon Marlow # $FreeBSD$ PORTNAME= ghc PORTVERSION= ${GHC_VERSION} CATEGORIES= lang haskell MASTER_SITES= https://www.haskell.org/ghc/dist/${PORTVERSION}/:source \ LOCAL/arrowd/:boot \ https://hackage.haskell.org/package/hscolour-${HSCOLOUR_VERSION}/:docs DISTFILES= ghc-${PORTVERSION}-src${EXTRACT_SUFX}:source \ hscolour-${HSCOLOUR_VERSION}.tar.gz:docs EXTRACT_ONLY= ${_DISTFILES:C/hscolour.*$//g} MAINTAINER= haskell@FreeBSD.org COMMENT= Compiler for the functional language Haskell LICENSE= BSD3CLAUSE LICENSE_FILE= ${WRKSRC}/LICENSE -# other supported arches are added based on GHC_VERSION below -ONLY_FOR_ARCHS= amd64 i386 +ONLY_FOR_ARCHS= amd64 i386 aarch64 armv6 armv7 powerpc64 USES= autoreconf compiler:c11 gmake iconv:translit \ localbase:ldflags ncurses perl5 tar:xz USE_LOCALE= en_US.UTF-8 USE_PERL5= build GNU_CONFIGURE= yes CONFIGURE_ARGS= --with-iconv-includes=${LOCALBASE}/include \ --with-iconv-libraries=${LOCALBASE}/lib CONFIGURE_ENV= CC=${CC} LD=${LD} PATH=${SLAVES_PREFIX}/bin:${PATH} MAKE_ENV= PATH=${SLAVES_PREFIX}/bin:${PATH} SUB_FILES= build.mk SUB_LIST= GHC_VERSION=${GHC_VERSION} \ NCURSESINC="${NCURSESBASE}/include" NCURSESLIB="${NCURSESLIB}" \ CFLAGS="${CFLAGS}" OPTIONS_GROUP= BOOTSTRAP BOOTSTRAP_DESC= Bootsrap using installed ghc OPTIONS_GROUP_BOOTSTRAP=BOOT OPTIONS_DEFINE= DYNAMIC GMP PROFILE DOCS OPTIONS_SUB= yes OPTIONS_DEFAULT= DYNAMIC PROFILE GMP BOOT_DESC= Use installed GHC for bootstrapping DOCS_DESC= Install HTML documentation DYNAMIC_DESC= Add support for dynamic linking GMP_DESC= Use GNU Multi-precision Library for big integers support PROFILE_DESC= Add support for performance profiling DOCS_BUILD_DEPENDS= sphinx-build:textproc/py-sphinx DYNAMIC_CONFIGURE_WITH= system-libffi \ ffi-includes=${LOCALBASE}/include \ ffi-libraries=${LOCALBASE}/lib DYNAMIC_LIB_DEPENDS= libffi.so:devel/libffi DYNAMIC_SUB_LIST= WITH_DYNAMIC="YES" DYNAMIC_SUB_LIST_OFF= WITH_DYNAMIC="NO" GMP_CONFIGURE_WITH= gmp-includes=${LOCALBASE}/include \ gmp-libraries=${LOCALBASE}/lib GMP_LIB_DEPENDS= libgmp.so:math/gmp GMP_SUB_LIST= INTEGER_LIBRARY="integer-gmp" GMP_SUB_LIST_OFF= INTEGER_LIBRARY="integer-simple" # Append substitutions for build.mk BOOT_SUB_LIST= HSC2HS=${LOCALBASE}/bin/hsc2hs BOOT_SUB_LIST_OFF= HSC2HS=${BOOT_HSC2HS} PROFILE_SUB_LIST= WITH_PROFILE="YES" PROFILE_SUB_LIST_OFF= WITH_PROFILE="NO" +PLIST_SUB= GHC_VERSION=${GHC_VERSION} GHC_LIBDIR=${GHC_LIBDIR_REL} + GHC_VERSION?= ${GHC_VERSION_DEFAULT} GHC_VERSION_DEFAULT= 8.10.1 GHC_VERSION_MAJOR= ${GHC_VERSION:S/./ /g:[1]} GHC_VERSION_MINOR= ${GHC_VERSION:S/./ /g:[2]} HSCOLOUR_VERSION= 1.24.4 -.if ${GHC_VERSION_MAJOR} >= 8 && ${GHC_VERSION_MINOR} >= 6 -ONLY_FOR_ARCHS+= aarch64 armv6 armv7 powerpc64 -.endif +LLVM_VERSION= 90 +# LLVM version that bootstrap compiler uses +BOOT_LLVM_VERSION= 60 .include # This version of ncurses is needed by bootstrap compiler .if ${OSVERSION} > 1300078 && empty(PORT_OPTIONS:MBOOT) && ${ARCH} != powerpc64 BUILD_DEPENDS+= ${LOCALBASE}/lib/compat/libncursesw.so.8:misc/compat12x .endif -.if ${GHC_VERSION_MAJOR} == 8 && ${GHC_VERSION_MINOR} == 4 -LLVM_VERSION= 50 -# Turn off for old GHCs, see PR 228727 -CONFIGURE_ARGS+= --enable-dtrace=0 -.elif ${GHC_VERSION_MAJOR} == 8 && ${GHC_VERSION_MINOR} == 6 -LLVM_VERSION= 60 -.elif ${GHC_VERSION_MAJOR} == 8 && ${GHC_VERSION_MINOR} == 8 -LLVM_VERSION= 70 -.else # ghc 8.10 -LLVM_VERSION= 90 -.endif - .if ${ARCH} == powerpc64 CONFIGURE_ARGS+= --enable-dtrace=0 .endif .if ${ARCH} == i386 EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-libraries_ghc-prim_cbits_atomic.c .endif .if defined(PPC_ABI) && ${PPC_ABI} == ELFv1 BOOT_GHC_VERSION= 8.6.3 .else BOOT_GHC_VERSION= 8.6.5 .endif -# LLVM version that bootstrap compiler uses -BOOT_LLVM_VERSION= 60 -.if "${GHC_VERSION}" != "${GHC_VERSION_DEFAULT}" -PATCHDIR= ${.CURDIR}/files${GHC_VERSION:S/.//g}/ -.endif - NO_CCACHE= ccache: error: Failed to create directory /nonexistent/.ccache/tmp: Permission denied DOCSDIR= ${PREFIX}/share/doc/${DISTNAME} DATADIR= ${PREFIX}/share/ghc-${GHC_VERSION} EXAMPLESDIR= ${PREFIX}/share/examples/ghc-${GHC_VERSION} GHC_ARCH= ${ARCH:S/amd64/x86_64/:C/armv.*/arm/} GHC_LIBDIR= ${STAGEDIR}${PREFIX}/lib/ghc-${GHC_VERSION} GHC_LIBDIR_REL= lib/ghc-${GHC_VERSION} _EXECUTABLES= ${GHC_LIBDIR}/bin/unlit \ ${GHC_LIBDIR}/bin/hpc \ ${GHC_LIBDIR}/bin/ghc-iserv \ ${GHC_LIBDIR}/bin/ghc-pkg \ ${GHC_LIBDIR}/bin/hsc2hs \ ${GHC_LIBDIR}/bin/runghc \ ${GHC_LIBDIR}/bin/ghc \ ${GHC_LIBDIR}/bin/haddock \ ${GHC_LIBDIR}/bin/hp2ps .if ${PORT_OPTIONS:MPROFILE} _EXECUTABLES+= ${GHC_LIBDIR}/bin/ghc-iserv-prof .endif .if ${PORT_OPTIONS:MDYNAMIC} _EXECUTABLES+= ${GHC_LIBDIR}/bin/ghc-iserv-dyn .endif .include .if empty(PORT_OPTIONS:MBOOT) BOOTSTRAPS_SUFFIX?= ${BOOTSTRAPS_SUFFIX_${ARCH}} BOOTSTRAPS_SUFFIX_powerpc64?= -${PPC_ABI:tl} . if ${OSVERSION} < 1200000 && (${ARCH} == amd64 || ${ARCH} == i386) ELEVEN_SUFX= 11 . endif DISTFILES+= ghc-${BOOT_GHC_VERSION}-boot-${ARCH}-freebsd${BOOTSTRAPS_SUFFIX}${ELEVEN_SUFX}${EXTRACT_SUFX}:boot .endif # MBOOT .if ${ARCH} == aarch64 || ${ARCH} == armv6 || ${ARCH} == armv7 # CONFIGURE_TARGET must to be the same as the llvm triple CONFIGURE_TARGET= ${ARCH}-unknown-freebsd${"${ARCH:Maarch64}" != "":?:-gnueabihf} EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-aclocal.m4 BUILD_DEPENDS+= llc${LLVM_VERSION}:devel/llvm${LLVM_VERSION} RUN_DEPENDS+= llc${LLVM_VERSION}:devel/llvm${LLVM_VERSION} # When GHC being compiled and GHC used for bootstrapping support different # LLVM versions, we have to pull in both. Luckily, this is relatively rare. . if ${BOOT_LLVM_VERSION} != ${LLVM_VERSION} BUILD_DEPENDS+= llc${BOOT_LLVM_VERSION}:devel/llvm${BOOT_LLVM_VERSION} RUN_DEPENDS+= llc${BOOT_LLVM_VERSION}:devel/llvm${BOOT_LLVM_VERSION} . endif .endif .if ${ARCH} == aarch64 || ${ARCH} == armv6 || ${ARCH} == armv7 || ${ARCH} == powerpc64 . if ${OSVERSION} < 1201000 IGNORE= lang/ghc requires at least FreeBSD 12.1-RELEASE . endif . ifdef QEMU_EMULATING IGNORE= qemu-user-static isn't able to build lang/ghc, but it builds fine on a real hardware . endif .endif -PLIST_SUB+= GHC_VERSION=${GHC_VERSION} GHC_LIBDIR=${GHC_LIBDIR_REL} - -.if ${GHC_VERSION_MAJOR} <= 8 && ${GHC_VERSION_MINOR} < 8 -WITH_GHC= --with-ghc -.else -WITH_GHC= GHC -.endif - .if empty(PORT_OPTIONS:MBOOT) BOOT_DIR= ${WRKDIR}/ghc-${BOOT_GHC_VERSION}-boot BOOT_GHC= ${BOOT_DIR}/bin/ghc-${BOOT_GHC_VERSION} BOOT_GHC-PKG= ${BOOT_DIR}/bin/ghc-pkg-${BOOT_GHC_VERSION} BOOT_HSC2HS= ${BOOT_DIR}/bin/hsc2hs SLAVE_ENV= ${SETENV} PATH=${BOOT_DIR}/bin:${PATH} -CONFIGURE_ARGS+= ${WITH_GHC}=${BOOT_GHC} +CONFIGURE_ARGS+= GHC=${BOOT_GHC} .else # MBOOT SLAVE_ENV= # empty -CONFIGURE_ARGS+= ${WITH_GHC}=${LOCALBASE}/bin/ghc +CONFIGURE_ARGS+= GHC=${LOCALBASE}/bin/ghc .endif # MBOOT -# override TMPDIR because /tmp often doesn't have enough space -# to build some of the larger libraries. -#TMPDIR= ${WRKSRC}/tmp - SLAVES_PREFIX= ${WRKDIR}/slaves_prefix SLAVES_WRKDIRPREFIX= ${WRKDIR}/slaves_wrkdirprefix # %%PORTDOCS%%%%DOCSDIR%%/html/libraries/doc-index-V.html post-install-script: ${FIND} -ds ${GHC_LIBDIR} -type f -print | ${SED} -E \ -e 's,^${STAGEDIR}${PREFIX}/?,,' \ -e '/^${GHC_LIBDIR:C/\//\\\//g}\/package.conf.d\/package\.cache/s|^|@comment |g' \ >> ${TMPPLIST} .if ${PORT_OPTIONS:MDOCS} ${FIND} -ds ${STAGEDIR}${DOCSDIR} -type f -print | ${SED} -E \ -e 's,^${STAGEDIR}${PREFIX}/?,,' \ -e '/^${STAGEDIR:C/\//\\\//g}${DOCSDIR:C/\//\\\//g}\/html\/libraries\/doc-index-[^.]+\.html/s|^|@comment |g' \ -e '/^${STAGEDIR:C/\//\\\//g}${DOCSDIR:C/\//\\\//g}\/html\/libraries\/index[^\/.]*\.html/s|^|@comment|g' \ -e '/^${STAGEDIR:C/\//\\\//g}${DOCSDIR:C/\//\\\//g}\/html\/libraries\/[^\/]+\.png/s|^|@comment |g' \ >> ${TMPPLIST} # Cleanup the indexen created by gen_contents_index ${ECHO} "@postunexec ${RM} %D/${DOCSDIR_REL}/html/libraries/doc-index-*.html" >> ${TMPPLIST} ${ECHO} "@postunexec ${RM} %D/${DOCSDIR_REL}/html/libraries/index*.html" >> ${TMPPLIST} ${ECHO} "@postunexec ${RM} %D/${DOCSDIR_REL}/html/libraries/*.png" >> ${TMPPLIST} .endif ${ECHO} '@postunexec ${RM} %D/${GHC_LIBDIR_REL}/package.conf.d/package.cache' >>${TMPPLIST} post-patch: @${REINPLACE_CMD} -e 's|%%CC%%|${CC}|; \ s|%%AR%%|${AR}|; \ s|%%LD%%|${LD}|' \ ${WRKSRC}/libraries/Cabal/Cabal/Distribution/Simple/Program/Builtin.hs -.if ${GHC_VERSION_MAJOR} <= 8 && ${GHC_VERSION_MINOR} < 10 - @${REINPLACE_CMD} -e 's/@SettingsLlcCommand@/llc${LLVM_VERSION}/' ${WRKSRC}/settings.in - @${REINPLACE_CMD} -e 's/@SettingsOptCommand@/opt${LLVM_VERSION}/' ${WRKSRC}/settings.in -.endif .if empty(PORT_OPTIONS:MBOOT) @${REINPLACE_CMD} -e '/^mandir/d' ${BOOT_DIR}/mk/build.mk @${REINPLACE_CMD} -e '/^infodir/d' ${BOOT_DIR}/mk/build.mk @${REINPLACE_CMD} -e '/^docdir/d' ${BOOT_DIR}/mk/build.mk @${REINPLACE_CMD} -e '/^htmldir/d' ${BOOT_DIR}/mk/build.mk .endif .if ${ARCH} == powerpc64 && ${PPC_ABI} == ELFv2 @${REINPLACE_CMD} -e 's/ELF_V1/ELF_V2/' \ ${WRKSRC}/configure ${WRKSRC}/aclocal.m4 .endif pre-configure: apply-slist # Copy the subbed build.mk to the proper position ${CP} ${WRKDIR}/build.mk ${WRKSRC}/mk/build.mk # If we are using bootstrap compiler, configure and install it into ${BOOT_DIR} .if empty(PORT_OPTIONS:MBOOT) cd ${BOOT_DIR} && ${CONFIGURE_ENV} ${CONFIGURE_CMD} --prefix=${BOOT_DIR} cd ${BOOT_DIR} && PACKAGES='' ${MAKE_CMD} install .else # otherwise, make sure we have "ghc" in PATH if ! ${WHICH} -s ghc ; then \ echo "No 'ghc' executable is found in your PATH! Turn off BOOT option." ; false ; \ fi .endif # If DOCS are set, install HsColour in-place .if ${PORT_OPTIONS:MDOCS} ${MKDIR} ${SLAVES_PREFIX} ${MKDIR} ${SLAVES_WRKDIRPREFIX} cd ${SLAVES_WRKDIRPREFIX} && \ ${TAR} xvf ${DISTDIR}/hscolour-${HSCOLOUR_VERSION}.tar.gz && \ cd hscolour-${HSCOLOUR_VERSION} && \ ${SLAVE_ENV} ghc --make -o Setup Setup.hs -package Cabal && \ ${SLAVE_ENV} ./Setup configure --ghc --prefix=${SLAVES_PREFIX} --with-gcc=${CC} --with-ld=${LD} && \ ${SLAVE_ENV} ./Setup build && \ ${SLAVE_ENV} ./Setup install .endif post-install: (for f in ${_EXECUTABLES} $$(${FIND} ${GHC_LIBDIR} -name '*.so*'); do \ ${STRIP_CMD} $$f; done) ${RM} ${STAGEDIR}${PREFIX}/bin/haddock # Create a bootstrap compiler tar ball: run this in an interactive poudriere jail .PHONY: create-bootstrap create-bootstrap: cd ${WRKSRC} \ && ${ECHO} "BIN_DIST_NAME=ghc-${GHC_VERSION}-boot" >> mk/build.mk \ && ${ECHO} "BIN_DIST_TAR=ghc-${GHC_VERSION}-boot.tar" >> mk/build.mk \ && ${ECHO} "HADDOCK_DOCS=NO" >> mk/build.mk \ && ${GMAKE} binary-dist TAR_COMP=xz \ && ${MV} ${WRKSRC}/ghc-${GHC_VERSION}-boot-${GHC_ARCH}-portbld-freebsd.tar.xz /tmp/ghc-${GHC_VERSION}-boot-${ARCH}-freebsd.tar.xz cd /tmp \ && sha256 ghc-${GHC_VERSION}-boot-${ARCH}-freebsd.tar.xz \ && ${ECHO} -n "SIZE (ghc-${GHC_VERSION}-boot-${ARCH}-freebsd.tar.xz) = " \ && ${STAT} -f %z ghc-${GHC_VERSION}-boot-${ARCH}-freebsd.tar.xz # Much like create-bootstrap, just different naming and output format .PHONY: create-stack-bindist create-stack-bindist: ${REINPLACE_CMD} -e '/^mandir/d' \ -e '/^infodir/d' \ -e '/^docdir/d' \ -e '/^htmldir/d' \ ${WRKSRC}/mk/build.mk cd ${WRKSRC} \ && ${GMAKE} binary-dist TAR_COMP=xz \ && ${MV} ${WRKSRC}/ghc-${GHC_VERSION}-${GHC_ARCH}-portbld-freebsd.tar.xz /tmp/ cd /tmp \ && ${ECHO} "${GHC_VERSION}:" \ && ${ECHO} "url: \"http://distcache.FreeBSD.org/local-distfiles/arrowd/stack-bindists/ghc-${GHC_VERSION}-${GHC_ARCH}-portbld-freebsd.tar.xz\"" \ && ${ECHO} -n "content-length: " \ && ${STAT} -f %z ghc-${GHC_VERSION}-${GHC_ARCH}-portbld-freebsd.tar.xz \ && ${ECHO} -n "sha1: " \ && sha1 -q ghc-${GHC_VERSION}-${GHC_ARCH}-portbld-freebsd.tar.xz \ && ${ECHO} -n "sha256: " \ && sha256 -q ghc-${GHC_VERSION}-${GHC_ARCH}-portbld-freebsd.tar.xz .include Index: head/lang/ghc/distinfo =================================================================== --- head/lang/ghc/distinfo (revision 545122) +++ head/lang/ghc/distinfo (revision 545123) @@ -1,35 +1,23 @@ TIMESTAMP = 1588674714 SHA256 (ghc-8.10.1-src.tar.xz) = 4e3b07f83a266b3198310f19f71e371ebce97c769b14f0d688f4cbf2a2a1edf5 SIZE (ghc-8.10.1-src.tar.xz) = 19781652 -SHA256 (ghc-8.6.5-src.tar.xz) = 4d4aa1e96f4001b934ac6193ab09af5d6172f41f5a5d39d8e43393b9aafee361 -SIZE (ghc-8.6.5-src.tar.xz) = 19092168 -SHA256 (ghc-8.6.4-src.tar.xz) = 5b5d07e4463203a433c3ed3df461ba6cce11b6d2b9b264db31f3429075d0303a -SIZE (ghc-8.6.4-src.tar.xz) = 19029904 -SHA256 (ghc-8.6.3-src.tar.xz) = 9f9e37b7971935d88ba80426c36af14b1e0b3ec1d9c860f44a4391771bc07f23 -SIZE (ghc-8.6.3-src.tar.xz) = 19138116 -SHA256 (ghc-8.6.2-src.tar.xz) = caaa819d21280ecde90a4773143dee188711e9ff175a27cfbaee56eb851d76d5 -SIZE (ghc-8.6.2-src.tar.xz) = 19024236 -SHA256 (ghc-8.4.4-src.tar.xz) = 11117735a58e507c481c09f3f39ae5a314e9fbf49fc3109528f99ea7959004b2 -SIZE (ghc-8.4.4-src.tar.xz) = 11319500 -SHA256 (ghc-8.4.3-src.tar.xz) = ae47afda985830de8811243255aa3744dfb9207cb980af74393298b2b62160d6 -SIZE (ghc-8.4.3-src.tar.xz) = 11315068 SHA256 (ghc-8.6.5-boot-amd64-freebsd.tar.xz) = aeaf8c0fee0d83de5088aa7ab92e92ee6999b4830e01e33bf3dd450b115c0208 SIZE (ghc-8.6.5-boot-amd64-freebsd.tar.xz) = 70213260 SHA256 (ghc-8.6.5-boot-i386-freebsd.tar.xz) = 47cc24cdcfa19601bb81a7f5660d1d72fec1110119e8ffe1daa0cddc7959206f SIZE (ghc-8.6.5-boot-i386-freebsd.tar.xz) = 67522080 SHA256 (ghc-8.6.5-boot-amd64-freebsd11.tar.xz) = 07d4c54a70900128e24b5dd9b22d929ddcf530d911a8be93e694cd9a721f458a SIZE (ghc-8.6.5-boot-amd64-freebsd11.tar.xz) = 68965716 SHA256 (ghc-8.6.5-boot-i386-freebsd11.tar.xz) = cd208fbb6b2a158ff8c5d6227e0babd8c224867ea301abf970dc446f04c9e95f SIZE (ghc-8.6.5-boot-i386-freebsd11.tar.xz) = 67439136 SHA256 (ghc-8.6.5-boot-aarch64-freebsd.tar.xz) = 63d461161c87132a3c3d3683c4995f4209e139fe719a25e551a600412c11aa3e SIZE (ghc-8.6.5-boot-aarch64-freebsd.tar.xz) = 136306580 SHA256 (ghc-8.6.5-boot-armv6-freebsd.tar.xz) = 1fe5f4f5d1bfec5d45b0f92101b5be818b221c730655a4f1b31ecbb8382b7108 SIZE (ghc-8.6.5-boot-armv6-freebsd.tar.xz) = 136889664 SHA256 (ghc-8.6.5-boot-armv7-freebsd.tar.xz) = ce4bc7fd20bb420963081171e483beb7387f9704323f7c03e36bbf3bf68a00ea SIZE (ghc-8.6.5-boot-armv7-freebsd.tar.xz) = 135237856 SHA256 (ghc-8.6.5-boot-powerpc64-freebsd-elfv2.tar.xz) = 89dfbfab84aef489ca9d0ff6fdf97152cff2412f6a8b9b1e57025b2019908318 SIZE (ghc-8.6.5-boot-powerpc64-freebsd-elfv2.tar.xz) = 113782560 SHA256 (ghc-8.6.3-boot-powerpc64-freebsd-elfv1.tar.xz) = fb9bd4bad3a54722b7012c0a531cbdfe71b3b20a0b92cbd52195a526dc5ccde4 SIZE (ghc-8.6.3-boot-powerpc64-freebsd-elfv1.tar.xz) = 112652192 SHA256 (hscolour-1.24.4.tar.gz) = 243332b082294117f37b2c2c68079fa61af68b36223b3fc07594f245e0e5321d SIZE (hscolour-1.24.4.tar.gz) = 28729