[Git][ghc/ghc][master] Drop hard Xcode dependency

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Wed Dec 13 00:51:25 UTC 2023



Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
a3ee3b99 by Moritz Angermann at 2023-12-12T19:50:58-05:00
Drop hard Xcode dependency

XCODE_VERSION calls out to `xcodebuild`, which is only available
when having `Xcode` installed. The CommandLineTools are not
sufficient. To install Xcode, you must have an apple id to download
the Xcode.xip from apple.

We do not use xcodebuild anywhere in our build explicilty. At best
it appears to be a proxy for checking the linker or the compiler.
These should rather be done with
```
xcrun ld -version
```
or similar, and not by proxy through Xcode. The CLR should be
sufficient for building software on macOS.

- - - - -


3 changed files:

- configure.ac
- distrib/configure.ac.in
- − m4/xcode_version.m4


Changes:

=====================================
configure.ac
=====================================
@@ -342,9 +342,6 @@ then
   GMP_FORCE_INTREE="YES"
 fi
 
-XCODE_VERSION()
-
-
 dnl ** Building a cross compiler?
 dnl --------------------------------------------------------------
 CrossCompiling=NO


=====================================
distrib/configure.ac.in
=====================================
@@ -94,8 +94,6 @@ then
     AC_MSG_ERROR([find is required.])
 fi
 
-XCODE_VERSION()
-
 AC_ARG_ENABLE(distro-toolchain,
 [AS_HELP_STRING([--enable-distro-toolchain],
                 [Do not use bundled Windows toolchain binaries.])],


=====================================
m4/xcode_version.m4 deleted
=====================================
@@ -1,25 +0,0 @@
-# XCODE_VERSION()
-# --------------------------------
-# Gets the version number of Xcode, if on a Mac
-AC_DEFUN([XCODE_VERSION],[
-    if test "$TargetVendor_CPP" = "apple"
-    then
-        AC_MSG_CHECKING(Xcode version)
-        XcodeVersion=`(xcode-select -p > /dev/null 2>&1 && xcodebuild -version) | grep Xcode | sed "s/Xcode //"`
-        # Old Xcode versions don't actually give the Xcode version
-        if test "$XcodeVersion" = ""
-        then
-            AC_MSG_RESULT(not found (too old?))
-            XcodeVersion1=0
-            XcodeVersion2=0
-        else
-            AC_MSG_RESULT($XcodeVersion)
-            XcodeVersion1=`echo "$XcodeVersion" | sed 's/\..*//'`
-            changequote(, )dnl
-            XcodeVersion2=`echo "$XcodeVersion" | sed 's/[^.]*\.\([^.]*\).*/\1/'`
-            changequote([, ])dnl
-            AC_MSG_NOTICE(Xcode version component 1: $XcodeVersion1)
-            AC_MSG_NOTICE(Xcode version component 2: $XcodeVersion2)
-        fi
-    fi
-])



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/a3ee3b99e6889fd68da75c6ea7a14d101f71da56

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/a3ee3b99e6889fd68da75c6ea7a14d101f71da56
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/20231212/b6434f25/attachment-0001.html>


More information about the ghc-commits mailing list