From ec561dae947c77d0ef606543b747e8967fc02431 Mon Sep 17 00:00:00 2001 From: Christopher Wellons Date: Mon, 29 Jul 2024 14:06:45 -0400 Subject: [PATCH] Remove NASM from the distribution It's proven less useful than I originally hoped, and it's nearly always better to use the GNU assembler instead. NASM doesn't support DWARF with COFF, so it cannot be debugged with GDB. It's also ~100x slower than as, which makes a huge different for generated assembly. With the autotools fixes, it's now easy to natively build NASM from source using w64dk. --- Dockerfile | 12 ------------ README.md | 9 ++------- src/SHA256SUMS | 1 - 3 files changed, 2 insertions(+), 20 deletions(-) diff --git a/Dockerfile b/Dockerfile index 779c348..a7f702a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,7 +14,6 @@ ARG MAKE_VERSION=4.4.1 ARG MINGW_VERSION=12.0.0 ARG MPC_VERSION=1.3.1 ARG MPFR_VERSION=4.2.1 -ARG NASM_VERSION=2.15.05 ARG PDCURSES_VERSION=3.9 ARG CPPCHECK_VERSION=2.10 ARG VIM_VERSION=9.0 @@ -36,7 +35,6 @@ RUN curl --insecure --location --remote-name-all --remote-header-name \ https://ftp.gnu.org/gnu/libiconv/libiconv-$LIBICONV_VERSION.tar.gz \ https://frippery.org/files/busybox/busybox-w32-$BUSYBOX_VERSION.tgz \ http://ftp.vim.org/pub/vim/unix/vim-$VIM_VERSION.tar.bz2 \ - https://www.nasm.us/pub/nasm/releasebuilds/$NASM_VERSION/nasm-$NASM_VERSION.tar.xz \ https://github.com/universal-ctags/ctags/archive/refs/tags/v$CTAGS_VERSION.tar.gz \ https://downloads.sourceforge.net/project/mingw-w64/mingw-w64/mingw-w64-release/mingw-w64-v$MINGW_VERSION.tar.bz2 \ https://downloads.sourceforge.net/project/pdcurses/pdcurses/$PDCURSES_VERSION/PDCurses-$PDCURSES_VERSION.tar.gz \ @@ -56,7 +54,6 @@ RUN sha256sum -c $PREFIX/src/SHA256SUMS \ && tar xzf make-$MAKE_VERSION.tar.gz \ && tar xjf mingw-w64-v$MINGW_VERSION.tar.bz2 \ && tar xzf PDCurses-$PDCURSES_VERSION.tar.gz \ - && tar xJf nasm-$NASM_VERSION.tar.xz \ && tar xjf vim-$VIM_VERSION.tar.bz2 \ && tar xzf cppcheck-$CPPCHECK_VERSION.tar.gz COPY src/w64devkit.c src/w64devkit.ico src/libmemory.c src/libchkstk.S \ @@ -444,15 +441,6 @@ RUN ARCH= make -j$(nproc) -f Make_ming.mak \ '$VIMRUNTIME/tutor/tutor' '%TMP%/tutor%RANDOM%' \ >$PREFIX/bin/vimtutor.bat -# NOTE: nasm's configure script is broken, so no out-of-source build -WORKDIR /nasm-$NASM_VERSION -RUN ./configure \ - --host=$ARCH \ - CFLAGS="-Os" \ - LDFLAGS="-s" \ - && make -j$(nproc) \ - && cp nasm.exe ndisasm.exe $PREFIX/bin - WORKDIR /ctags-$CTAGS_VERSION RUN sed -i /RT_MANIFEST/d win32/ctags.rc \ && make -j$(nproc) -f mk_mingw.mak CC=gcc packcc.exe \ diff --git a/README.md b/README.md index aed0953..be15f2b 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,6 @@ Included tools: * [busybox-w32][bb] : standard unix utilities, including sh * [Vim][vim] : powerful text editor * [Universal Ctags][ctags] : source navigation -* [NASM][nasm] : x86 assembler * [Cppcheck][cppcheck] : static code analysis The toolchain includes pthreads, C++11 threads, and OpenMP. All included @@ -124,11 +123,9 @@ w64devkit's capabilities. In rough order of importance: * [BusyBox man pages][doc-bb] (TXT), though everything here is also available via `-h` option inside w64devkit. -* [NASM manual][doc-nasm] (PDF) - * [Intel Software Developer Manuals][doc-intel] (PDF), for referencing x86 - instructions, when either studying compiler output with `objdump`, or - writing assembly with `nasm` or `as`. + instructions, when either studying compiler output with `objdump` or + writing assembly. ## Library installation @@ -239,7 +236,6 @@ binaries. [doc-intr]: https://software.intel.com/sites/landingpage/IntrinsicsGuide/ [doc-ld]: https://sourceware.org/binutils/docs/ [doc-make]: https://www.gnu.org/software/make/manual/ -[doc-nasm]: https://www.nasm.us/docs.php [doc-std]: https://stackoverflow.com/a/83763 [doc-win32]: https://web.archive.org/web/20220922051031/http://www.laurencejackson.com/win32/ [gdb]: https://www.gnu.org/software/gdb/ @@ -249,7 +245,6 @@ binaries. [lic2]: https://sourceforge.net/p/mingw-w64/mingw-w64/ci/master/tree/mingw-w64-libraries/winpthreads/COPYING [make]: https://www.gnu.org/software/make/ [names]: https://learn.microsoft.com/en-us/cpp/build/reference/decorated-names -[nasm]: https://www.nasm.us/ [quilt]: http://savannah.nongnu.org/projects/quilt [san]: http://mingw-w64.org/doku.php/contribute#sanitizers_asan_tsan_usan [san2]: https://groups.google.com/forum/#!topic/address-sanitizer/q0e5EBVKZT4 diff --git a/src/SHA256SUMS b/src/SHA256SUMS index 9c619d1..3d579a3 100644 --- a/src/SHA256SUMS +++ b/src/SHA256SUMS @@ -11,6 +11,5 @@ dd16fb1d67bfab79a72f5e8390735c49e3e8e70b4945a15ab1f81ddb78658fb3 make-4.4.1.tar cc41898aac4b6e8dd5cffd7331b9d9515b912df4420a3a612b5ea2955bbeed2f mingw-w64-v12.0.0.tar.bz2 ab642492f5cf882b74aa0cb730cd410a81edcdbec895183ce930e706c1c759b8 mpc-1.3.1.tar.gz 277807353a6726978996945af13e52829e3abd7a9a5b7fb2793894e18f1fcbb2 mpfr-4.2.1.tar.xz -3caf6729c1073bf96629b57cee31eeb54f4f8129b01902c73428836550b30a3f nasm-2.15.05.tar.xz 590dbe0f5835f66992df096d3602d0271103f90cf8557a5d124f693c2b40d7ec PDCurses-3.9.tar.gz a6456bc154999d83d0c20d968ac7ba6e7df0d02f3cb6427fb248660bacfb336e vim-9.0.tar.bz2