[Git][ghc/ghc][wip/ghc-9.12-release] 5 commits: configure: Allow happy-2.0.2

Zubin (@wz1000) gitlab at gitlab.haskell.org
Fri Dec 13 06:50:36 UTC 2024



Zubin pushed to branch wip/ghc-9.12-release at Glasgow Haskell Compiler / GHC


Commits:
85bc8225 by Matthew Pickering at 2024-12-13T12:20:15+05:30
configure: Allow happy-2.0.2

happy-2.0.2 can be used to compile GHC.

happy-2.0 and 2.0.1 have bugs which make it unsuitable to use.

The version bound is now == 1.20.* || >= 2.0.2 && < 2.1

Fixes #25276

(cherry picked from commit 0029ca91c845dd4530eb2c4606ad5bd59775cec2)

- - - - -
cec6ad0f by Cristiano Moraes at 2024-12-13T12:20:15+05:30
configure: Find C++ probing when GCC version is the latest but G++ is old #23118

(cherry picked from commit 78ad81ecef846f73fee0f6c1a86cd6f19aa29b21)

- - - - -
3eba5f8f by Ben Gamari at 2024-12-13T12:20:15+05:30
configure: Accept happy-2.1.2

happy-2.1 was released in late Oct 2024. I have confirmed that master
bootstraps with it. Here we teach configure to accept this tool.

Fixes #25438.

(cherry picked from commit 1fd83f865ffb620f4f7c4c59787710206dcadb90)

- - - - -
1bd95513 by Ben Gamari at 2024-12-13T12:20:15+05:30
configure: Implement ld override whitelist

Bring `configure` into alignment with `ghc-toolchain`, ensuring that the
ld-override logic will only take effect on Linux and Windows.

Fixes #25501.

(cherry picked from commit 992259962191b0b774dfeeabb46729376c7fe7cf)

- - - - -
08b948f6 by Zubin Duggal at 2024-12-13T12:20:15+05:30
RELEASE=YES

- - - - -


4 changed files:

- configure.ac
- m4/find_ld.m4
- m4/fp_find_cxx_std_lib.m4
- m4/fptools_happy.m4


Changes:

=====================================
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], [9.12.0], [glasgow-haskell-bugs at haskell.org], [ghc-AC_PACKAGE_VERSION])
+AC_INIT([The Glorious Glasgow Haskell Compilation System], [9.12.1], [glasgow-haskell-bugs at haskell.org], [ghc-AC_PACKAGE_VERSION])
     # Version on master must be X.Y (not X.Y.Z) for ProjectVersionMunged variable
     # to be useful (cf #19058). However, the version must have three components
     # (X.Y.Z) on stable branches (e.g. ghc-9.2) to ensure that pre-releases are
@@ -22,7 +22,7 @@ AC_INIT([The Glorious Glasgow Haskell Compilation System], [9.12.0], [glasgow-ha
 AC_CONFIG_MACRO_DIRS([m4])
 
 # Set this to YES for a released version, otherwise NO
-: ${RELEASE=NO}
+: ${RELEASE=YES}
 
 # The primary version (e.g. 7.5, 7.4.1) is set in the AC_INIT line
 # above.  If this is not a released version, then we will append the


=====================================
m4/find_ld.m4
=====================================
@@ -79,13 +79,16 @@ AC_DEFUN([FIND_LD],[
         dnl See #21712.
         AC_CHECK_TARGET_TOOL([LD], [ld])
         ;;
-    *)
+    *-linux*|*-mingw32)
         if test "x$enable_ld_override" = "xyes"; then
             find_ld
         else
             AC_CHECK_TARGET_TOOL([LD], [ld])
         fi
         ;;
+    *)
+        AC_CHECK_TARGET_TOOL([LD], [ld])
+        ;;
     esac
     CHECK_LD_COPY_BUG([$1])
 ])


=====================================
m4/fp_find_cxx_std_lib.m4
=====================================
@@ -61,10 +61,11 @@ EOF
         try_libs() {
             dnl Try to link a plain object with CC manually
             AC_MSG_CHECKING([for linkage against '${3}'])
-            if "$CC" -o actest actest.o ${1} 2>/dev/null; then
+            dnl Ensures that CC uses same library path of CXX.
+            p="`"$CXX" --print-file-name ${2}`"
+            d="`dirname "$p"`"
+            if "$CC" -o actest actest.o ${1} -L"$d" 2>/dev/null; then
                 CXX_STD_LIB_LIBS="${3}"
-                p="`"$CXX" --print-file-name ${2}`"
-                d="`dirname "$p"`"
                 dnl On some platforms (e.g. Windows) the C++ standard library
                 dnl can be found in the system search path. In this case $CXX
                 dnl --print-file-name will simply print the filename without a


=====================================
m4/fptools_happy.m4
=====================================
@@ -24,10 +24,15 @@ changequote([, ])dnl
 ])
 if test ! -f compiler/GHC/Parser.hs || test ! -f compiler/GHC/Cmm/Parser.hs
 then
+    failure_msg="Happy version == 1.20.* || >= 2.0.2 && < 2.2  is required to compile GHC"
     FP_COMPARE_VERSIONS([$fptools_cv_happy_version],[-lt],[1.20.0],
-      [AC_MSG_ERROR([Happy version 1.20 or later is required to compile GHC.])])[]
+      [AC_MSG_ERROR([$failure_msg])])[]
     FP_COMPARE_VERSIONS([$fptools_cv_happy_version],[-ge],[1.21.0],
-      [AC_MSG_ERROR([Happy version 1.20 or earlier is required to compile GHC.])])[]
+      FP_COMPARE_VERSIONS([$fptools_cv_happy_version], [-le], [2.0.1],
+        [AC_MSG_ERROR([$failure_msg])])[])[]
+    FP_COMPARE_VERSIONS([$fptools_cv_happy_version],[-ge],[2.2.0],
+      [AC_MSG_ERROR([$failure_msg])])[]
+
 fi
 HappyVersion=$fptools_cv_happy_version;
 AC_SUBST(HappyVersion)



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/4ce35a2ce823a20fca25e1ccbbbac8931d2fa2ca...08b948f60963e2e5704814a05342f680d7f89960

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/4ce35a2ce823a20fca25e1ccbbbac8931d2fa2ca...08b948f60963e2e5704814a05342f680d7f89960
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/20241213/ad80235f/attachment-0001.html>


More information about the ghc-commits mailing list