avoid-CrossCompilerPrefix-stage2
authorDebian Haskell Group <pkg-haskell-maintainers@lists.alioth.debian.org>
Tue, 29 Aug 2017 21:10:26 +0000 (22:10 +0100)
committerGianfranco Costamagna <locutusofborg@debian.org>
Tue, 29 Aug 2017 21:10:26 +0000 (22:10 +0100)
Gbp-Pq: Name avoid-CrossCompilerPrefix-stage2.patch

mk/config.mk.in

index bfaaa66089f363cdb51c6557f2940c116591af40..c736611f64b76074a994f450595a1ee5327dd9a7 100644 (file)
@@ -518,11 +518,6 @@ SUPPORTS_THIS_UNIT_ID = @SUPPORTS_THIS_UNIT_ID@
 
 WhatGccIsCalled       = @WhatGccIsCalled@
 GccVersion            = @GccVersion@
-ifeq "$(phase)" "0"
-CrossCompilePrefix    =
-else
-CrossCompilePrefix    = @CrossCompilePrefix@
-endif
 # TargetPlatformFull retains the string passed to configure so we have it in
 # the necessary format to pass to libffi's configure.
 TargetPlatformFull    = @TargetPlatformFull@
@@ -557,6 +552,11 @@ CrossCompiling        = @CrossCompiling@
 # See Note [Stage1Only vs stage=1]
 Stage1Only = NO
 
+# Installed tools prefix:
+#    we add prefix to crosscompiler GHC only (ghc-stage1),
+#    not cross-built GHC (not ghc-stage2).
+CrossCompilePrefix    = $(if $(filter YES,$(Stage1Only)),@CrossCompilePrefix@,)
+
 # Install stage 2 by default, or stage 1 in the cross compiler
 # case. Can be changed to 3
 INSTALL_GHC_STAGE= $(if $(filter YES,$(Stage1Only)),1,2)