Upgrade to nasm 2.15.05 draft
authorMike Hommey <mh+mozilla@glandium.org>
Wed, 17 Feb 2021 15:03:00 +0900
changeset 3544876 a7bcd131fb3719184831a556408920fa3839de58
parent 3544157 c1db635de2e140dcf35e5a93e0e8fd94fa7474f3
child 3693100 211913b90cd34839c4c1a8939299703231dd2aed
push id656063
push usermh@glandium.org
push dateWed, 17 Feb 2021 06:21:49 +0000
treeherdertry@a7bcd131fb37 [default view] [failures only]
milestone87.0a1
Upgrade to nasm 2.15.05
taskcluster/ci/fetch/toolchains.yml
taskcluster/ci/toolchain/nasm.yml
taskcluster/scripts/misc/build-nasm.sh
--- a/taskcluster/ci/fetch/toolchains.yml
+++ b/taskcluster/ci/fetch/toolchains.yml
@@ -210,23 +210,23 @@ mpfr-3.1.5:
 nasm-2.14.02:
     description: nasm 2.14.02 source code
     fetch:
         type: static-url
         url: https://www.nasm.us/pub/nasm/releasebuilds/2.14.02/nasm-2.14.02.tar.xz
         sha256: e24ade3e928f7253aa8c14aa44726d1edf3f98643f87c9d72ec1df44b26be8f5
         size: 827620
 
-nasm-2.13.02:
-    description: nasm 2.13.02 source code
+nasm-2.15.05:
+    description: nasm 2.15.05 source code
     fetch:
         type: static-url
-        url: https://www.nasm.us/pub/nasm/releasebuilds/2.13.02/nasm-2.13.02.tar.xz
-        sha256: 8ac3235f49a6838ff7a8d7ef7c19a4430d0deecc0c2d3e3e237b5e9f53291757
-        size: 805744
+        url: https://www.nasm.us/pub/nasm/releasebuilds/2.15.05/nasm-2.15.05.tar.xz
+        sha256: 3caf6729c1073bf96629b57cee31eeb54f4f8129b01902c73428836550b30a3f
+        size: 995732
 
 wix-3.14.0:
     description: wix 3.14.0.2812 binary release
     # WIX doesn't use a wrapping toplevel DIR, so we should really repackage it when
     # Bug 1479533 and related code is ready.
     fetch:
         type: static-url
         # This is a dev version of the toolset, upstream will purge over time...
--- a/taskcluster/ci/toolchain/nasm.yml
+++ b/taskcluster/ci/toolchain/nasm.yml
@@ -18,32 +18,32 @@ win64-nasm:
         symbol: TW64(nasm)
     worker:
         docker-image: {in-tree: mingw32-build}
     run:
         script: build-nasm.sh
         arguments: ['win64']
     fetches:
         fetch:
-            - nasm-2.14.02
+            - nasm-2.15.05
         toolchain:
             - linux64-clang-mingw-x64
 
 macosx64-nasm:
     description: "nasm macosx64 build"
     attributes:
         local-toolchain: true
     treeherder:
         symbol: TM(nasm)
     run:
         script: build-nasm.sh
         arguments: ['macosx64']
     fetches:
         fetch:
-            - nasm-2.14.02
+            - nasm-2.15.05
         toolchain:
             - linux64-cctools-port-clang-11
             - linux64-clang-11-macosx-cross
             - macosx64-sdk-10.12
 
 linux64-nasm:
     description: "nasm linux64 build"
     attributes:
@@ -52,17 +52,17 @@ linux64-nasm:
         docker-image: {in-tree: deb10-toolchain-build}
     treeherder:
         symbol: TL(nasm)
     run:
         script: build-nasm.sh
         arguments: ['linux64']
     fetches:
         fetch:
-            - nasm-2.14.02
+            - nasm-2.15.05
         toolchain:
             - linux64-clang-11
             - linux64-sysroot
 
 linux64-nasm-2.14.02:
     description: "nasm linux64 minimum supported version build"
     treeherder:
         symbol: TL(nasm-2.14.02)
--- a/taskcluster/scripts/misc/build-nasm.sh
+++ b/taskcluster/scripts/misc/build-nasm.sh
@@ -3,30 +3,19 @@ set -x -e -v
 
 COMPRESS_EXT=bz2
 
 if [ -n "$TOOLTOOL_MANIFEST" ]; then
   . $GECKO_PATH/taskcluster/scripts/misc/tooltool-download.sh
 fi
 
 cd $MOZ_FETCHES_DIR/nasm-*
-case "$1" in
-    win64)
-        export PATH="$MOZ_FETCHES_DIR/clang/bin:$PATH"
-        ./configure CC=x86_64-w64-mingw32-clang AR=llvm-ar RANLIB=llvm-ranlib --host=x86_64-w64-mingw32
-        EXE=.exe
-        ;;
-    macosx64)
-        export PATH="$MOZ_FETCHES_DIR/clang/bin:$MOZ_FETCHES_DIR/cctools/bin:$PATH"
-        export LD_LIBRARY_PATH="$MOZ_FETCHES_DIR/clang/lib"
-        ./configure CC="clang --target=x86_64-apple-darwin -isysroot $MOZ_FETCHES_DIR/MacOSX10.12.sdk" --host=x86_64-apple-darwin
-	cat config.log
-        EXE=
-	;;
-    *)
+
+case $PWD in
+*nasm-2.14.02)
         # Fix for .debug_loc section containing garbage on elf32
         # https://bugzilla.nasm.us/show_bug.cgi?id=3392631
         patch -p1 <<'EOF'
 diff --git a/output/outelf.c b/output/outelf.c
 index de99d076..47031e12 100644
 --- a/output/outelf.c
 +++ b/output/outelf.c
 @@ -3275,7 +3275,7 @@ static void dwarf_generate(void)
@@ -34,16 +23,33 @@ index de99d076..47031e12 100644
  
      /* build loc section */
 -    loclen = 16;
 +    loclen = is_elf64() ? 16 : 8;
      locbuf = pbuf = nasm_malloc(loclen);
      if (is_elf32()) {
          WRITELONG(pbuf,0);  /* null  beginning offset */
 EOF
+	;;
+esac
+
+case "$1" in
+    win64)
+        export PATH="$MOZ_FETCHES_DIR/clang/bin:$PATH"
+        ./configure CC=x86_64-w64-mingw32-clang AR=llvm-ar RANLIB=llvm-ranlib --host=x86_64-w64-mingw32
+        EXE=.exe
+        ;;
+    macosx64)
+        export PATH="$MOZ_FETCHES_DIR/clang/bin:$MOZ_FETCHES_DIR/cctools/bin:$PATH"
+        export LD_LIBRARY_PATH="$MOZ_FETCHES_DIR/clang/lib"
+        ./configure CC="clang --target=x86_64-apple-darwin -isysroot $MOZ_FETCHES_DIR/MacOSX10.12.sdk" --host=x86_64-apple-darwin
+	cat config.log
+        EXE=
+	;;
+    *)
         ./configure CC="$MOZ_FETCHES_DIR/clang/bin/clang" CFLAGS="--sysroot=$MOZ_FETCHES_DIR/sysroot"
         EXE=
         ;;
 esac
 make -j$(nproc)
 
 mv nasm$EXE nasm-tmp
 mkdir nasm