From 7838d6e68371c606b827d037ec36d65b8047da67 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Mon, 22 Jun 2020 12:57:29 +0800 Subject: [PATCH] conda-windows: make binutils generic --- artiq-fast/conda-windows/binutils-recipe/bld.bat | 4 ++-- artiq-fast/conda-windows/binutils-recipe/meta.yaml | 4 ++-- artiq-fast/conda-windows/binutils.nix | 8 +++++--- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/artiq-fast/conda-windows/binutils-recipe/bld.bat b/artiq-fast/conda-windows/binutils-recipe/bld.bat index 0971d9b..fa5fe84 100644 --- a/artiq-fast/conda-windows/binutils-recipe/bld.bat +++ b/artiq-fast/conda-windows/binutils-recipe/bld.bat @@ -8,7 +8,7 @@ set CFLAGS=-I%PREFIX:\=/%/Library/include/ set LDFLAGS=-L%PREFIX:\=/%/Library/lib/ sh ../configure --build=%TRIPLE% ^ --prefix="%PREFIX:\=/%/Library" ^ - --target=or1k-linux + --target=##TARGET## if errorlevel 1 exit 1 make -j4 @@ -18,4 +18,4 @@ make install if errorlevel 1 exit 1 rem this is a copy of prefixed executables -rmdir /S /Q %PREFIX%\Library\or1k-linux +rmdir /S /Q %PREFIX%\Library\##TARGET## diff --git a/artiq-fast/conda-windows/binutils-recipe/meta.yaml b/artiq-fast/conda-windows/binutils-recipe/meta.yaml index 230fa70..a9532a6 100644 --- a/artiq-fast/conda-windows/binutils-recipe/meta.yaml +++ b/artiq-fast/conda-windows/binutils-recipe/meta.yaml @@ -1,6 +1,6 @@ package: - name: binutils-or1k-linux - version: 2.30 + name: binutils-##TARGET## + version: ##VERSION## source: url: ../src.tar.bz2 diff --git a/artiq-fast/conda-windows/binutils.nix b/artiq-fast/conda-windows/binutils.nix index 3d2baee..fbe473f 100644 --- a/artiq-fast/conda-windows/binutils.nix +++ b/artiq-fast/conda-windows/binutils.nix @@ -31,11 +31,13 @@ let ${wfvm.utils.win-put}/bin/win-put ${vs2015_runtime-filename} ./fake-channel/win-64 ${wfvm.utils.win-exec}/bin/win-exec ".\Anaconda3\scripts\activate && conda index fake-channel" - ln -s ${./binutils-recipe} binutils + cp --no-preserve=mode,ownership -R ${./binutils-recipe} binutils + sed -i s/##TARGET##/${target}/g binutils/* + sed -i s/##VERSION##/${version}/g binutils/* ${wfvm.utils.win-put}/bin/win-put binutils . tar xjf ${src} - patch -d binutils-2.30 -p1 < ${./binutils-hack-libiconv.patch} - tar cjf src.tar.bz2 binutils-2.30 + patch -d binutils-${version} -p1 < ${./binutils-hack-libiconv.patch} + tar cjf src.tar.bz2 binutils-${version} ${wfvm.utils.win-put}/bin/win-put src.tar.bz2 . ${wfvm.utils.win-exec}/bin/win-exec "set MSYS=C:\MSYS64 && set PATH=%MSYS%\usr\bin;%MSYS%\mingw64\bin;%PATH% && .\Anaconda3\scripts\activate && conda build --no-anaconda-upload --no-test -c file:///C:/users/wfvm/fake-channel --override-channels binutils"