diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2017-05-14 12:26:19 +0200 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2017-05-17 13:50:14 +0000 |
commit | 0c605083d9c3944e36c12e796ee27f8f217d1524 (patch) | |
tree | 10b6f6b211dd3cf8eecff28198cfd49895395350 /testing | |
parent | f267ad1d8d993fc0ad5e97a85413064231ae1286 (diff) | |
download | aports-0c605083d9c3944e36c12e796ee27f8f217d1524.tar.bz2 aports-0c605083d9c3944e36c12e796ee27f8f217d1524.tar.xz |
testing/ghc-bootstrap: remove, not needed anymore
Diffstat (limited to 'testing')
-rw-r--r-- | testing/ghc-bootstrap/APKBUILD | 50 | ||||
-rw-r--r-- | testing/ghc-bootstrap/Dockerfile.x86_64 | 144 | ||||
-rw-r--r-- | testing/ghc-bootstrap/bootstrap.patch | 112 | ||||
-rw-r--r-- | testing/ghc-bootstrap/build-hp2ps-twice.patch | 25 | ||||
-rw-r--r-- | testing/ghc-bootstrap/build-unlit-twice.patch | 58 | ||||
-rwxr-xr-x | testing/ghc-bootstrap/llvm-3.7.1.sh | 88 | ||||
-rw-r--r-- | testing/ghc-bootstrap/rm-ghc-pwd.patch | 184 |
7 files changed, 0 insertions, 661 deletions
diff --git a/testing/ghc-bootstrap/APKBUILD b/testing/ghc-bootstrap/APKBUILD deleted file mode 100644 index 3cd647697e..0000000000 --- a/testing/ghc-bootstrap/APKBUILD +++ /dev/null @@ -1,50 +0,0 @@ -#-*-mode: Shell-script; coding: utf-8;-*- -# Maintainer: Mitch Tishmack <mitch.tishmack@gmail.com> -# -# Build/bootstrap ghc similarly to the go package. -# Caveat: bootstrapping isn't a commonly tested piece of ghc. -# -# Note: This only exists to build the native ghc. It is -# huge in size and slow and also intentionally lacks modules -# in the native compiler. -pkgname=ghc-bootstrap -pkgver=8.0.2 -pkgrel=1 -pkgdesc="The Glasgow haskell compiler (bootstrapped)" -license="custom:bsd3" -url="https://haskell.org" -depends="bash libffi musl zlib gcc binutils-gold llvm3.7" -install="" -subpackages="" -makedepends="" -source="http://dev.alpinelinux.org/archive/ghc-bootstrap/ghc-$pkgver-x86_64.tar.xz" - -# The bootstrap process uses docker to build ghc from a debian glibc host -# then upload the bootstrap compiler to where that source url is. -# -# Ensure that docker is running prior to calling this. -# -# Note, this docker image is large, ~10G the dockerfile wasn't built -# to be small. Once built the container should likely be removed. -snapshot() { - docker build -t alpine-ghc-bootstrap:x86_64 -f Dockerfile.x86_64 . \ - || return 1 - docker run -a stdout alpine-ghc-bootstrap:x86_64 \ - /bin/cat "/tmp/ghc-${pkgver}-x86_64.tar.xz" > ghc-${pkgver}-x86_64.tar.xz || return 1 -} - -package() { - cd "$srcdir/x86_64" - install -d "$pkgdir" || return 1 - mv usr "$pkgdir" || return 1 - local settings="$(find $pkgdir -name settings -type f)" - sed -i 's/C compiler supports -no-pie\"\, \"NO\"/C compiler supports -no-pie\"\, \"YES\"/' "$settings" || return 1 - sed -i 's|/usr/.*-gcc|gcc|' "$settings" || return 1 - sed -i 's|/usr/.*-ar|ar|' "$settings" || return 1 - sed -i 's|/usr/.*-ld.gold|ld.gold|' "$settings" || return 1 - sed -i 's|/usr/.*-ld|ld.gold|' "$settings" || return 1 - sed -i 's|/usr/.*/llc|llc-3.7|' "$settings" || return 1 - sed -i 's|/usr/.*/opt|opt-3.7|' "$settings" || return 1 -} - -sha512sums="84404cd23677755e010e90c357e7eea940524531ae82bd70d215fda61fc63c1ef4c367b3fe7a938e8d8f415d8130ae98e77eee122450a80b41099b623fa99f9f ghc-8.0.2-x86_64.tar.xz" diff --git a/testing/ghc-bootstrap/Dockerfile.x86_64 b/testing/ghc-bootstrap/Dockerfile.x86_64 deleted file mode 100644 index 7a99c60fdf..0000000000 --- a/testing/ghc-bootstrap/Dockerfile.x86_64 +++ /dev/null @@ -1,144 +0,0 @@ -# Mostly self contained setup to build a stage2 ghc for musl -from debian:8.0 - -# Install stock bindist for cross compile -env ghc 8.0.2 -env arch x86_64 -env llvm 3.7.1 -env cabal 1.24.0.2 - -env destarch x86_64 -env tardir /tmp/root -env destdir /tmp/root/$destarch -env triple ${arch}-pc-linux-musl -env target ${arch}-pc-linux-musl -env crosscc $triple-gcc - -# add cross toolchain to PATH -env PATH /usr/$triple/bin:$PATH - -# all needed packages for compiling -run apt-get clean && \ - apt-get update && \ - apt-get install -y \ - binutils-gold \ - musl-tools \ - build-essential \ - wget \ - curl \ - libncurses-dev \ - autoconf \ - elfutils \ - libgmp-dev \ - zlib1g-dev \ - git \ - libtool \ - pkg-config \ - libffi-dev \ - cmake \ - g++ \ - python \ - pixz \ - openssl \ - bison \ - git \ - flex - -add http://llvm.org/releases/$llvm/llvm-$llvm.src.tar.xz /tmp/ -add http://llvm.org/releases/$llvm/polly-$llvm.src.tar.xz /tmp/ - -# Install a non ancient version of llvm on debian, I'm purposefully ignoring -# debian repos in favor of compiling to not have to deal with -# "what debian upstream has a current version of llvm" nonsense, takes more -# time to do that than just build the right llvm from source. -workdir /tmp -copy llvm-$llvm.sh /tmp/llvm.sh -run openssl sha1 llvm-$llvm.src.tar.xz | grep "SHA1(llvm-3.7.1.src.tar.xz)= 5dbdcafac105273dcbff94c68837a66c6dd78cef" && \ - openssl sha1 polly-$llvm.src.tar.xz | grep "SHA1(polly-3.7.1.src.tar.xz)= 0e3a461907cde7505fbdb44bf61ff318aa9254f7" && \ - tar xJpf /tmp/llvm-$llvm.src.tar.xz && \ - tar xJpf /tmp/polly-$llvm.src.tar.xz && \ - /tmp/llvm.sh && \ - rm -fr /tmp/llvm-$llvm.src /tmp/build - -add https://downloads.haskell.org/~ghc/$ghc/ghc-$ghc-$arch-deb8-linux.tar.xz /tmp/ - -# Install debian ghc binary from upstream. -workdir /tmp -run openssl sha1 ghc-$ghc-$arch-deb8-linux.tar.xz | grep "SHA1(ghc-$ghc-x86_64-deb8-linux.tar.xz)= f298b7d0f37cc9ded7ac66b2662b0fa5ac6d0809" && \ - tar xJpf /tmp/ghc-$ghc-$arch-deb8-linux.tar.xz -workdir /tmp/ghc-$ghc -run ./configure --prefix=/usr && \ - make -j1 install && \ - rm -fr /tmp/ghc-$ghc - -run curl -kL https://www.haskell.org/cabal/release/cabal-install-$cabal/cabal-install-$cabal.tar.gz -o /tmp/cabal-install-$cabal.tar.gz - -# Install cabal so we can install alex/happy to pull off of git -# bootstrap cabal and install alex/happy the same way apks are built -# only globally -workdir /tmp -run openssl sha1 cabal-install-$cabal.tar.gz | grep "SHA1(cabal-install-$cabal.tar.gz)= ca019360c45be32e224b6582ab46b420fb070417" && \ - tar xzpf /tmp/cabal-install-$cabal.tar.gz -workdir /tmp/cabal-install-$cabal -run ./bootstrap.sh --global --no-doc && \ - cabal update && \ - cabal install --global alex happy && \ - rm -fr /tmp/cabal-install-$cabal - -workdir /tmp -run git clone --depth 1 https://github.com/GregorR/musl-cross.git musl-cross -workdir /tmp/musl-cross -run echo GCC_BUILTIN_PREREQS=yes >> config.sh && \ - echo TRIPLE=${triple} >> config.sh && \ - echo ARCH=${destarch} >> config.sh && \ - echo GCC_STAGE1_NOOPT=1 >> config.sh && \ - echo CC_BASE_PREFIX=/usr >> config.sh && \ - echo MAKEFLAGS=-j$(grep -c processor /proc/cpuinfo) >> config.sh && \ - echo "BINUTILS_CONFFLAGS='CXXFLAGS=-fpermissive --enable-gold --enable-plugins --disable-werror'" >> config.sh && \ - echo "CFLAGS='-g -O3 -fno-pie -fno-pic'" >> config.sh -copy gmpurl.patch gmpurl.patch -run patch -p1 < gmpurl.patch && \ - ./build.sh && \ - rm -fr /tmp/musl-cross - -add http://downloads.haskell.org/~ghc/$ghc/ghc-$ghc-src.tar.xz /tmp/ - -workdir /tmp -run openssl sha1 ghc-$ghc-src.tar.xz | grep "SHA1(ghc-$ghc-src.tar.xz)= 0e0ae6d5ba119c10f3c7b807d35166e7c06b9b35" && \ - tar xJpf /tmp/ghc-$ghc-src.tar.xz -workdir /tmp/ghc-$ghc -copy bootstrap.patch bootstrap.patch -copy rm-ghc-pwd.patch rm-ghc-pwd.patch -copy build-unlit-twice.patch build-unlit-twice.patch -copy build-hp2ps-twice.patch build-hp2ps-twice.patch -run patch -p1 < bootstrap.patch && \ - patch -p1 < rm-ghc-pwd.patch && \ - patch -p1 < build-unlit-twice.patch && \ - patch -p1 < build-hp2ps-twice.patch -run cp mk/build.mk.sample mk/build.mk && \ - ./boot && \ - echo "BuildFlavour = perf-llvm" >> mk/build.mk && \ - echo "BeConservative = YES" >> mk/build.mk && \ - echo "INTEGER_LIBRARY = integer-simple" >> mk/build.mk && \ - echo "HADDOCK_DOCS = NO" >> mk/build.mk && \ - echo "BUILD_SPHINX_HTML = NO" >> mk/build.mk && \ - echo "BUILD_SPHINX_PS = NO" >> mk/build.mk && \ - echo "BUILD_SPHINX_PDF = NO" >> mk/build.mk && \ - echo "SplitSections = YES" >> mk/build.mk && \ - echo "V = 0" >> mk/build.mk && \ - echo "SPLIT_CMD = :" >> mk/build.mk && \ - ./configure \ - --target=$triple \ - --prefix=/usr -run make -j$(grep -c processor /proc/cpuinfo) || make -j1 -run make -j1 install DESTDIR=$destdir - -# remove target prefix from stage2 binaries -workdir $destdir/usr/bin -run (for i in $triple-* ; do ln -s $i ${i#$triple-} || /bin/true; done ) && \ - rm -fr $destdir/usr/share/doc - -workdir $tardir -# Compress to xz via pixz because xz is normally too -# old for -TN multithreads -run tar -I'pixz -9' -cf /tmp/ghc-$ghc-$destarch.tar.xz . diff --git a/testing/ghc-bootstrap/bootstrap.patch b/testing/ghc-bootstrap/bootstrap.patch deleted file mode 100644 index 7e5fc95432..0000000000 --- a/testing/ghc-bootstrap/bootstrap.patch +++ /dev/null @@ -1,112 +0,0 @@ -diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs -index fa1141e..6ff2ac4 100644 ---- a/compiler/main/DynFlags.hs -+++ b/compiler/main/DynFlags.hs -@@ -2448,8 +2448,7 @@ dynamic_flags_deps = [ - , make_ord_flag defGhcFlag "dynload" (hasArg parseDynLibLoaderMode) - , make_ord_flag defGhcFlag "dylib-install-name" (hasArg setDylibInstallName) - -- -dll-split is an internal flag, used only during the GHC build -- , make_ord_flag defHiddenFlag "dll-split" -- (hasArg (\f d -> d { dllSplitFile = Just f, dllSplit = Nothing })) -+ , make_ord_flag defHiddenFlag "dll-split" (NoArg (addWarn "ignoring -dll-split")) - - ------- Libraries --------------------------------------------------- - , make_ord_flag defFlag "L" (Prefix addLibraryPath) -diff --git a/ghc.mk b/ghc.mk -index 5e4ecc6..a07ff73 100644 ---- a/ghc.mk -+++ b/ghc.mk -@@ -433,7 +433,7 @@ else # CLEANING - PACKAGES_STAGE0 = binary Cabal/Cabal hpc ghc-boot hoopl transformers template-haskell - ifeq "$(Windows_Host)" "NO" - ifneq "$(HostOS_CPP)" "ios" --PACKAGES_STAGE0 += terminfo -+PACKAGES_STAGE0 += - endif - endif - -@@ -471,7 +471,7 @@ endif - - ifeq "$(Windows_Target)" "NO" - ifneq "$(TargetOS_CPP)" "ios" --PACKAGES_STAGE1 += terminfo -+PACKAGES_STAGE1 += - endif - endif - PACKAGES_STAGE1 += haskeline -@@ -968,8 +968,8 @@ INSTALLED_PACKAGE_CONF=$(DESTDIR)$(topdir)/package.conf.d - # Install packages in the right order, so that ghc-pkg doesn't complain. - # Also, install ghc-pkg first. - ifeq "$(Windows_Host)" "NO" --INSTALLED_GHC_REAL=$(DESTDIR)$(ghclibexecdir)/bin/ghc --INSTALLED_GHC_PKG_REAL=$(DESTDIR)$(ghclibexecdir)/bin/ghc-pkg -+INSTALLED_GHC_REAL=$(CURDIR)/inplace/bin/ghc-stage1 -+INSTALLED_GHC_PKG_REAL=$(CURDIR)/utils/ghc-pkg/dist/build/tmp/ghc-pkg - else - INSTALLED_GHC_REAL=$(DESTDIR)$(bindir)/ghc.exe - INSTALLED_GHC_PKG_REAL=$(DESTDIR)$(bindir)/ghc-pkg.exe -diff --git a/rules/build-package-way.mk b/rules/build-package-way.mk -index 905b7f0..3e23b1f 100644 ---- a/rules/build-package-way.mk -+++ b/rules/build-package-way.mk -@@ -62,17 +62,6 @@ $1_$2_$3_ALL_OBJS = $$($1_$2_$3_HS_OBJS) $$($1_$2_$3_NON_HS_OBJS) - - ifeq "$3" "dyn" - --ifneq "$$($1_$2_dll0_MODULES)" "" --$$($1_$2_$3_LIB) : $1/$2/dll-split.stamp --ifneq "$$($1_$2_$3_LIB0)" "" --$$($1_$2_$3_LIB0) : $1/$2/dll-split.stamp --endif --endif -- --$1/$2/dll-split.stamp: $$($1_$2_depfile_haskell) $$$$(dll-split_INPLACE) -- $$(dll-split_INPLACE) $$< "$$($1_$2_dll0_START_MODULE)" "$$($1_$2_dll0_MODULES)" -- touch $$@ -- - # Link a dynamic library - # On windows we have to supply the extra libs this one links to when building it. - ifeq "$$(HostOS_CPP)" "mingw32" -diff --git a/rules/distdir-way-opts.mk b/rules/distdir-way-opts.mk -index f099d4e..6dcf911 100644 ---- a/rules/distdir-way-opts.mk -+++ b/rules/distdir-way-opts.mk -@@ -160,13 +160,6 @@ $1_$2_$3_ALL_HC_OPTS = \ - $$(if $$(findstring YES,$$($1_$2_SplitSections)),$$(if $$(findstring dyn,$3),,-split-sections),) \ - $$(if $$(findstring YES,$$($1_$2_DYNAMIC_TOO)),$$(if $$(findstring v,$3),-dynamic-too)) - --ifeq "$3" "dyn" --ifeq "$$(HostOS_CPP)" "mingw32" --ifneq "$$($1_$2_dll0_MODULES)" "" --$1_$2_$3_ALL_HC_OPTS += -dll-split $1/$2/dll-split --endif --endif --endif - - $1_$2_$3_ALL_CC_OPTS = \ - $$(WAY_$3_CC_OPTS) \ -diff --git a/utils/ghc-pkg/Main.hs b/utils/ghc-pkg/Main.hs -index af3032d..1c38e8e 100644 ---- a/utils/ghc-pkg/Main.hs -+++ b/utils/ghc-pkg/Main.hs -@@ -1,5 +1,6 @@ - {-# LANGUAGE CPP, TypeSynonymInstances, FlexibleInstances #-} - {-# OPTIONS_GHC -fno-warn-orphans #-} -+#define BOOTSTRAPPING - ----------------------------------------------------------------------------- - -- - -- (c) The University of Glasgow 2004-2009. -diff --git a/utils/ghc-pkg/ghc-pkg.cabal b/utils/ghc-pkg/ghc-pkg.cabal -index 5f76e1b..2f9b558 100644 ---- a/utils/ghc-pkg/ghc-pkg.cabal -+++ b/utils/ghc-pkg/ghc-pkg.cabal -@@ -31,7 +31,7 @@ Executable ghc-pkg - ghc-boot, - bytestring - if !os(windows) -- Build-Depends: unix, -- terminfo -+ Build-Depends: unix -+ - if os(windows) - c-sources: CRT_noglob.c diff --git a/testing/ghc-bootstrap/build-hp2ps-twice.patch b/testing/ghc-bootstrap/build-hp2ps-twice.patch deleted file mode 100644 index 47e8a8f266..0000000000 --- a/testing/ghc-bootstrap/build-hp2ps-twice.patch +++ /dev/null @@ -1,25 +0,0 @@ ---- a/utils/hp2ps/ghc.mk 2017-02-25 22:37:12.000000000 -0600 -+++ b/utils/hp2ps/ghc.mk 2017-02-25 23:21:33.000000000 -0600 -@@ -17,10 +17,21 @@ - Utilities.c - utils/hp2ps_dist_EXTRA_LIBRARIES = m - utils/hp2ps_dist_PROGNAME = $(CrossCompilePrefix)hp2ps --utils/hp2ps_dist_INSTALL = YES -+utils/hp2ps_dist_INSTALL = NO - utils/hp2ps_dist_INSTALL_INPLACE = YES - - utils/hp2ps_CC_OPTS += $(addprefix -I,$(GHC_INCLUDE_DIRS)) - - $(eval $(call build-prog,utils/hp2ps,dist,0)) - -+utils/hp2ps_dist-install_C_SRCS = AreaBelow.c Curves.c Error.c Main.c \ -+ Reorder.c TopTwenty.c AuxFile.c Deviation.c \ -+ HpFile.c Marks.c Scale.c TraceElement.c \ -+ Axes.c Dimensions.c Key.c PsFile.c Shade.c \ -+ Utilities.c -+utils/hp2ps_dist-install_PROGNAME = hp2ps -+utils/hp2ps_dist-install_TOPDIR = YES -+utils/hp2ps_dist-install_INSTALL = YES -+utils/hp2ps_dist-install_INSTALL_INPLACE = NO -+ -+$(eval $(call build-prog,utils/hp2ps,dist-install,1)) diff --git a/testing/ghc-bootstrap/build-unlit-twice.patch b/testing/ghc-bootstrap/build-unlit-twice.patch deleted file mode 100644 index 91380a5c26..0000000000 --- a/testing/ghc-bootstrap/build-unlit-twice.patch +++ /dev/null @@ -1,58 +0,0 @@ -From eba93774c3ce2f151e7c72f6d068b753f24dbcfa Mon Sep 17 00:00:00 2001 -From: Thomas Miedema <thomasmiedema@gmail.com> -Date: Wed, 15 Jun 2016 14:56:46 +0200 -Subject: [PATCH] Build system: build unlit twice - -See Note [Why build certain utils twice?] in utils/ghc-pkg/ghc.mk ---- - utils/ghc-pkg/ghc.mk | 7 ++++++- - utils/unlit/ghc.mk | 10 +++++++++- - 2 files changed, 15 insertions(+), 2 deletions(-) - -diff --git a/utils/ghc-pkg/ghc.mk b/utils/ghc-pkg/ghc.mk -index f7d97de..410de72 100644 ---- a/utils/ghc-pkg/ghc.mk -+++ b/utils/ghc-pkg/ghc.mk -@@ -27,7 +27,7 @@ utils/ghc-pkg_PACKAGE = ghc-pkg - # Note [Why build certain utils twice?] - # - # We build certain utils twice: once with stage0, and once with stage1. --# Examples are ghc-pkg and hsc2hs. -+# Examples are ghc-pkg, hsc2hs and unlit. - # - # These tools are needed during the bootstrapping process, so we have to use - # stage0 to build them at first (stage1 doesn't exist yet). (side note: they're -@@ -38,6 +38,11 @@ utils/ghc-pkg_PACKAGE = ghc-pkg - # dynamically linked. But the stage0 copies are either statically linked, or - # linked against libraries on the build machine. - # -+# Another reason why we can't install the stage0 copies is that they are -+# built to run on the build(=host) platform, but when installing a -+# "cross-compiled stage2 compiler" we need copies that run on the target -+# platform. -+# - # Therefore we build fresh copies, using the stage1 compiler, and install them - # when you run 'make install'. They are not used for any other purpose. - -diff --git a/utils/unlit/ghc.mk b/utils/unlit/ghc.mk -index e947989..6805c4e 100644 ---- a/utils/unlit/ghc.mk -+++ b/utils/unlit/ghc.mk -@@ -13,8 +13,16 @@ - utils/unlit_dist_C_SRCS = unlit.c - utils/unlit_dist_PROGNAME = unlit - utils/unlit_dist_TOPDIR = YES --utils/unlit_dist_INSTALL = YES -+utils/unlit_dist_INSTALL = NO - utils/unlit_dist_INSTALL_INPLACE = YES - - $(eval $(call build-prog,utils/unlit,dist,0)) - -+utils/unlit_dist-install_C_SRCS = unlit.c -+utils/unlit_dist-install_PROGNAME = unlit -+utils/unlit_dist-install_TOPDIR = YES -+utils/unlit_dist-install_INSTALL = YES -+utils/unlit_dist-install_INSTALL_INPLACE = NO -+ -+# See Note [Why build certain utils twice?]. -+$(eval $(call build-prog,utils/unlit,dist-install,1)) diff --git a/testing/ghc-bootstrap/llvm-3.7.1.sh b/testing/ghc-bootstrap/llvm-3.7.1.sh deleted file mode 100755 index 49e44dfc20..0000000000 --- a/testing/ghc-bootstrap/llvm-3.7.1.sh +++ /dev/null @@ -1,88 +0,0 @@ -#!/usr/bin/env sh -#-*-mode: Shell-script; coding: utf-8;-*- -export script=$(basename "$0") -export dir=$(cd "$(dirname "$0")"; pwd) -export iam=${dir}/${script} -llvm_major=3.7 -llvm_version=${llvm_major}.1 -llvm_srcdir="/tmp/llvm-${llvm_version}.src" -suffix="-${llvm_major}" -llvm_builddir=/tmp/build -polly_orig_srcdir="/tmp/polly-$llvm_version.src" - -cd "$llvm_srcdir" - -_cmake_flags="\ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_VERBOSE_MAKEFILE=NO \ - -DLLVM_BINUTILS_INCDIR=/usr/include \ - -DLLVM_ENABLE_ASSERTIONS=NO \ - -DLLVM_ENABLE_LIBCXX=NO \ - -DLLVM_ENABLE_PIC=YES \ - -DLLVM_ENABLE_ZLIB=YES \ - -DLLVM_ENABLE_RTTI=YES \ - -DLLVM_BUILD_EXAMPLES=NO \ - -DLLVM_INCLUDE_EXAMPLES=NO \ - -DLIBXML2_INCLUDE_DIR=/usr/include/libxml2 \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DLLVM_TARGETS_TO_BUILD='all' \ - -DLLVM_BUILD_EXTERNAL_COMPILER_RT=NO \ - -DBUILD_SHARED_LIBS=NO \ - -DLLVM_BUILD_DOCS=NO \ - -DLLVM_BUILD_TESTS=NO \ - -DLLVM_ENABLE_CXX1Y=NO \ - -DLLVM_ENABLE_FFI=YES \ - -DLLVM_ENABLE_SPHINX=NO \ - -DLLVM_ENABLE_TERMINFO=NO \ - -DLLVM_ENABLE_CURSES=NO \ - -DWITH_POLLY=YES \ - -DLLVM_INCLUDE_EXAMPLES=NO \ - -DLLVM_INCLUDE_TESTS=NO \ - " -srcdir_polly="$llvm_srcdir"/tools/polly -mv /tmp/polly-$llvm_version.src "$srcdir_polly" || return 1 - -( - OCFLAGS="${CFLAGS}" - OCXXFLAGS="${CXXFLAGS}" - unset CFLAGS - unset CXXFLAGS - - test -z "${OCFLAGS}" && OCFLAGS="-O3" - test -z "${OCXXFLAGS}" && OCXXFLAGS="-O3" - - cflags="${OCFLAGS} -DNDEBUG -I$srcdir/tmp/include" - cxxflags="${OCXXFLAGS} -DNDEBUG -fno-devirtualize" - - export CC=gcc - export CXX=g++ - - ffi_include_dir="$(pkg-config --cflags-only-I libffi | sed 's|^-I||g')" - - cflags="${OCFLAGS} -DNDEBUG" - cxxflags="${OCXXFLAGS} -DNDEBUG" - - mkdir -p "${llvm_builddir}" - cd "${llvm_builddir}" - cmake -G "Unix Makefiles" -Wno-dev ${_cmake_final_flags} \ - -DCMAKE_C_COMPILER="${CC}" \ - -DCMAKE_CXX_COMPILER="${CXX}" \ - -DCMAKE_C_FLAGS_RELEASE="${cflags}" \ - -DCMAKE_CXX_FLAGS_RELEASE="${cxxflags}" \ - -DCMAKE_EXE_LINKER_FLAGS="${LDFLAGS} -L$srcdir/tmp/lib" \ - -DCMAKE_SHARED_LINKER_FLAGS="${LDFLAGS}" \ - -DFFI_INCLUDE_DIR="$ffi_include_dir" \ - -DCMAKE_PREFIX_PATH="$srcdir/tmp" \ - "${llvm_srcdir}" || return 1 - - ( - export LD_LIBRARY_PATH="$srcdir/tmp/lib:$LD_LIBRARY_PATH" - make -j$(grep -c processor /proc/cpuinfo) llvm-tblgen || return 1 - make -j$(grep -c processor /proc/cpuinfo) || return 1 - ) || return 1 - export CFLAGS="${OCFLAGS}" - export CXXFLAGS="${OCXXFLAGS}" - - # install portion - make -j1 install || return 1 -) || return 1 diff --git a/testing/ghc-bootstrap/rm-ghc-pwd.patch b/testing/ghc-bootstrap/rm-ghc-pwd.patch deleted file mode 100644 index cf4417547b..0000000000 --- a/testing/ghc-bootstrap/rm-ghc-pwd.patch +++ /dev/null @@ -1,184 +0,0 @@ -commit 4c56ad36ee0d1f8b6f1b2bc0d8fff1c9acd1a389 -Author: Thomas Miedema <thomasmiedema@gmail.com> -Date: Mon Jan 4 18:29:49 2016 +0100 - - Build system: delete ghc-pwd - - On Windows, with msys2, `pwd` works (as can be seen by the use of `pwd` - that slipped into the validate script), so there is really no need for - `ghc-pwd` anymore. - - Test Plan: try it - - Reviewers: austin, bgamari, Phyx - - Reviewed By: Phyx - - Subscribers: Phyx, erikd - - Differential Revision: https://phabricator.haskell.org/D1731 - -diff --git a/aclocal.m4 b/aclocal.m4 -index 8e97726..0c93de4 100644 ---- a/aclocal.m4 -+++ b/aclocal.m4 -@@ -1737,33 +1737,9 @@ AC_DEFUN([FP_CURSES], - # Calculate absolute path to build tree - # -------------------------------------------------------------- - --AC_DEFUN([FP_INTREE_GHC_PWD],[ --AC_MSG_NOTICE(Building in-tree ghc-pwd) -- dnl This would be -- dnl make -C utils/ghc-pwd clean && make -C utils/ghc-pwd -- dnl except we don't want to have to know what make is called. Sigh. -- rm -rf utils/ghc-pwd/dist-boot -- mkdir utils/ghc-pwd/dist-boot -- dnl If special linker flags are needed to build things, then allow -- dnl the user to pass them in via LDFLAGS. -- changequote(, )dnl -- GHC_LDFLAGS=`perl -e 'foreach (@ARGV) { print "-optl$_ " }' -- $LDFLAGS` -- changequote([, ])dnl -- if ! "$WithGhc" $GHC_LDFLAGS -v0 -no-user-$GHC_PACKAGE_DB_FLAG -hidir utils/ghc-pwd/dist-boot -odir utils/ghc-pwd/dist-boot -stubdir utils/ghc-pwd/dist-boot --make utils/ghc-pwd/Main.hs -o utils/ghc-pwd/dist-boot/ghc-pwd -- then -- AC_MSG_ERROR([Building ghc-pwd failed]) -- fi -- -- GHC_PWD=utils/ghc-pwd/dist-boot/ghc-pwd --]) -- --AC_DEFUN([FP_BINDIST_GHC_PWD],[ -- GHC_PWD=utils/ghc-pwd/dist-install/build/tmp/ghc-pwd-bindist --]) -- - AC_DEFUN([FP_FIND_ROOT],[ - AC_MSG_CHECKING(for path to top of build tree) -- hardtop=`$GHC_PWD` -+ hardtop=`pwd` - - dnl Remove common automounter nonsense - hardtop=`echo $hardtop | sed 's|^/tmp_mnt.*\(/local/.*\)$|\1|' | sed 's|^/tmp_mnt/|/|'` -diff --git a/configure.ac b/configure.ac -index 042b417..ab82bb0 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -26,6 +26,8 @@ AC_INIT([The Glorious Glasgow Haskell Compilation System], [8.1], [glasgow-haske - # checkout), then we ship a file 'VERSION' containing the full version - # when the source distribution was created. - -+FP_FIND_ROOT -+ - if test ! -f mk/config.h.in; then - echo "mk/config.h.in doesn't exist: perhaps you haven't run 'perl boot'?" - exit 1 -@@ -258,10 +260,6 @@ AC_ARG_WITH(hc, - ) - AC_SUBST(WithHc) - --# This uses GHC, so put it after the "GHC is required" check above: --FP_INTREE_GHC_PWD --FP_FIND_ROOT -- - fail() { - echo >&2 - echo "$1" >&2 -diff --git a/distrib/configure.ac.in b/distrib/configure.ac.in -index 0f68a52..4d57cd8 100644 ---- a/distrib/configure.ac.in -+++ b/distrib/configure.ac.in -@@ -6,7 +6,6 @@ dnl - - AC_INIT([The Glorious Glasgow Haskell Compilation System], [@ProjectVersion@], [glasgow-haskell-bugs@haskell.org], [ghc]) - --FP_BINDIST_GHC_PWD - FP_FIND_ROOT - - dnl-------------------------------------------------------------------- -diff --git a/ghc.mk b/ghc.mk -index ba708a1..3ccc496 100644 ---- a/ghc.mk -+++ b/ghc.mk -@@ -516,7 +516,6 @@ $(foreach pkg,$(PACKAGES_STAGE1),$(eval $(call fixed_pkg_dep,$(pkg),dist-install - # the stage1 packages, so we have to make sure those packages get configured - # and registered before we can start with these. Note that they don't depend on - # eachother, so we can configure them in parallel. --utils/ghc-pwd/dist-install/package-data.mk: $(fixed_pkg_prev) - utils/ghc-cabal/dist-install/package-data.mk: $(fixed_pkg_prev) - utils/hpc/dist-install/package-data.mk: $(fixed_pkg_prev) - utils/ghc-pkg/dist-install/package-data.mk: $(fixed_pkg_prev) -@@ -660,7 +659,6 @@ BUILD_DIRS += utils/testremove - BUILD_DIRS += utils/ghctags - BUILD_DIRS += utils/check-api-annotations - BUILD_DIRS += utils/dll-split --BUILD_DIRS += utils/ghc-pwd - BUILD_DIRS += utils/ghc-cabal - BUILD_DIRS += utils/hpc - BUILD_DIRS += utils/runghc -@@ -1020,7 +1018,6 @@ $(eval $(call bindist-list,.,\ - mk/config.mk.in \ - $(INPLACE_BIN)/mkdirhier \ - utils/ghc-cabal/dist-install/build/tmp/ghc-cabal \ -- utils/ghc-pwd/dist-install/build/tmp/ghc-pwd \ - $(BINDIST_WRAPPERS) \ - $(BINDIST_PERL_SOURCES) \ - $(BINDIST_LIBS) \ -@@ -1366,9 +1363,6 @@ distclean : clean - # Internal files generated by ./configure for itself. - $(call removeFiles,config.cache config.status config.log) - --# ./configure build ghc-pwd in utils/ghc-pwd/dist-boot, so clean it up. -- $(call removeTrees,utils/ghc-pwd/dist-boot) -- - # The root Makefile makes .old versions of some files that configure - # generates, so we clean those too. - $(call removeFiles,mk/config.mk.old) -diff --git a/utils/ghc-pwd/Main.hs b/utils/ghc-pwd/Main.hs -deleted file mode 100644 -index 91a5606..0000000 ---- a/utils/ghc-pwd/Main.hs -+++ /dev/null -@@ -1,22 +0,0 @@ -- --module Main where -- --import System.Directory --import System.Environment --import System.Exit --import System.IO -- --main :: IO () --main = do -- args <- getArgs -- case args of -- [] -> do d <- getCurrentDirectory -- putStr $ map forwardifySlashes d -- _ -> do hPutStrLn stderr ("Bad args: " ++ show args) -- hPutStrLn stderr "Usage: ghc-pwd" -- exitFailure -- --forwardifySlashes :: Char -> Char --forwardifySlashes '\\' = '/' --forwardifySlashes c = c -- -diff --git a/utils/ghc-pwd/Setup.hs b/utils/ghc-pwd/Setup.hs -deleted file mode 100644 -index 9a994af..0000000 ---- a/utils/ghc-pwd/Setup.hs -+++ /dev/null -@@ -1,2 +0,0 @@ --import Distribution.Simple --main = defaultMain -diff --git a/utils/ghc-pwd/ghc.mk b/utils/ghc-pwd/ghc.mk -deleted file mode 100644 -index ac6bc76..0000000 ---- a/utils/ghc-pwd/ghc.mk -+++ /dev/null -@@ -1,9 +0,0 @@ -- --utils/ghc-pwd_USES_CABAL = YES --utils/ghc-pwd_PACKAGE = ghc-pwd --utils/ghc-pwd_dist-install_INSTALL_INPLACE = YES --utils/ghc-pwd_dist-install_WANT_BINDIST_WRAPPER = YES --utils/ghc-pwd_dist-install_PROGNAME = ghc-pwd -- --$(eval $(call build-prog,utils/ghc-pwd,dist-install,1)) -- |