]> xenbits.xensource.com Git - livepatch-build-tools.git/commitdiff
Prevent spurious rebuilding
authorRoss Lagerwall <ross.lagerwall@citrix.com>
Wed, 20 Jul 2016 14:42:17 +0000 (15:42 +0100)
committerRoss Lagerwall <ross.lagerwall@citrix.com>
Thu, 21 Jul 2016 14:45:17 +0000 (15:45 +0100)
Don't change the timestamp of arch/x86/Makefile when editing it since it
forces much of the Xen tree to be rebuilt and then requires many
invocations of create-diff-tool.

This is safe since the Makefile change only changes the final link rule,
and xen will be relinked anyway.

Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
livepatch-build

index d9d9da37ebe26ecc52d85e955d7290b407a8a6b0..c057fa1974b57d7e29bcc682f0ea641a3722c071 100755 (executable)
@@ -98,10 +98,13 @@ function build_special()
     # Build with special GCC flags
     cd "${SRCDIR}/xen" || die
     sed -i 's/CFLAGS += -nostdinc/CFLAGS += -nostdinc -ffunction-sections -fdata-sections/' Rules.mk
+    cp -p arch/x86/Makefile arch/x86/Makefile.bak
     sed -i 's/--section-alignment=0x200000/--section-alignment=0x1000/' arch/x86/Makefile
+    # Restore timestamps to prevent spurious rebuilding
+    touch --reference=arch/x86/Makefile.bak arch/x86/Makefile
     make "-j$CPUS" $XEN_DEBUG &> "${OUTPUT}/build_${name}_compile.log" || die
     sed -i 's/CFLAGS += -nostdinc -ffunction-sections -fdata-sections/CFLAGS += -nostdinc/' Rules.mk
-    sed -i 's/--section-alignment=0x1000/--section-alignment=0x200000/' arch/x86/Makefile
+    mv -f arch/x86/Makefile.bak arch/x86/Makefile
 
     unset LIVEPATCH_BUILD_DIR
     unset LIVEPATCH_CAPTURE_DIR