[Testing] Add support for building binutils with mingw64

This commit is contained in:
Herman S.
2026-02-14 16:53:07 +09:00
parent f2b9b57e18
commit 92b341e50c
3 changed files with 68 additions and 1 deletions

View File

@@ -37,6 +37,12 @@ echo ""
echo "Patching binutils with vmx128 support..."
patch -p0 < $THIS_SCRIPT_DIR/binutils-$SNAPSHOT_VERSION-vmx128.patch
if [ "$(uname -o 2>/dev/null)" = "Msys" ] && [ -n "$MINGW_PREFIX" ]; then
echo ""
echo "Patching binutils for mingw64 compatibility..."
patch -p0 < $THIS_SCRIPT_DIR/binutils-$SNAPSHOT_VERSION-mingw64.patch
fi
echo ""
echo "Running ./configure..."
./configure \
@@ -58,6 +64,16 @@ echo ""
echo "Running make install..."
make install
if [ "$(uname -o 2>/dev/null)" = "Msys" ] && [ -n "$MINGW_PREFIX" ]; then
echo ""
echo "Copying MinGW runtime DLLs..."
for dll in libiconv-2.dll zlib1.dll; do
if [ -f "$MINGW_PREFIX/bin/$dll" ] && [ ! -f "$THIS_SCRIPT_DIR/bin/$dll" ]; then
cp "$MINGW_PREFIX/bin/$dll" "$THIS_SCRIPT_DIR/bin/"
fi
done
fi
cd ..
echo ""