Build system: remove hack for Mac OSX in configure.ac (#10476)
authorThomas Miedema <thomasmiedema@gmail.com>
Mon, 7 Sep 2015 13:58:33 +0000 (15:58 +0200)
committerThomas Miedema <thomasmiedema@gmail.com>
Tue, 8 Sep 2015 08:05:16 +0000 (10:05 +0200)
Cross-compilation on Mac OSX currently doesn't work. While building
stage 1, the build system uses the `ar` for the target architecture
instead of the `ar` for build/host architecture.

The cause is a hack added in 24746fe78024a1edab843bc710c79c55998ab134
(2010), to supporting bootstrap compilers built with older versions of
Xcode. Xcode 4.3 started installing command line tools in a different
location. Assuming this all behind us now, and the paths didn't change
again (you never now), we can delete the hack.

Deleting the hack fixes the cross compilation issue. Tested by Trac user
jakzale.

Reviewed by: austin

Differential Revision: https://phabricator.haskell.org/D1231

configure.ac

index 793ec0f..47b07dd 100644 (file)
@@ -121,20 +121,13 @@ if test "$WithGhc" != ""; then
   GhcMinVersion2=`echo "$GhcMinVersion" | sed 's/^\\(.\\)$/0\\1/'`
   GhcCanonVersion="$GhcMajVersion$GhcMinVersion2"
 
-  BOOTSTRAPPING_GHC_INFO_FIELD([OS_STAGE0],[target os])
   BOOTSTRAPPING_GHC_INFO_FIELD([CC_STAGE0],[C compiler command])
   dnl ToDo, once "ld command" is reliably available.
   dnl Then, we can remove the LD_STAGE0 hack in mk/build-package-date.mk
   dnl BOOTSTRAPPING_GHC_INFO_FIELD([LD_STAGE0],[ld command])
-  if test "x$OS_STAGE0" != "xOSDarwin"; then
-    BOOTSTRAPPING_GHC_INFO_FIELD([AR_STAGE0],[ar command])
-    BOOTSTRAPPING_GHC_INFO_FIELD([AR_OPTS_STAGE0],[ar flags])
-    BOOTSTRAPPING_GHC_INFO_FIELD([ArSupportsAtFile_STAGE0],[ar supports at file])
-  else
-    AR_STAGE0='$(AR)'
-    AR_OPTS_STAGE0='$(AR_OPTS)'
-    ArSupportsAtFile_STAGE0='$(ArSupportsAtFile)'
-  fi
+  BOOTSTRAPPING_GHC_INFO_FIELD([AR_STAGE0],[ar command])
+  BOOTSTRAPPING_GHC_INFO_FIELD([AR_OPTS_STAGE0],[ar flags])
+  BOOTSTRAPPING_GHC_INFO_FIELD([ArSupportsAtFile_STAGE0],[ar supports at file])
 fi
 
 dnl ** Must have GHC to build GHC