[Git][ghc/ghc][ghc-9.4] 8 commits: gitlab-ci: Bump Docker images

Ben Gamari (@bgamari) gitlab at gitlab.haskell.org
Sun Aug 7 20:31:17 UTC 2022



Ben Gamari pushed to branch ghc-9.4 at Glasgow Haskell Compiler / GHC


Commits:
d1558383 by Ben Gamari at 2022-08-05T11:46:40-04:00
gitlab-ci: Bump Docker images

To give the ARMv7 job access to lld, fixing #21875.

- - - - -
d24765e4 by Ben Gamari at 2022-08-05T12:53:40-04:00
codeGen/X86: Don't clobber switch variable in switch generation

Previously ce8745952f99174ad9d3bdc7697fd086b47cdfb5 assumed that it was
safe to clobber the switch variable when generating code for a jump
table since we were at the end of a block. However, this assumption is
wrong; the register could be live in the jump target.

Fixes #21968.

(cherry picked from commit b4342e32823bb0bfc8e83b53055647d64e0431ab)

- - - - -
69db7406 by Ben Gamari at 2022-08-06T16:32:09-04:00
users-guide: Mention representation change of Word64 and Int64

Closes #21641.

- - - - -
f08a73a0 by Ben Gamari at 2022-08-06T16:32:09-04:00
make: Fix too-old bootstrap compiler error

- - - - -
669fd338 by Ben Gamari at 2022-08-06T16:32:09-04:00
hadrian: Fix binary distribution install attributes

Previously we would use plain `cp` to install various parts of the
binary distribution. However, `cp`'s behavior w.r.t. file attributes is
quite unclear; for this reason it is much better to rather use
`install`.

Fixes #21965.

(cherry picked from commit 4d8e0fd3fe3d648c6d37b3eb43b89e1bdbef36af)

- - - - -
cc715935 by Ben Gamari at 2022-08-06T16:32:09-04:00
hadrian: Fix installation of system-cxx-std-lib package conf

(cherry picked from commit 119ee22dd09d8977de67939de7324af941ae7196)

- - - - -
cb320017 by Ben Gamari at 2022-08-06T22:58:44-04:00
hadrian: Extend xattr Darwin hack to cover /lib

As noted in #21506, it is now necessary to remove extended attributes
from `/lib` as well as `/bin` to avoid SIP issues on Darwin.

Fixes #21506.

(cherry picked from commit a30ef212790e41ba01f92f24e3be4d645502d9ee)

- - - - -
6d01245c by Ben Gamari at 2022-08-06T22:58:44-04:00
Bump haddock submodule

- - - - -


8 changed files:

- .gitlab-ci.yml
- compiler/GHC/CmmToAsm/X86/CodeGen.hs
- distrib/configure.ac.in
- docs/users_guide/9.4.1-notes.rst
- ghc.mk
- hadrian/bindist/Makefile
- libraries/base/changelog.md
- utils/haddock


Changes:

=====================================
.gitlab-ci.yml
=====================================
@@ -2,7 +2,7 @@ variables:
   GIT_SSL_NO_VERIFY: "1"
 
   # Commit of ghc/ci-images repository from which to pull Docker images
-  DOCKER_REV: 0849567cd9780cc8e9652118b949cb050c632ef4
+  DOCKER_REV: 58d08589371e78829a3279c6f8b1241e155d7f70
 
   # Sequential version number of all cached things.
   # Bump to invalidate GitLab CI cache.


=====================================
compiler/GHC/CmmToAsm/X86/CodeGen.hs
=====================================
@@ -2922,11 +2922,12 @@ genSwitch expr targets = do
           else do
             -- See Note [%rip-relative addressing on x86-64].
             tableReg <- getNewRegNat (intFormat (platformWordWidth platform))
+            targetReg <- getNewRegNat (intFormat (platformWordWidth platform))
             let op = OpAddr (AddrBaseIndex (EABaseReg tableReg) (EAIndex reg (platformWordSizeInBytes platform)) (ImmInt 0))
                 code = e_code `appOL` toOL
                     [ LEA (archWordFormat is32bit) (OpAddr (AddrBaseIndex EABaseRip EAIndexNone (ImmCLbl lbl))) (OpReg tableReg)
-                    , MOV (archWordFormat is32bit) op (OpReg reg)
-                    , JMP_TBL (OpReg reg) ids (Section ReadOnlyData lbl) lbl
+                    , MOV (archWordFormat is32bit) op (OpReg targetReg)
+                    , JMP_TBL (OpReg targetReg) ids (Section ReadOnlyData lbl) lbl
                     ]
             return code
   where


=====================================
distrib/configure.ac.in
=====================================
@@ -79,6 +79,7 @@ AC_PATH_PROG(SedCmd,gsed sed,sed)
 
 dnl ** check for Python for testsuite driver
 FIND_PYTHON
+FP_PROG_FIND
 
 XCODE_VERSION()
 


=====================================
docs/users_guide/9.4.1-notes.rst
=====================================
@@ -40,6 +40,11 @@ upgrading to GHC 9.4:
   report warnings where it previously did not. In such cases the correct
   solution is generally to remove the ``hs-boot`` file in question.
 
+- The boxed ``Word64`` and ``Int64`` types are now internally represented by
+  the unboxed ``Word64#`` and ``Int64#`` primitive types, in contrast
+  previous releases where they were represented by ``Word#`` and ``Int#``
+  on 64-bit platforms.
+
 - Due to various changes in the typechecker's constraint solver, some programs
   may need additional constraints to be explicitly provided. See the `Migration
   guide


=====================================
ghc.mk
=====================================
@@ -136,7 +136,7 @@ ifeq "$(ProjectVersion)" ""
 $(error Please run ./configure first)
 endif
 ifneq "$(CanBootWithMake)" "YES"
-$(error The make build system requires a boot compiler older than ghc-9.2. Your boot compiler is too new and cannot be used to build ghc-9.4 with make. Either boot with ghc 9.0.2)
+$(error The make build system requires a boot compiler older than ghc-9.2. Your boot compiler is too new and cannot be used to build ghc-9.4 with make. Either boot with ghc 9.0.2 or build with hadrian. See https://www.haskell.org/ghc/blog/20220805-make-to-hadrian.html for advice on transitioning to hadrian.)
 endif
 endif
 


=====================================
hadrian/bindist/Makefile
=====================================
@@ -22,7 +22,8 @@ ifeq "$(Darwin_Host)" "YES"
 XATTR ?= /usr/bin/xattr
 endif
 
-define installscript
+# installscript
+#
 # $1 = package name
 # $2 = wrapper path
 # $3 = bindir
@@ -36,30 +37,32 @@ define installscript
 # to it. This implementation is a bit hacky and depends on consistency
 # of program names. For hadrian build this will work as programs have a
 # consistent naming procedure.
-	if [ -L 'wrappers/$1' ]; then echo "$1 is a symlink"; fi
-	@if [ -L 'wrappers/$1' ]; then \
-		cp -RP 'wrappers/$1' '$2'; \
-	else								 \
-		rm -f '$2' && 		 \
-		$(CREATE_SCRIPT) '$2' && \
-		echo "#!$(SHELL)" >>  '$2'  && \
-		echo "exedir=\"$4\"" >> '$2'  && \
-		echo "exeprog=\"$1\"" >> '$2'  && \
-		echo "executablename=\"$5\"" >> '$2'  && \
-		echo "bindir=\"$3\"" >> '$2'  && \
-		echo "libdir=\"$6\"" >> '$2'  && \
-		echo "docdir=\"$7\"" >> '$2'  && \
-		echo "includedir=\"$8\"" >> '$2'  && \
-		echo "" >> '$2'  && \
-		cat 'wrappers/$1' >> '$2'  && \
-		$(EXECUTABLE_FILE) '$2' ; \
+define installscript
+	echo "installscript $1 -> $2"
+	@if [ -L 'wrappers/$1' ]; then                \
+		$(CP) -P 'wrappers/$1' '$2' ;             \
+	else								          \
+		rm -f '$2' && 		                      \
+		$(CREATE_SCRIPT) '$2' &&                  \
+		echo "#!$(SHELL)" >>  '$2'  &&            \
+		echo "exedir=\"$4\"" >> '$2'  &&          \
+		echo "exeprog=\"$1\"" >> '$2'  &&         \
+		echo "executablename=\"$5\"" >> '$2'  &&  \
+		echo "bindir=\"$3\"" >> '$2'  &&          \
+		echo "libdir=\"$6\"" >> '$2'  &&          \
+		echo "docdir=\"$7\"" >> '$2'  &&          \
+		echo "includedir=\"$8\"" >> '$2'  &&      \
+		echo "" >> '$2'  &&                       \
+		cat 'wrappers/$1' >> '$2'  &&             \
+		$(EXECUTABLE_FILE) '$2' ;                 \
 	fi
 	@echo "$1 installed to $2"
 endef
 
+# patchpackageconf
+#
 # Hacky function to patch up the 'haddock-interfaces' and 'haddock-html'
 # fields in the package .conf files
-define patchpackageconf
 #
 # $1 = package name (ex: 'bytestring')
 # $2 = path to .conf file
@@ -67,16 +70,17 @@ define patchpackageconf
 # $4 = (relative) path from $${pkgroot} to docs directory ($3)
 # $5 = package name and version (ex: bytestring-0.13)
 #
-# We fix the paths to haddock files by using the relative path from the pkgroot
-# to the doc files.
+define patchpackageconf \
+	# We fix the paths to haddock files by using the relative path from the pkgroot
+	# to the doc files.
 	cat '$2' | sed 's|haddock-interfaces.*|haddock-interfaces: "$${pkgroot}/$4/html/libraries/$5/$1.haddock"|' \
 	         | sed 's|haddock-html.*|haddock-html: "$${pkgroot}/$4/html/libraries/$5"|' \
 		 | sed 's|    $${pkgroot}/../../doc/html/.*||' \
 	       > '$2.copy'
-# The rts package doesn't actually supply haddocks, so we stop advertising them
-# altogether.
+	# The rts package doesn't actually supply haddocks, so we stop advertising them
+	# altogether.
 	((echo "$1" | grep rts) && (cat '$2.copy' | sed 's|haddock-.*||' > '$2.copy.copy')) || (cat '$2.copy' > '$2.copy.copy')
-# We finally replace the original file.
+	# We finally replace the original file.
 	mv '$2.copy.copy' '$2'
 endef
 
@@ -171,7 +175,7 @@ install_bin_libdir:
 	@echo "Copying binaries to $(DESTDIR)$(ActualBinsDir)"
 	$(INSTALL_DIR) "$(DESTDIR)$(ActualBinsDir)"
 	for i in $(BINARIES); do \
-		cp -R $$i "$(DESTDIR)$(ActualBinsDir)"; \
+		$(INSTALL_PROGRAM) $$i "$(DESTDIR)$(ActualBinsDir)"; \
 	done
 	# Work around #17418 on Darwin
 	if [ -e "${XATTR}" ]; then "${XATTR}" -c -r "$(DESTDIR)$(ActualBinsDir)"; fi
@@ -179,24 +183,46 @@ install_bin_libdir:
 install_bin_direct:
 	@echo "Copying binaries to $(DESTDIR)$(WrapperBinsDir)"
 	$(INSTALL_DIR) "$(DESTDIR)$(WrapperBinsDir)"
-	cp ./bin/* "$(DESTDIR)$(WrapperBinsDir)/"
+	$(INSTALL_PROGRAM) ./bin/* "$(DESTDIR)$(WrapperBinsDir)/"
 
-LIBRARIES = $(wildcard ./lib/*)
 install_lib: lib/settings
 	@echo "Copying libraries to $(DESTDIR)$(ActualLibsDir)"
 	$(INSTALL_DIR) "$(DESTDIR)$(ActualLibsDir)"
-	for i in $(LIBRARIES); do \
-		cp -R $$i "$(DESTDIR)$(ActualLibsDir)/"; \
+	
+	@dest="$(DESTDIR)$(ActualLibsDir)"; \
+	cd lib; \
+	for i in `$(FIND) . -type f`; do \
+		$(INSTALL_DIR) "$$dest/`dirname $$i`" ; \
+		case $$i in \
+		  *.a) \
+		    $(INSTALL_DATA) $$i "$$dest/`dirname $$i`" ; \
+		    $(RANLIB_CMD) "$$dest"/$$i ;; \
+		  *.dll) \
+		    $(INSTALL_PROGRAM) $$i "$$dest/`dirname $$i`" ; \
+		    $(STRIP_CMD) "$$dest"/$$i ;; \
+		  *.so) \
+		    $(INSTALL_SHLIB) $$i "$$dest/`dirname $$i`" ;; \
+		  *.dylib) \
+		    $(INSTALL_SHLIB) $$i "$$dest/`dirname $$i`" ;; \
+		  *) \
+		    $(INSTALL_DATA) $$i "$$dest/`dirname $$i`" ;; \
+		esac; \
+	done; \
+	chmod ugo+rx "$$dest"/bin/*
+	for i in $(DOCS); do \
+		cp -R $$i "$(DESTDIR)$(docdir)/"; \
 	done
 
-DOCS = $(wildcard ./doc/*)
 install_docs:
 	@echo "Copying docs to $(DESTDIR)$(docdir)"
 	$(INSTALL_DIR) "$(DESTDIR)$(docdir)"
-	for i in $(DOCS); do \
-		cp -R $$i "$(DESTDIR)$(docdir)/"; \
-	done
+	cd doc; $(FIND) . -type f -exec sh -c \
+			'$(INSTALL_DIR) "$(DESTDIR)$(docdir)/`dirname $$1`" && \
+			 $(INSTALL_DATA) "$$1" "$(DESTDIR)$(docdir)/`dirname $$1`" \
+		' sh '{}' \;
+	
 	if [ -d docs-utils ]; then \
+		$(INSTALL_DIR) "$(DESTDIR)$(docdir)/html/libraries/"; \
 		$(INSTALL_DATA) docs-utils/prologue.txt "$(DESTDIR)$(docdir)/html/libraries/"; \
 		$(INSTALL_SCRIPT) docs-utils/gen_contents_index "$(DESTDIR)$(docdir)/html/libraries/"; \
 	fi
@@ -211,8 +237,7 @@ install_wrappers: install_bin_libdir
 PKG_CONFS = $(shell find "$(DESTDIR)$(ActualLibsDir)/package.conf.d" -name '*.conf' | sed "s:   :\0xxx\0:g")
 update_package_db: install_bin install_lib
 	@echo "Installing C++ standard library virtual package"
-	cp mk/system-cxx-std-lib-1.0.conf "$(DESTDIR)$(ActualLibsDir)/"
-
+	$(INSTALL_DATA) mk/system-cxx-std-lib-1.0.conf "$(DESTDIR)$(ActualLibsDir)/package.conf.d"
 	@echo "Updating the package DB"
 	$(foreach p, $(PKG_CONFS),\
 		$(call patchpackageconf,$(shell echo $(notdir $p) | sed 's/-\([0-9]*[0-9]\.\)*conf//g'),$(shell echo "$p" | sed 's:\0xxx\0:   :g'),$(docdir),$(shell mk/relpath.sh "$(ActualLibsDir)" "$(docdir)"),$(shell echo $(notdir $p) | sed 's/.conf//g')))
@@ -221,6 +246,7 @@ update_package_db: install_bin install_lib
 install_mingw:
 	@echo "Installing MingGW"
 	$(INSTALL_DIR) "$(DESTDIR)$(prefix)/mingw"
-	cp -R ./mingw "$(DESTDIR)$(prefix)"
+	cp -Rp ./mingw "$(DESTDIR)$(prefix)"
+
 # END INSTALL
 # ----------------------------------------------------------------------


=====================================
libraries/base/changelog.md
=====================================
@@ -73,7 +73,7 @@
     This replaces the old ``GHC.Exts.magicDict``, which required
     an intermediate data type and was less reliable.
 
-  * `Data.Word.Word64` and `Data.Int.Int64` are now already represented by
+  * `Data.Word.Word64` and `Data.Int.Int64` are now always represented by
     `Word64#` and `Int64#`, respectively. Previously on 32-bit platforms these
     were rather represented by `Word#` and `Int#`. See GHC #11953.
 


=====================================
utils/haddock
=====================================
@@ -1 +1 @@
-Subproject commit 7484cf883da0ececa8b9c0e039608d6c20654116
+Subproject commit f07a4059efcde05fd26b33a8c902930d3ad90379



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/e00b823d46856204fee830e279b467ea4e36b9a8...6d01245c458c49ca25c89ec13be3268ab6930a27

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/e00b823d46856204fee830e279b467ea4e36b9a8...6d01245c458c49ca25c89ec13be3268ab6930a27
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20220807/57f7f0f7/attachment-0001.html>


More information about the ghc-commits mailing list