From 62c14836f395b95da5821c33b0c5fd5b87a48e28 Mon Sep 17 00:00:00 2001 From: Matt Birkholz Date: Fri, 13 Dec 2019 17:46:43 -0700 Subject: [PATCH] devops: Support a flag day for x86-64 host 10.1.10. --- src/devops/build.scm | 21 +++++++++++++++++---- src/devops/devops.scm | 37 +------------------------------------ 2 files changed, 18 insertions(+), 40 deletions(-) diff --git a/src/devops/build.scm b/src/devops/build.scm index fb3ed912e..82f04cfc8 100644 --- a/src/devops/build.scm +++ b/src/devops/build.scm @@ -101,9 +101,13 @@ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. (define (build-core-pkg name vers) (let ((sarch build-scheme-architecture) (pkgdir (string build-dir"/"name"-"vers)) - (options (if (string-prefix? "svm" build-scheme-architecture) - (string " --enable-native-code="build-scheme-architecture) - ""))) + (options (string + (if (flag-day?) + " --enable-cross-compiling" + "") + (if (string-prefix? "svm" build-scheme-architecture) + (string " --enable-native-code="build-scheme-architecture) + "")))) (run "rm -rf "pkgdir) (run "cd "build-dir" && tar xzf "name"-"vers".tar.gz") (run "cd "pkgdir"/src && ./configure" options) @@ -127,7 +131,12 @@ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. (let ((pkgdir (string build-dir"/"name"-"vers))) (run "rm -rf "pkgdir) (run "cd "build-dir" && tar xJf "name"_"vers".tar.xz") - (run "cd "pkgdir" && dpkg-buildpackage -b -uc") + (if (flag-day?) + (with-subprocess-environment-variable + "CONF_FLAGS" "--enable-cross-compiling" + (lambda () + (run "cd "pkgdir" && dpkg-buildpackage -b -uc"))) + (run "cd "pkgdir" && dpkg-buildpackage -b -uc")) (let ((darch build-debian-architecture)) (set-file-modes! (string build-dir"/"name"_"vers"_"darch".deb") #o444) (set-file-modes! (string build-dir"/"name"_"vers"_"darch".changes") #o444) @@ -138,6 +147,10 @@ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. (run "rm -rf "pkgdir) (run "sudo "project-name"-install "name"_"vers"_"darch".deb")))) +(define (flag-day?) + (and (equal? '(10 1 10) (get-subsystem-version "Release")) + (equal? 'x86-64 microcode-id/compiled-code-type))) + (define (build-plugin-pkg name vers) (let ((pkgdir (string build-dir"/"name"-"vers))) (run "rm -rf "pkgdir) diff --git a/src/devops/devops.scm b/src/devops/devops.scm index f21b3e11a..52717f002 100644 --- a/src/devops/devops.scm +++ b/src/devops/devops.scm @@ -780,7 +780,6 @@ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. (a.v (read-host-arch.version host-exe)) (host-arch (symbol->string (car a.v))) (host-version (cdr a.v)) - (cross? (and target (not (string=? target host-arch)))) (master? (cond ((file-directory? ".git") (not (file-directory? "debian"))) ((file-directory? "../.git") @@ -805,40 +804,6 @@ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. (error "Not a git working directory:" (working-directory-pathname)))) - (if cross? - (let ((config-options - (decorated-string-append - "" " " "" - (filter (lambda (option) - (not (string-prefix? option "--enable-debugging"))) - (burst-string make-config #\space #t))))) - (if (not (file-directory? "cross")) - (make-directory "cross")) - (cond ((file-directory? ".git") - (for-each (lambda (name) - (lndir* name "src/" "cross/" "../src")) - (sort string