Commit Graph

114 Commits

Author SHA1 Message Date
Jean-Pierre De Jesus DIAZ b40a44430f
guix: gnu-build-system: Handle missing libc.
* guix/build-system/gnu.scm (standard-cross-packages): Handle the case
  when `cross-libc` returns #f.

Change-Id: I85ee5456f10ff141d521a5f2d91267cd612c5616
Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
2023-12-11 11:53:54 +02:00
Josselin Poiret 0dd293b4d9
gnu: Add libc-for-target and glibc/hurd.
* gnu/packages/patches/glibc-2.37-hurd-clock_t_centiseconds.patch
* gnu/packages/patches/glibc-2.37-hurd-local-clock_gettime_MONOTONIC.patch
* gnu/packages/patches/glibc-2.37-versioned-locpath.patch: New patches.
* gnu/local.mk (dist_patch_DATA): Register them.

* gnu/packages/base.scm (glibc/hurd, libc-for-target): New variables.
(glibc/hurd-headers): Use glibc/hurd.
* gnu/packages/commencement.scm (glibc-final-with-bootstrap-bash)[outputs,
source, arguments]
(glibc-final)[source]: Use libc-for-target instead of glibc.
* gnu/packages/cross-base.scm (cross-libc/deprecated, cross-libc*): Use
libc-for-target.

This part fixes

    https://issues.guix.gnu.org/63641#25

* gnu/packages/commencement.scm (%final-inputs): Change to memoized lambda
taking "system".
* gnu/packages/commencement.scm (canonical-package): Likewise, and update
user, passing (%current-system).
(make-gcc-toolchain): Update user, passing (%current-system).
* gnu/packages/base.scm (%final-inputs): Likewise.
* guix/scripts/refresh.scm (options->update-specs): Likewise.
* guix/build-system/gnu.scm (standard-packages): Add optional "system"
parameter.
(lower): Update caller.

Co-authored-by: Ludovic Courtès <ludo@gnu.org>
Co-authored-by: Janneke Nieuwenhuizen <janneke@gnu.org>
2023-07-13 18:20:05 +02:00
Andreas Enge ccb62d8feb
Merge remote-tracking branch 'origin/master' into core-updates 2023-03-20 18:49:06 +01:00
Ludovic Courtès ae587c2ef0
guix: Strip #:use-module lists.
This was obtained by setting up this environment:

  guix shell -D guix --with-input=guile@3.0.9=guile-next \
    --with-commit=guile-next=e2ed33ef0445c867fe56c247054aa67e834861f2
    -- make -j5

then adding 'unused-module' to (@@ (guix build compiler) %warnings),
building, and checking all the "unused module" warnings and removing
those that were definitely unused.
2023-03-13 15:08:33 +01:00
Ludovic Courtès 476741c5bb
build-system/gnu: 'static-package' uses gexps.
* guix/build-system/gnu.scm (static-package): Use gexps.
2023-02-28 17:10:40 +01:00
Efraim Flashner 4cf1acc7f3
Merge remote-tracking branch 'origin/master' into core-updates
Conflicts:
	doc/guix.texi
	gnu/local.mk
	gnu/packages/admin.scm
	gnu/packages/base.scm
	gnu/packages/chromium.scm
	gnu/packages/compression.scm
	gnu/packages/databases.scm
	gnu/packages/diffoscope.scm
	gnu/packages/freedesktop.scm
	gnu/packages/gnome.scm
	gnu/packages/gnupg.scm
	gnu/packages/guile.scm
	gnu/packages/inkscape.scm
	gnu/packages/llvm.scm
	gnu/packages/openldap.scm
	gnu/packages/pciutils.scm
	gnu/packages/ruby.scm
	gnu/packages/samba.scm
	gnu/packages/sqlite.scm
	gnu/packages/statistics.scm
	gnu/packages/syndication.scm
	gnu/packages/tex.scm
	gnu/packages/tls.scm
	gnu/packages/version-control.scm
	gnu/packages/xml.scm
	guix/build-system/copy.scm
	guix/scripts/home.scm
2023-01-30 12:39:40 +02:00
Ludovic Courtès 3bd4b92f55
build-system/gnu: Turn #:phases into a gexp when cross-compiling.
Previously, we'd get this error:

  $ guix build --target=aarch64-linux-gnu r-minimal -d --no-grafts
  guix build: error: path ‘/gnu/store/[^-]+-glibc-[^-]+-static’ is not valid

This is because the sexp would be passed as an input of the surrounding
gexp in 'gnu-cross-build', and thus
"/gnu/store/[^-]+-glibc-[^-]+-static" would be interpreted as a source
file name, as in this example:

  scheme@(guix gexp)> #~(foo #$(list 'whatever "/gnu/store/[^-]+-glibc-[^-]+-static"))
  $11 = #<gexp (foo #<gexp-input (whatever "/gnu/store/[^-]+-glibc-[^-]+-static"):out>) 7f098badec30>
  scheme@(guix gexp)> (gexp-inputs $11)
  $12 = (#<gexp-input "/gnu/store/[^-]+-glibc-[^-]+-static":out>)

Fixes <https://issues.guix.gnu.org/59073>.
Reported by Christopher Baines <mail@cbaines.net>.

* guix/build-system/gnu.scm (gnu-cross-build): When PHASES is a pair,
pass it through 'sexp->gexp'.
2022-11-08 14:06:00 +01:00
Ludovic Courtès ccc2658e2a
build-system: Factorize 'strip' flags and directories.
Previously only 'gnu-build-system' would default to "--strip-unneeded",
since commit e0f31baacc6ad30096a332b69433c85f5830bb2c; most other build
systems would default to "--strip-debug".

This change brings consistency.

* guix/build-system/gnu.scm (%strip-flags, %strip-directories): Export.
* guix/build-system/cmake.scm (cmake-build, cmake-cross-build): Use them.
* guix/build-system/copy.scm (copy-build): Likewise.
* guix/build-system/dune.scm (dune-build): Likewise.
* guix/build-system/glib-or-gtk.scm (glib-or-gtk-build)
(glib-or-gtk-cross-build): Likewise.
* guix/build-system/maven.scm (maven-build): Likewise.
* guix/build-system/meson.scm (meson-build, meson-cross-build): Likewise.
* guix/build-system/ocaml.scm (ocaml-build): Likewise.
* guix/build-system/qt.scm (qt-build, qt-cross-build): Likewise.
2022-10-08 14:49:56 +02:00
Andrew Tropin aac1065930
build-system/gnu: Fix docstring.
* guix/build-system/gnu.scm (dist-package): Fix docstring.
2022-08-19 18:55:42 +03:00
Efraim Flashner 030900747b
Revert "gnu: Add %final-inputs-riscv64."
This reverts commit 0444be8689.

This is no longer necessary after the gcc STARTFILE_PREFIX_SPEC commit.
2022-03-16 12:16:15 +02:00
Efraim Flashner 0444be8689
gnu: Add %final-inputs-riscv64.
* gnu/packages/commencement.scm (%final-inputs-riscv64): New variable.
* guix/build-system/gnu.scm (standard-inputs): Use %final-inputs-riscv64
when targeting riscv64-linux.
2022-01-27 09:36:36 +02:00
Ludovic Courtès df46bef48e
gexp: Leave grafting as is when lowering allowed/disallowed references.
Fixes <https://issues.guix.gnu.org/50676>.
Reported by Mathieu Othacehe <othacehe@gnu.org>.

Commit a779363b6a was partially incorrect:
references passed to #:allowed-references or #:references-graphs *can*
be lowered as references to grafted elements.  This is for example the
case when doing:

  (computed-file "partition.img" exp
                  #:options `(#:references-graphs ,inputs))

Here INPUTS must be lowered as a reference to suitably grafted elements.
Failing to do that, the reference graph will not match the actual
INPUTS.

However, when building a package, those references must indeed refer
only to ungrafted packages.  This commit preserves that by having build
systems pass #:graft? #f.

* guix/gexp.scm (lower-reference-graphs, lower-references): Remove uses
of 'without-grafting'.  This reverts
a779363b6a.
* guix/build-system/cmake.scm (cmake-build, cmake-cross-build):
Pass #:graft? #f.
* guix/build-system/glib-or-gtk.scm (glib-or-gtk-build)
(glib-or-gtk-cross-build): Likewise.
* guix/build-system/gnu.scm (gnu-build, gnu-cross-build): Likewise.
* guix/build-system/meson.scm (meson-build, meson-cross-build): Likewise.
* guix/build-system/trivial.scm (trivial-build, trivial-cross-build):
Likewise.
* tests/gexp.scm ("lower-object, computed-file + grafts"): New test.
* tests/packages.scm ("trivial with #:allowed-references + grafts"): New
test.
2021-09-25 00:41:32 +02:00
Ludovic Courtès 8a48302318
build-system/gnu: Define '%build-inputs' when cross-compiling.
Reported by Maxime Devos.

* guix/build-system/gnu.scm (gnu-cross-build)[builder]: Define
'%build-inputs' as it existed before
7d873f194c.
2021-07-05 12:35:29 +02:00
Ludovic Courtès 4863c4304e
build-system/gnu: Give #:bootstrap-scripts a valid default.
Commit 9cfc93be30 changed the default
value of #:bootstrap-scripts to #f, which is invalid (it must be a list
of strings).  That default value was used by build systems that inherit
phases from 'gnu-build-system', such as 'qt-build-system', which would
lead to wrong-type-arg errors in the 'boostrap' phase.

Reported by Raghav Gururajan <rg@raghavgururajan.name>.

* guix/build/gnu-build-system.scm (%bootstrap-scripts): New variable.
(bootstrap): Change #:bootstrap-scripts to default to it.
* guix/build-system/gnu.scm (%bootstrap-scripts): Change value.
(gnu-build): #:bootstrap-scripts defaults to %bootstrap-scripts.  Remove
call to 'sexp->gexp'.
(gnu-cross-build): Likewise.
2021-04-09 14:19:34 +02:00
Ludovic Courtès 6cd591155c
build-system: Use 'input-tuples->gexp' and 'outputs->gexp'.
* guix/gexp.scm (input-tuples->gexp, outputs->gexp): Make public.
* guix/build-system/cargo.scm (cargo-build): Use them.
* guix/build-system/gnu.scm (gnu-cross-build): Likewise.
* guix/build-system/ocaml.scm (ocaml-build): Likewise.
* guix/build-system/cmake.scm (cmake-cross-build): Likewise.
2021-03-30 22:48:44 +02:00
Ludovic Courtès f95fc73248
build-system: Use 'sexp->gexp' for plain sexps.
This reduces memory allocations and list traversals during 'gexp->sexp',
'gexp-inputs', etc.

* guix/build-system/cargo.scm (cargo-build): Use 'sexp->gexp' for sexps
known to not contain file-like objects.  Change default #:phases to a
symbol.
* guix/build-system/cmake.scm (cmake-build, cmake-cross-build): Likewise.
* guix/build-system/copy.scm (copy-build): Likewise.
* guix/build-system/font.scm (font-build): Likewise.
* guix/build-system/glib-or-gtk.scm (glib-or-gtk-build): Likewise.
* guix/build-system/gnu.scm (%strip-flags, %strip-directories): New
variables.
(gnu-build): Use them.  Use 'sexp->gexp' where appropriate.
(gnu-cross-build): Likewise.
* guix/build-system/meson.scm (meson-build): Likewise.
* guix/build-system/perl.scm (perl-build): Likewise.
* guix/build-system/python.scm (python-build): Likewise.
* guix/build-system/ruby.scm (ruby-build): Likewise.
* guix/build-system/scons.scm (scons-build): Likewise.
* guix/build-system/texlive.scm (texlive-build): Likewise.
* guix/build-system/trivial.scm (trivial-build): Likewise.
* guix/build-system/waf.scm (waf-build): Likewise.
* guix/build-system/android-ndk.scm (android-ndk-build): Likewise.
* guix/build-system/ant.scm (ant-build): Likewise.
* guix/build-system/asdf.scm (asdf-build/source, asdf-build): Likewise.
* guix/build-system/chicken.scm (chicken-build): Likewise.
* guix/build-system/clojure.scm (clojure-build): Likewise.
(source->output-path, maybe-guile->guile): Remove.
* guix/build-system/dub.scm (dub-build): Likewise.
* guix/build-system/emacs.scm (emacs-build): Likewise.
* guix/build-system/go.scm (go-build): Likewise.
* guix/build-system/haskell.scm (haskell-build): Likewise.
* guix/build-system/julia.scm (julia-build): Likewise.
* guix/build-system/linux-module.scm (linux-module-build)
(linux-module-build-cross): Likewise.
* guix/build-system/maven.scm (maven-build): Likewise.
* guix/build-system/minify.scm (minify-build): Likewise.
* guix/build-system/node.scm (node-build): Likewise.
* guix/build-system/qt.scm (qt-build, qt-cross-build): Likewise.
* guix/build-system/r.scm (r-build): Likewise.
* guix/build-system/rakudo.scm (rakudo-build): Likewise.
* guix/build-system/renpy.scm (renpy-build): Likewise.
* guix/packages.scm (patch-and-repack): Use 'sexp->gexp' when SNIPPET is
a pair.
* guix/svn-download.scm (svn-multi-fetch): Use 'sexp->gexp' for
'svn-multi-reference-locations'.
2021-03-30 22:48:44 +02:00
Ludovic Courtès 7d873f194c
build-system: Rewrite using gexps.
* guix/packages.scm (expand-input): Remove 'store', 'system', and
  'cross-system' parameters; add #:native?.  Rewrite to return
  name/gexp-input tuples.
  (bag->derivation): Adjust accordingly.  Lower (bag-build bag).
  (bag->cross-derivation): Ditto.  Instead of #:native-drvs and
  #:target-drvs, pass #:build-inputs, #:host-inputs, and #:target-inputs.
  (%derivation-cache): Remove.
* gnu/packages/bootstrap.scm (raw-build): Turn into a monadic procedure.
* gnu/packages/commencement.scm (glibc-final)[arguments]: Use
  'gexp-input' for the #:allowed-references argument.
* guix/build-system/cmake.scm (cmake-build): Remove 'store' parameter.
  Switch to the use of gexps and 'gexp->derivation'.
  (lower): Remove #:source from 'private-keywords'.
* guix/build-system/glib-or-gtk.scm (glib-or-gtk-build, lower):
  Likewise.
* guix/build-system/font.scm (font-build): Likewise.
* guix/build-system/gnu.scm (gnu-build): Likewise, and remove
  'canonicalize-reference'.
  (gnu-cross-build): Likewise, and expect #:build-inputs, #:host-inputs,
  and #:target-inputs instead of #:native-drvs and #:target-drvs.
  (lower): Likewise.
* guix/build-system/perl.scm (perl-build, lower): Likewise.
* guix/build-system/python.scm (python-build, lower): Likewise.
* guix/build-system/ruby.scm (ruby-build, lower): Likewise.
* guix/build-system/waf.scm (waf-build, lower): Likewise.
* guix/build-system/trivial.scm (guile-for-build): Remove.
  (trivial-build): Remove 'store' parameter, change to gexps.
  (trivial-cross-build): Ditto, and change to #:build-inputs & co.
* guix/build-system/cargo.scm (cargo-build): Change to 'gexp->derivation'.
* guix/build-system/copy.scm (copy-build): Likewise.
* guix/build-system/dune.scm (dune-build): Likewise.
* guix/build-system/guile.scm (guile-build, guile-cross-build):
  Likewise.
* guix/build-system/meson.scm (meson-build): Likewise.
* guix/build-system/ocaml.scm (ocaml-build): Likewise.
* guix/build-system/scons.scm (scons-build): Likewise.
* guix/build-system/texlive.scm (texlive-build): Likewise.
* guix/build-system/android-ndk.scm (android-ndk-build): Likewise.
* guix/build-system/ant.scm (ant-build): Likewise.
* guix/build-system/asdf.scm (asdf-build/source, asdf-build): Likewise.
* guix/build-system/chicken.scm (chicken-build): Likewise.
* guix/build-system/clojure.scm (clojure-build): Likewise.
(source->output-path, maybe-guile->guile): Remove.
* guix/build-system/dub.scm (dub-build): Likewise.
* guix/build-system/emacs.scm (emacs-build): Likewise.
* guix/build-system/go.scm (go-build): Likewise.
* guix/build-system/haskell.scm (haskell-build): Likewise.
* guix/build-system/julia.scm (julia-build): Likewise.
* guix/build-system/linux-module.scm (linux-module-build)
(linux-module-build-cross): Likewise.
* guix/build-system/maven.scm (maven-build): Likewise.
* guix/build-system/minify.scm (minify-build): Likewise.
* guix/build-system/node.scm (node-build): Likewise.
* guix/build-system/qt.scm (qt-build, qt-cross-build): Likewise.
* guix/build-system/r.scm (r-build): Likewise.
* guix/build-system/rakudo.scm (rakudo-build): Likewise.
* guix/build-system/renpy.scm (renpy-build): Likewise.
* tests/builders.scm ("gnu-build"): Call 'store-lower' on 'gnu-build'.
  Pass #:source parameter.
* tests/packages.scm ("search paths"): Use 'abort-to-prompt' instead of
  a normal return from the 'build' method.
  ("package->bag, sensitivity to %current-target-system"): Change 'build'
  to match the new build system signature.

squash! build-system: Rewrite using gexps.

squash! build-system: Rewrite using gexps.
2021-03-30 22:48:43 +02:00
Ludovic Courtès 1209447ad3
build-system/gnu: Disable 'ld.so.cache' generation when cross-compiling.
* guix/build-system/gnu.scm (gnu-cross-build): Change
 #:make-dynamic-linker-cache? to #f.
2021-02-21 22:47:55 +01:00
Ricardo Wurmus 7549c963c4
guix: Quote list of bootstrap scripts.
This is a follow-up to commit 9cfc93be30.

* guix/build-system/gnu.scm (gnu-build, gnu-cross-build): Quote the list of
default bootstrap scripts.
2020-12-23 21:17:46 +01:00
Ricardo Wurmus 9cfc93be30
build-system/gnu: Allow overriding of bootstrap scripts.
* guix/build-system/gnu.scm (gnu-build, gnu-cross-build): Accept
bootstrap-scripts keyword argument and pass it to gnu-build.
(%bootstrap-scripts): New variable.
* guix/build/gnu-build-system.scm (%bootstrap-scripts): Remove variable.
(bootstrap): Remove default value for bootstrap-scripts argument.
2020-12-23 13:33:24 +01:00
Ludovic Courtès f85efa86e7
build-system/gnu: Add 'make-dynamic-linker-cache' phase.
* guix/build/gnu-build-system.scm (make-dynamic-linker-cache): New
procedure.
(%standard-phases): Add it.
* guix/build-system/gnu.scm (gnu-build, gnu-cross-build): Add
 #:make-dynamic-linker-cache? and honor it.
2020-12-01 21:30:28 +01:00
Jakub Kądziołka e0f31baacc
build-system/gnu: strip with --strip-unneeded [v2]
[Accidentally pushed patch v1, this commit contains the rest of the
changes. Revised commit message follows.]

Apart from debug information, one can also strip some symbols. This can
be a significant difference, the closure of gcc-toolchain@7 got reduced
by 15 MB in my tests.

As per [1], --strip-debug is included in --strip-unneeded, and
the debug files created also contain a copy of the information removed
by --strip-unneeded.

Linux From Scratch suggests that this option shouldn't be used on static
libraries [2], however other sources [3] indicate otherwise. Building a
toolchain with this patch succeeds, and the result works fine for
'gcc -static hello-world.c'.

[1]: https://stackoverflow.com/a/52555093
[2]: http://www.linuxfromscratch.org/lfs/view/9.1/chapter05/stripping.html
[3]: https://www.technovelty.org/linux/stripping-shared-libraries.html

* guix/build/gnu-build-system.scm (strip): Use --strip-unneeded.
* guix/build-system/gnu.scm (static-package, gnu-build, gnu-cross-build): Likewise.
2020-09-19 15:43:03 +02:00
Ludovic Courtès 50e7e6a065
build-system/gnu: Cross builds properly handle #:allowed-references & co.
Fixes <https://bugs.gnu.org/41775>.

* guix/build-system/gnu.scm (gnu-cross-build)[canonicalize-reference]:
Pass TARGET and SYSTEM to 'package-cross-derivation'.
2020-06-20 23:35:58 +02:00
Ludovic Courtès 7488d70c55
build-system/gnu: Simplify 'dist-package'.
* guix/build-system/gnu.scm (dist-package): Use default keyword
arguments in 'substitute-keyword-arguments'.
2020-06-17 19:32:43 +02:00
Ludovic Courtès 8cca3f939a
build-system/gnu: Adjust 'dist-package' to current 'autoconf-wrapper' API.
This is a followup to 464f544739.

* guix/build-system/gnu.scm (dist-package): Do not call 'autoconf-wrapper'.
2020-06-17 19:32:43 +02:00
Marius Bakke ae0badf5bb
Merge branch 'master' into core-updates
Conflicts:
	gnu/packages/admin.scm
	gnu/packages/commencement.scm
	gnu/packages/guile.scm
	gnu/packages/linux.scm
	gnu/packages/package-management.scm
	gnu/packages/pulseaudio.scm
	gnu/packages/web.scm
2020-03-30 12:17:33 +02:00
Ludovic Courtès 5a17b9b673
build-system/gnu: Optimize the package graph.
With this change, the output of:

  guix graph -e '(@@ (gnu packages commencement) coreutils-final)' |grep 'label = ' | wc -l

drops from 76 nodes to 68 nodes, and the "add-data-to-store-cache" hit
rate for:

  guix build libreoffice -d --no-grafts

drops from 3.9% to 2.6%.

* guix/build-system/gnu.scm (package-with-explicit-inputs*)[cut?]:
Adjust condition to exclude packages with build systems other than
GNU-BUILD-SYSTEM, such as 'ld-wrapper-boot3'.
2020-03-29 23:14:28 +02:00
Ludovic Courtès 89da127035
gnu: cross-base: Switch back to 'CROSS_C_INCLUDE_PATH' & co.
This is a followup to 2073b55e6b.

* gnu/build/cross-toolchain.scm (%gcc-include-paths): Switch back to
'C_INCLUDE_PATH' & co.
* gnu/packages/cross-base.scm (%gcc-include-paths): Likewise.
(cross-gcc-arguments): Remove 'treat-glibc-as-system-header' phase.
(cross-gcc)[native-inputs]: Reorder so that libc comes last.
[search-paths]: Add "include/c++" for 'CROSS_CPLUS_INCLUDE_PATH'.
* guix/build-system/gnu.scm (standard-cross-packages): Have "cross-gcc"
appear both for 'host and 'target.
2020-02-12 20:35:43 +01:00
Ludovic Courtès 2073b55e6b
gnu: gcc: Switch back to using 'C_INCLUDE_PATH' instead of 'CPATH'.
Fixes <https://bugs.gnu.org/30756>.
Initially reported by Julien Lepiller <julien@lepiller.eu>.

* gnu/packages/base.scm (make-gcc-libc): Remove
'treat-glibc-as-system-header' phase from 'arguments'.
* gnu/packages/commencement.scm (gcc-final): Likewise.
* gnu/packages/gcc.scm (gcc-4.7)[arguments]: Add "include/c++" to
'CPLUS_INCLUDE_PATH'.
(gcc-6)[native-search-paths]: Remove.
* gnu/packages/make-bootstrap.scm (gcc-for-bootstrap): Remove
'native-search-paths' and 'arguments'.
* gnu/packages/patches/python-2.7-search-paths.patch,
gnu/packages/patches/python-3-search-paths.patch: Replace "CPATH" with
"C_INCLUDE_PATH".
* guix/build-system/cmake.scm (lower): When not cross-compiling, move
INPUTS from the 'host-inputs' field to the 'build-inputs' field of the
bag, right after NATIVE-INPUTS.
* guix/build-system/glib-or-gtk.scm (lower): Likewise.
* guix/build-system/gnu.scm (lower): Likewise.
* guix/build-system/meson.scm (lower): Likewise.
2020-02-06 18:47:15 +01:00
Ludovic Courtès f618134e4c
build-system/gnu: 'package-with-explicit-inputs' uses 'package-mapping'.
* guix/build-system/gnu.scm (package-with-explicit-inputs): Rename to...
(package-with-explicit-inputs/deprecated): ... this.
(package-with-explicit-inputs*): New procedure.
(package-with-explicit-inputs): Define as a 'case-lambda*'.
2019-10-14 00:08:10 +02:00
Ludovic Courtès d2b5ede053
build-system/gnu: Check whether the cross-libc has a "static" output.
This is a followup to 614fffe427, which
broke cross-compilation to i686-w64-mingw32.

* guix/build-system/gnu.scm (standard-cross-packages): Add
"cross-libc:static" only when LIBC has a "static" output.
2017-12-21 10:46:24 +01:00
Ludovic Courtès 614fffe427
build-system/gnu: Add the "static" output of libc in cross environments.
Fixes a regression whereby the host libc.a would be missing when
cross-compiling.

This is a followup to commit 6dff905e51.

* guix/build-system/gnu.scm (standard-cross-packages): Add the
"cross-libc:static".
2017-12-20 14:56:47 +01:00
Ludovic Courtès a864d56302
build-system/gnu: Add 'install-license-files' phase.
Suggested by Dave Love <fx@gnu.org>.

* guix/build-system/gnu.scm (%license-file-regexp): New variable.
(gnu-build): Add #:license-file-regexp and use it.
(gnu-cross-build): Likewise.
* guix/build/gnu-build-system.scm (%license-file-regexp): New variable.
(install-license-files): New procedure.
(%standard-phases): Add it.
2017-11-08 22:43:56 +01:00
Ricardo Wurmus d2ac5e2975
build-system/cmake: Add support for cross compilation.
Fixes <https://bugs.gnu.org/26897>.

* guix/build-system/gnu.scm: Export standard-cross-packages.
* guix/build-system/cmake.scm (cmake-cross-build): New procedure.
(lower): Add support for cross-builds.
* guix/build/cmake-build-system.scm (configure): Handle "target" argument.
2017-05-30 16:52:55 +02:00
Ricardo Wurmus 3a62dd6b22
build-system: gnu: Fix cross-gcc call.
This is a follow-up to 7b3318e34f.

* guix/build-system/gnu.scm (standard-cross-packages): Use keyword arguments
in cross-gcc call.
2017-05-25 17:02:08 +02:00
Ludovic Courtès 55b2d92145
Use 'mlambda' instead of 'memoize'.
* gnu/packages.scm (find-newest-available-packages): Use 'mlambda'
instead of (memoize (lambda ...) ...).
* gnu/packages/bootstrap.scm (package-with-bootstrap-guile): Likewise.
* guix/build-system/gnu.scm (package-with-explicit-inputs)[rewritten-input]:
Likewise.
* guix/build-system/python.scm (package-with-explicit-python)[transform]:
Likewise.
* guix/derivations.scm (derivation->string): Likewise.
* guix/gnu-maintenance.scm (gnu-package?): Likewise.
* guix/modules.scm (module-file-dependencies): Likewise.
* guix/scripts/graph.scm (standard-package-set): Likewise.
* guix/scripts/lint.scm (official-gnu-packages*): Likewise.
* guix/store.scm (store-regexp*): Likewise.
* guix/utils.scm (location): Likewise.
2017-01-28 18:55:20 +01:00
Ludovic Courtès f9704f179a
Add (guix memoization).
* guix/combinators.scm (memoize): Remove.
* guix/memoization.scm: New file.
* Makefile.am (MODULES): Add it.
* gnu/packages.scm, gnu/packages/bootstrap.scm,
guix/build-system/gnu.scm, guix/build-system/python.scm,
guix/derivations.scm, guix/gnu-maintenance.scm,
guix/import/cran.scm, guix/import/elpa.scm,
guix/modules.scm, guix/scripts/build.scm,
guix/scripts/graph.scm, guix/scripts/lint.scm,
guix/store.scm, guix/utils.scm: Adjust imports accordingly.
2017-01-28 18:55:20 +01:00
Ludovic Courtès 958dd3ce68
utils: Move combinators to (guix combinators).
* guix/utils.scm (compile-time-value, memoize, fold2)
(fold-tree, fold-tree-leaves): Move to...
* guix/combinators: ... here.  New file.
* tests/utils.scm ("fold2, 1 list", "fold2, 2 lists")
(fold-tree tests): Move to...
* tests/combinators.scm: ... here.  New file.
* Makefile.am (MODULES, SCM_TESTS): Add them.
* gnu/packages.scm, gnu/packages/bootstrap.scm,
gnu/services/herd.scm, guix/build-system/gnu.scm,
guix/build-system/python.scm, guix/derivations.scm,
guix/gnu-maintenance.scm, guix/import/elpa.scm,
guix/scripts/archive.scm, guix/scripts/build.scm,
guix/scripts/graph.scm, guix/scripts/lint.scm,
guix/scripts/size.scm, guix/scripts/substitute.scm,
guix/serialization.scm, guix/store.scm, guix/ui.scm: Adjust imports
accordingly.
2016-05-04 23:35:55 +02:00
Ludovic Courtès 55e1f25d89 build-system/gnu: Add #:disallowed-references.
* guix/build-system/gnu.scm (gnu-build): Add #:disallowed-references and
honor it.
(gnu-cross-build): Likewise.
2016-03-20 22:46:45 +01:00
Ludovic Courtès 8c986ab120 Merge branch 'master' into core-updates 2016-01-13 18:18:48 +01:00
Ludovic Courtès b8a35309f8 build-system/gnu: 'dist-package' can be passed the phases.
* guix/build-system/gnu.scm (dist-package): Add #:phases parameter and
honor it.
2016-01-13 17:43:21 +01:00
Ludovic Courtès d4aaf95401 build-system/gnu: Make 'package-with-explicit-inputs' idempotent.
* guix/build-system/gnu.scm (package-with-explicit-inputs): Use
  'ensure-keyword-arguments' instead of appending to ARGS.
* gnu/packages/commencement.scm (static-bash-for-glibc): Add missing
  #:guile argument.
2016-01-06 23:08:22 +01:00
Ludovic Courtès 7165a91c7d build-system/gnu: Use the long option name for deterministic archives.
This is a followup to 3eb34c6.

* guix/build-system/gnu.scm (gnu-build, gnu-cross-build): Use
"--enable-deterministic-archives" instead of "-D" to work around
Binutils bug <https://sourceware.org/bugzilla/show_bug.cgi?id=17671>.
* guix/build/gnu-build-system.scm (strip): Likewise.
2016-01-01 00:49:05 +01:00
Ludovic Courtès 3eb34c631a build-system/gnu: Always pass "-D" to strip/objcopy.
* guix/build-system/gnu.scm (gnu-build, gnu-cross-build): Add "-D" to
  #:strip-flags.
* guix/build/gnu-build-system.scm (strip): Likewise.  Also pass "-D" to
  OBJCOPY-COMMAND.
2015-12-18 23:58:51 +01:00
Ludovic Courtès 87cd0dba2f build-system/gnu: dist-package: Use 'autoconf-wrapper'.
* guix/build-system/gnu.scm (dist-package): Use AUTOCONF-WRAPPER instead
  of AUTOCONF.
2015-10-14 21:39:05 +02:00
Ludovic Courtès afd3d9316c Use "normalized codesets" everywhere.
In other words, change "xx_YY.UTF-8" to "xx_YY.utf8".

* guix/profiles.scm (ca-certificate-bundle): Use "en_US.utf8" instead of
  "en_US.UTF-8".
* guix/packages.scm (patch-and-repack): Likewise.
* guix/build/gnu-build-system.scm (install-locale): Likewise.
* guix/build-system/gnu.scm (gnu-build, gnu-cross-build): Likewise.
* gnu/packages/python.scm (python-ipython): Likewise.
* gnu/packages/gawk.scm (gawk): Likewise.
* build-aux/hydra/demo-os.scm: Likewise.
* gnu/packages/guile.scm (guile-ncurses)[arguments]: Remove
  'change-locale' phase.
2015-10-04 00:10:03 +02:00
Mark H Weaver 3c7d023d64 build-system/gnu: Pass --build=<triplet> to configure by default.
* guix/build-system/gnu.scm (gnu-build, gnu-cross-build): Accept #:build
  keyword argument.  Pass it to 'gnu-build' on the build side.
* guix/build/gnu-build-system.scm (configure): Accept #:build keyword
  argument.  Unless it is false, pass --build to configure.
2015-07-13 18:54:40 -04:00
Ludovic Courtès 4a6aeb670f derivations: Add #:substitutable?, distinguished from #:local-build?.
Fixes <http://bugs.gnu.org/18747>.

* guix/derivations.scm (substitutable-derivation?): Rewrite to check for
  "allowSubstitutes".
  (derivation): Add #:substitutable? parameter.
  [user+system-env-vars]: Honor it.
  (build-expression->derivation): Add #:substitutable? and honor it.
* guix/gexp.scm (gexp->derivation): Likewise.
* tests/derivations.scm ("derivation-prerequisites-to-build and substitutes,
  non-substitutable build"): Use #:substitutable? instead of #:local-build?.
  ("substitutable-derivation?", "derivation-prerequisites-to-build and
  substitutes, local build"): New tests.
* guix/download.scm (url-fetch): Adjust comment.
* guix/git-download.scm (git-fetch): Likewise.
* guix/build-system/gnu.scm (gnu-build, gnu-cross-build): Use #:substitutable?
  instead of #:local-build?.
* doc/guix.texi (Derivations, G-Expressions): Adjust accordingly.
2015-07-03 00:30:55 +02:00
Ludovic Courtès 0004c5904c packages: Make 'location' field innate.
* guix/packages.scm (<package>)[location]: Add 'innate' property.
* guix/build-system/gnu.scm (static-package): Remove 'loc' parameter and
  'location' field.
* gnu/packages/autotools.scm (autoconf-wrapper): Remove 'location' field.
* gnu/packages/commencement.scm (gnu-make-boot0, diffutils-boot0, gcc-final):
  Likewise.
* gnu/packages/cross-base.scm (cross): Likewise.
* gnu/packages/emacs.scm (emacs-no-x, emacs-no-x-toolkit): Likewise.
* gnu/packages/make-bootstrap.scm (tarball-package): Likewise.
* gnu/packages/maths.scm (petsc-complex): Likewise.
2015-06-11 23:33:32 +02:00
Ludovic Courtès e89431bf01 Move search path specifications to (guix search-paths).
* guix/packages.scm (<search-path-specification>,
  search-path-specification->sexp, sexp->search-path-specification):
  Move to...
* guix/search-paths.scm: ... here.  New file.
* Makefile.am (MODULES): Add it.
* guix/build-system/cmake.scm, guix/build-system/glib-or-gtk.scm,
  guix/build-system/gnu.scm, guix/build-system/haskell.scm,
  guix/build-system/perl.scm, guix/build-system/python.scm,
  guix/build-system/ruby.scm, guix/build-system/waf.scm,
  guix/profiles.scm, guix/scripts/package.scm: Use it.
2015-05-04 23:30:51 +02:00