[Git][ghc/ghc][wip/lint-check-version-number] gitlab-ci: Ensure that version number has three components
Ben Gamari
gitlab at gitlab.haskell.org
Sun Apr 7 19:24:58 UTC 2019
Ben Gamari pushed to branch wip/lint-check-version-number at Glasgow Haskell Compiler / GHC
Commits:
a3ef3478 by Ben Gamari at 2019-04-07T19:24:50Z
gitlab-ci: Ensure that version number has three components
- - - - -
2 changed files:
- .gitlab-ci.yml
- configure.ac
Changes:
=====================================
.gitlab-ci.yml
=====================================
@@ -55,6 +55,9 @@ ghc-linters:
- validate-whitespace .git $(git rev-list $base..$CI_COMMIT_SHA)
- .gitlab/linters/check-makefiles.py $base $CI_COMMIT_SHA
- .gitlab/linters/check-cpp.py $base $CI_COMMIT_SHA
+ - |
+ egrep -q '\[[0-9]+\.[0-9]+\.[0-9]+\]' configure.ac ||
+ ( echo "error: configure.ac: GHC version number must have three components."; exit 1 )
dependencies: []
tags:
- lint
=====================================
configure.ac
=====================================
@@ -13,7 +13,7 @@ dnl
# see what flags are available. (Better yet, read the documentation!)
#
-AC_INIT([The Glorious Glasgow Haskell Compilation System], [8.9], [glasgow-haskell-bugs at haskell.org], [ghc-AC_PACKAGE_VERSION])
+AC_INIT([The Glorious Glasgow Haskell Compilation System], [8.9.0], [glasgow-haskell-bugs at haskell.org], [ghc-AC_PACKAGE_VERSION])
# Set this to YES for a released version, otherwise NO
: ${RELEASE=NO}
@@ -386,6 +386,20 @@ then
fp_prog_ar="${mingwbin}ar.exe"
AC_PATH_PROG([Genlib],[genlib])
+
+ # NB. Download the perl binaries if required
+ if ! test -d inplace/perl ||
+ test inplace/perl -ot ghc-tarballs/perl/ghc-perl*.tar.gz
+ then
+ AC_MSG_NOTICE([Making in-tree perl tree])
+ rm -rf inplace/perl
+ mkdir inplace/perl
+ (
+ cd inplace/perl &&
+ tar -zxf ../../ghc-tarballs/perl/ghc-perl*.tar.gz
+ )
+ AC_MSG_NOTICE([In-tree perl tree created])
+ fi
fi
# We don't want to bundle a MinGW-w64 toolchain
@@ -529,7 +543,6 @@ FP_SET_CFLAGS_C99([CC],[CONF_CC_OPTS_STAGE2],[CONF_CPP_OPTS_STAGE2])
dnl ** Which ld to use
dnl --------------------------------------------------------------
-AC_ARG_VAR(LD,[Use as the path to ld. See also --disable-ld-override.])
FIND_LD([$target],[GccUseLdOpt])
CONF_GCC_LINKER_OPTS_STAGE1="$CONF_GCC_LINKER_OPTS_STAGE1 $GccUseLdOpt"
CONF_GCC_LINKER_OPTS_STAGE2="$CONF_GCC_LINKER_OPTS_STAGE2 $GccUseLdOpt"
@@ -559,14 +572,14 @@ if test "$TargetOS_CPP" = "darwin"
then
AC_MSG_CHECKING(whether nm program is broken)
# Some versions of XCode ship a broken version of `nm`. Detect and work
- # around this issue. See : https://gitlab.haskell.org/ghc/ghc/issues/11744
+ # around this issue. See : https://ghc.haskell.org/trac/ghc/ticket/11744
nmver=$(${NM} --version | grep version | sed 's/ //g')
case "$nmver" in
LLVMversion7.3.0|LLVMversion7.3.1)
AC_MSG_RESULT(yes)
echo "The detected nm program is broken."
echo
- echo "See: https://gitlab.haskell.org/ghc/ghc/issues/11744"
+ echo "See: https://ghc.haskell.org/trac/ghc/ticket/11744"
echo
echo "Try re-running configure with:"
echo
@@ -635,21 +648,18 @@ AC_DEFINE_UNQUOTED([sUPPORTED_LLVM_VERSION], ${sUPPORTED_LLVM_VERSION}, [The sup
dnl ** Which LLVM clang to use?
dnl --------------------------------------------------------------
-AC_ARG_VAR(CLANG,[Use as the path to clang [default=autodetect]])
AC_CHECK_TARGET_TOOL([CLANG], [clang])
ClangCmd="$CLANG"
AC_SUBST([ClangCmd])
dnl ** Which LLVM llc to use?
dnl --------------------------------------------------------------
-AC_ARG_VAR(LLC,[Use as the path to LLVM's llc [default=autodetect]])
FIND_LLVM_PROG([LLC], [llc], [$LlvmVersion])
LlcCmd="$LLC"
AC_SUBST([LlcCmd])
dnl ** Which LLVM opt to use?
dnl --------------------------------------------------------------
-AC_ARG_VAR(OPT,[Use as the path to LLVM's opt [default=autodetect]])
FIND_LLVM_PROG([OPT], [opt], [$LlvmVersion])
OptCmd="$OPT"
AC_SUBST([OptCmd])
@@ -683,6 +693,36 @@ AC_SUBST([GhcLibsWithUnix])
dnl ** does #! work?
AC_SYS_INTERPRETER()
+# Check for split-objs
+SplitObjsBroken=NO
+dnl ** look for `perl'
+case $HostOS_CPP in
+cygwin32|mingw32)
+ if test "$EnableDistroToolchain" = "NO"; then
+ PerlCmd=$hardtop/inplace/perl/perl
+ else
+ AC_PATH_PROG([PerlCmd],[perl])
+ fi
+ # because of Trac #15051 SplitObjs is useless on Windows. It regresses
+ # build times to days for a build, and this effect is also there for end users
+ # of GHC. So unfortunately we have to disable it, even without having
+ # split-sections. Though the compile time hit for split-sections should be
+ # tiny compared to this so maybe we should enable it for x86_64.
+ SplitObjsBroken=YES
+ ;;
+*)
+ AC_PATH_PROG([PerlCmd],[perl])
+ if test -z "$PerlCmd"
+ then
+ AC_MSG_WARN([No Perl on PATH, disabling split object support])
+ SplitObjsBroken=YES
+ else
+ FPTOOLS_CHECK_PERL_VERSION
+ fi
+ ;;
+esac
+AC_SUBST([SplitObjsBroken])
+
dnl ** look for GCC and find out which version
dnl Figure out which C compiler to use. Gcc is preferred.
dnl If gcc, make sure it's at least 3.0
@@ -774,9 +814,6 @@ dnl ** check for patch
dnl if GNU patch is named gpatch, look for it first
AC_PATH_PROGS(PatchCmd,gpatch patch, patch)
-dnl ** check for autoreconf
-AC_PATH_PROG(AutoreconfCmd, autoreconf, autoreconf)
-
dnl ** check for dtrace (currently only implemented for Mac OS X)
AC_ARG_ENABLE(dtrace,
[AC_HELP_STRING([--enable-dtrace],
@@ -937,7 +974,7 @@ dnl ** check for math library
dnl Keep that check as early as possible.
dnl as we need to know whether we need libm
dnl for math functions or not
-dnl (see https://gitlab.haskell.org/ghc/ghc/issues/3730)
+dnl (see http://ghc.haskell.org/trac/ghc/ticket/3730)
AC_CHECK_LIB(m, atan, HaveLibM=YES, HaveLibM=NO)
if test $HaveLibM = YES
then
@@ -1292,7 +1329,7 @@ checkMake380() {
checkMake380 make
checkMake380 gmake
-AC_CONFIG_FILES([mk/config.mk mk/install.mk mk/project.mk rts/rts.cabal compiler/ghc.cabal ghc/ghc-bin.cabal utils/iserv/iserv.cabal utils/iserv-proxy/iserv-proxy.cabal utils/remote-iserv/remote-iserv.cabal utils/runghc/runghc.cabal utils/gen-dll/gen-dll.cabal libraries/ghc-boot/ghc-boot.cabal libraries/ghc-boot-th/ghc-boot-th.cabal libraries/ghci/ghci.cabal libraries/ghc-heap/ghc-heap.cabal libraries/libiserv/libiserv.cabal libraries/template-haskell/template-haskell.cabal settings docs/users_guide/ghc_config.py docs/index.html libraries/prologue.txt distrib/configure.ac])
+AC_CONFIG_FILES([mk/config.mk mk/install.mk mk/project.mk rts/rts.cabal compiler/ghc.cabal ghc/ghc-bin.cabal utils/iserv/iserv.cabal utils/iserv-proxy/iserv-proxy.cabal utils/runghc/runghc.cabal utils/gen-dll/gen-dll.cabal libraries/ghc-boot/ghc-boot.cabal libraries/ghc-boot-th/ghc-boot-th.cabal libraries/ghci/ghci.cabal libraries/ghc-heap/ghc-heap.cabal libraries/libiserv/libiserv.cabal settings docs/users_guide/ghc_config.py docs/index.html libraries/prologue.txt distrib/configure.ac])
AC_OUTPUT
[
if test "$print_make_warning" = "true"; then
@@ -1348,6 +1385,7 @@ echo "\
genlib : $GenlibCmd
Happy : $HappyCmd ($HappyVersion)
Alex : $AlexCmd ($AlexVersion)
+ Perl : $PerlCmd
sphinx-build : $SPHINXBUILD
xelatex : $XELATEX
@@ -1380,5 +1418,5 @@ To make changes to the default build configuration, copy the file
mk/build.mk.sample to mk/build.mk, and edit the settings in there.
For more information on how to configure your GHC build, see
- https://gitlab.haskell.org/ghc/ghc/wikis/building
+ http://ghc.haskell.org/trac/ghc/wiki/Building
"]
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/commit/a3ef3478189170c08e8371c600b328cf370d84d0
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/commit/a3ef3478189170c08e8371c600b328cf370d84d0
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/20190407/dcbb8a69/attachment-0001.html>
More information about the ghc-commits
mailing list