Control: tags -1 patch Hi Gianfranco,
2016-09-25 1:46 GMT+02:00 Bálint Réczey <bal...@balintreczey.hu>: > Hi, > > 2016-09-11 10:44 GMT+02:00 Gianfranco Costamagna <locutusofb...@debian.org>: >> Hi, >> >>>https://patches.ubuntu.com/g/ghc/ghc_7.10.3-9ubuntu1.patch >> >> >> this patch was already committed on ghc 8 branch, and I also committed >> on the master branch (7.10.3), however, I won't upload it. >>>An other option would be bootstrapping GHC in Debian with >>>-fPIC, but I'm not sure if this is viable. >> >> >> that might sound better in the long run, even if it requires probably more >> effort. >> >> I finished the Ubuntu haskell transition without many issues, so I presume >> this patch is safe for unstable, but I don't feel enough confident because >> I can't rebuild and NMU stuff in Debian :) > > Thank you for working on the transition for Debian, too. > I have tested the fix and it does not seem to fix the build on Debian > most probably due > to missing additional patches to GCC. > > The build system needs more changes IMO. > > I'll look into passing -fPIC down to all the gcc calls to fix the build. This approach did not work and is unlikely to work soon: https://ghc.haskell.org/trac/ghc/wiki/SharedLibraries/PlatformSupport > > You can test the new GCC 6, too, by adding the following line to > sources.list on your test system: > deb https://people.debian.org/~rbalint/ppa/pie-bindnow pie-bindnow-unstable/ The following patch disables PIE properly for both the current and patched GCC 6: --- ghc-7.10.3/debian/rules 2016-05-23 14:17:06.000000000 +0200 +++ ghc-7.10.3/debian/rules 2016-09-27 02:39:01.000000000 +0200 @@ -34,12 +34,11 @@ GHC=$(firstword $(shell bash -c "type -p ghc")) EXTRA_CONFIGURE_FLAGS=--with-ghc="$(GHC)" -ifeq (s390x,$(DEB_HOST_ARCH)) - EXTRA_CONFIGURE_FLAGS += \ +EXTRA_CONFIGURE_FLAGS += \ + LDFLAGS=-no-pie CFLAGS=-fno-PIE \ CONF_CC_OPTS_STAGE2=-fno-PIE \ CONF_GCC_LINKER_OPTS_STAGE2=-no-pie \ CONF_LD_LINKER_OPTS_STAGE2=-no-pie -endif BUILD_HADDOCK_DOCS=YES DEB_HOOGLE_TXT_DIR = /usr/lib/ghc-doc/hoogle/ @@ -60,10 +59,9 @@ ifeq (armel,$(DEB_HOST_ARCH)) patch -p1 < debian/patches/armel-revert-ghci-fixes.patch endif -ifeq (s390x,$(DEB_HOST_ARCH)) + echo "SRC_HC_OPTS += -optc-fno-PIE -optl-no-pie" >> mk/build.mk echo "SRC_CC_OPTS += -fno-PIE" >> mk/build.mk echo "SRC_LD_OPTS += -no-pie" >> mk/build.mk -endif ifneq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) # echo "GhcStage1HcOpts += -DDEBUG" >> mk/build.mk # echo "GhcStage2HcOpts += -DDEBUG" >> mk/build.mk The built package also builds haskell-asn1-encoding fine with the changed compiler. Please consider using this patch an upload it soon to the archive. I can help with test rebuilds if needed. Cheers, Balint