(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)
(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)
(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)
(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")
(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<? (directory-file-names "src"))))
- ((file-directory? "../.git")
- (for-each (lambda (name)
- (lndir* name "../src/" "cross/" "../../src"))
- (directory-file-names "../src")))
- (else
- (error "Unexpected source directory:"
- (working-directory-pathname))))
- (if (not (file-exists? "cross/configure"))
- (trun "cd cross/ && ./Setup.sh"))
- (if (not (file-exists? "cross/Makefile"))
- (trun "cd cross/ && ./configure --prefix="prefix
- " --disable-default-plugins"
- (if (not (string=? target host-arch))
- (string-append
- " --enable-cross-compiling"
- " --enable-native-code="target
- " "config-options)
- (string-append
- " "config-options))))
- (trun "cd cross/ && make all")))
-
(cond ((file-directory? ".git"))
((file-directory? "../.git")
(lndir "../src"))
(if (not (file-exists? "src/Makefile"))
(trun "cd src/ && ./configure --prefix="prefix
(if (not master?) " --disable-default-plugins" "")
- (if cross? " --with-scheme-build=../cross " " ")
+ (if (not (string-null? make-config)) " " "")
make-config))
(trun "cd src/ && make tags")
(trun "cd src/ && make all")