if ab_match_arch amd64 || \
   ab_match_arch i486; then
    abinfo "Building Memtest86+ executable (x86-32) ..."
    make \
        -C "$SRCDIR"/build/i586

    abinfo "Installing Memtest86+ executable (x86-32) ..."
    install -Dm644 "$SRCDIR"/build/i586/mt86plus \
        "$PKGDIR"/boot/memtest86plus/memtest32

    if ab_match_arch amd64; then
        abinfo "Building Memtest86+ executable (x86-64) ..."
        make \
            -C "$SRCDIR"/build/x86_64

        abinfo "Installing Memtest86+ executable (x86-64) ..."
        install -Dvm644 "$SRCDIR"/build/x86_64/mt86plus \
            "$PKGDIR"/boot/memtest86plus/memtest64
    fi
elif ab_match_arch loongarch64; then
    abinfo "Building Memtest86+ executable (loongarch64) ..."
    make \
        -C "$SRCDIR"/build/loongarch64

    abinfo "Installing Memtest86+ executable (loongarch64) ..."
    install -Dvm644 "$SRCDIR"/build/loongarch64/mt86plus \
        "$PKGDIR"/boot/memtest86plus/memtest64
fi
