x86-64: hack the ABI of cg_upcall_ipret_copy_variable_to_pointer
[ajla.git] / dist-w64.sh
blobb8ff77e8b707e2872b60b5766699c71a8ac91711
1 #!/bin/sh
3 # Copyright (C) 2024 Mikulas Patocka
5 # This file is part of Ajla.
7 # Ajla is free software: you can redistribute it and/or modify it under the
8 # terms of the GNU General Public License as published by the Free Software
9 # Foundation, either version 3 of the License, or (at your option) any later
10 # version.
12 # Ajla is distributed in the hope that it will be useful, but WITHOUT ANY
13 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
14 # A PARTICULAR PURPOSE. See the GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License along with
17 # Ajla. If not, see <https://www.gnu.org/licenses/>.
19 set -e
20 rm -rf ajla
21 cp /usr/x86_64-w64-mingw32/sys-root/mingw/bin/libffi-6.dll .
22 cp /usr/x86_64-w64-mingw32/sys-root/mingw/bin/libgcc_s_seh-1.dll .
23 cp /usr/x86_64-w64-mingw32/sys-root/mingw/bin/libgmp-10.dll .
24 cp /usr/x86_64-w64-mingw32/sys-root/mingw/bin/libquadmath-0.dll .
25 cp /usr/x86_64-w64-mingw32/sys-root/mingw/bin/libwinpthread-1.dll .
26 CC=x86_64-w64-mingw32-gcc ./rebuild
27 VERSION="`sed -n 's/^.*"\(.*\)"$/\1/p' <version.h`"
28 mkdir ajla
29 cp -r ajla.exe libffi-6.dll libgcc_s_seh-1.dll libgmp-10.dll libquadmath-0.dll libwinpthread-1.dll builtin.pcd AUTHORS COPYING ChangeLog README charsets stdlib ajla
30 mkdir ajla/programs
31 cp -r programs/acmd ajla/programs
32 rm -f ajla-$VERSION-win64.zip
33 zip -r ajla-$VERSION-win64.zip ajla
34 rm -rf ajla