Skip to content

Commit

Permalink
Cabal: patch to not pass host flag
Browse files Browse the repository at this point in the history
We pass manually using `--configure-option`
  • Loading branch information
MrAdityaAlok committed Jan 26, 2024
1 parent 6453dd9 commit 6e96ad3
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
13 changes: 13 additions & 0 deletions scripts/cabal-install/dont-pass-host-flag.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
--- cabal-Cabal-v3.10.1.0/Cabal/src/Distribution/Simple/ConfigureScript.hs 2023-03-09 21:16:30.000000000 +0530
+++ cabal-Cabal-v3.10.1.0.mod/Cabal/src/Distribution/Simple/ConfigureScript.hs 2024-01-26 14:37:01.961853234 +0530
@@ -133,9 +133,7 @@
overEnv = ("CFLAGS", Just cflagsEnv) :
[("PATH", Just pathEnv) | not (null extraPath)] ++
cabalFlagEnv
- hp = hostPlatform lbi
- maybeHostFlag = if hp == buildPlatform then [] else ["--host=" ++ show (pretty hp)]
- args' = configureFile':args ++ ["CC=" ++ ccProgShort] ++ maybeHostFlag
+ args' = configureFile':args ++ ["CC=" ++ ccProgShort]
shProg = simpleProgram "sh"
progDb = modifyProgramSearchPath
(\p -> map ProgramSearchPathDir extraPath ++ p) emptyProgramDb
4 changes: 3 additions & 1 deletion scripts/compile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ build_cabal() {

cd "${build_dir}"

patch -p1 <"${ROOT}"/cabal-install/fix-cabal-osStr.patch
for patch in "${ROOT}"/cabal-install/*.patch; do
patch -p1 <"$patch"
done

mkdir -p "${build_dir}/bin"
cabal install cabal-install \
Expand Down

0 comments on commit 6e96ad3

Please sign in to comment.