Commit Graph

24 Commits

Author SHA1 Message Date
Audrey Dutcher
928b4da58e
bash: add FreeBSD to static cross compilation special case 2024-11-04 03:13:32 +00:00
Artturin
e0464e4788 treewide: replace stdenv.is with stdenv.hostPlatform.is
In preparation for the deprecation of `stdenv.isX`.

These shorthands are not conducive to cross-compilation because they
hide the platforms.

Darwin might get cross-compilation for which the continued usage of `stdenv.isDarwin` will get in the way

One example of why this is bad and especially affects compiler packages
https://www.github.com/NixOS/nixpkgs/pull/343059

There are too many files to go through manually but a treewide should
get users thinking when they see a `hostPlatform.isX` in a place where it
doesn't make sense.

```
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv.is" "stdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv'.is" "stdenv'.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "clangStdenv.is" "clangStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "gccStdenv.is" "gccStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenvNoCC.is" "stdenvNoCC.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "inherit (stdenv) is" "inherit (stdenv.hostPlatform) is"
fd --type f "\.nix" | xargs sd --fixed-strings "buildStdenv.is" "buildStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "effectiveStdenv.is" "effectiveStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "originalStdenv.is" "originalStdenv.hostPlatform.is"
```
2024-09-25 00:04:37 +03:00
Artturin
8c116c6112 bash: badPlatforms mingw
`bash` doesn't compile for `mingw`

https://www.github.com/NixOS/nixpkgs/issues/333338
2024-09-12 08:23:58 +02:00
Emily
b62cfa99c3 bash: add upstream fix for pop_var_context error
Closes: #214822
2024-08-01 15:35:34 +01:00
Emily
a76707e813 bash: 5.2p26 -> 5.2p32
Replace one patch with its upstream version.
2024-08-01 15:35:17 +01:00
Jörg Thalheim
5356420466 treewide: remove unused with statements from maintainer lists
$ find -type f -name '*.nix' -print0 | xargs -P "$(nproc)" -0 sed -i \
  -e 's!with lib.maintainers; \[ *\];![ ];!' \
  -e 's!with maintainers; \[ *\];![ ];!'
2024-07-29 10:06:20 +08:00
Anderson Torres
c5aa149ef9 bash-5: remove dtzWill as maintainer [orphan]
Since theey is not active in a long span of time.
2024-07-17 12:12:56 -03:00
John Ericson
97550cd031 bash: Fix OpenBSD build
See added code comment for details
2024-06-29 13:14:51 -04:00
Audrey Dutcher
846de80d1c various: Enable updateAutotoolsGnuConfigScriptsHook
Prior to August 2023, any config.guess generated by autoconf will
include a hardcoded /usr/bin/uname invocation for FreeBSD on any
architecture other than arm. This clearly doesn't work under nix.
We must then update or otherwise patch each old config.guess.
2024-05-27 11:09:28 -04:00
Audrey Dutcher
fc246ead19 bash: Fix build on FreeBSD cross 2024-05-18 10:04:17 +02:00
Sergei Trofimovich
4181c1f587 bash: 5.2p21 -> 5.2p26
While at it exposed patch suffix as a `version` attribute.
2024-01-17 11:08:09 +00:00
Artturi
b6e0319318
Merge pull request #257358 from Artturin/bashunnecessaryexplici 2023-09-30 22:58:33 +03:00
Artturin
6c73dc6746 bash: Remove unnecessary explicit passing of binutils
`binutils` for darwin was added in (add binutils to bash build for size)[9c153e2227].

The override was added in (bash: provide a working binutils)[9e05276949].
2023-09-26 04:05:52 +03:00
Vladimír Čunát
223b83ca54
Merge #250128: bash: disable bash-malloc everywhere
...into staging
2023-09-16 15:42:10 +02:00
Sergei Trofimovich
8708ae0e37 bash: disable bash-malloc everywhere, not just on musl
TIme to time I bump into pathological behaviour of `bash` memory
allocator. Today's example:

    $ time { ls /nix/store/ > /dev/null; }
    real    0m0,965s user    0m0,876s sys     0m0,087s
    $ time { echo /nix/store/* > /dev/null; }
    real    2m18,287s user    2m17,946s sys     0m0,125s
    $ time { echo /nix/store/* > /dev/null; }
    real    0m1,764s user    0m1,712s sys     0m0,048s

Note how initial `echo` takes alsmot 2 minutes to finish.

Let's rely  on system's allocator instead.

After the change initial run is fast again:

    $ time { echo /nix/store/* > /dev/null; }
    real    0m1,328s user    0m1,264s sys     0m0,063s
2023-08-19 08:39:13 +01:00
Sergei Trofimovich
99e148dd27 bash: fix parallel build failure on unwind_prot.o
As reported by Robert Scott in https://github.com/NixOS/nixpkgs/pull/245066
without the change `make -j8` build of `make` occasionally fails to
buildin parallel. The simplest reproducer is:

    $$ ./configure
    $$ make unwind_prot.o
    ...
    In file included from unwind_prot.c:51:
    In file included from ./bashintl.h:30:
    ./include/gettext.h:27:11: fatal error: 'libintl.h' file not found
    # include <libintl.h>
              ^~~~~~~~~~~
    1 error generated.
    make: * [Makefile:106: unwind_prot.o] Error 1

The change adds missing ttransitive `${LIBINTL_H}` dependency for
unwind_prot.o.
2023-07-24 23:23:14 +01:00
Artturin
f9fdf2d402 treewide: move NIX_CFLAGS_COMPILE to the env attrset
with structuredAttrs lists will be bash arrays which cannot be exported
which will be a issue with some patches and some wrappers like cc-wrapper

this makes it clearer that NIX_CFLAGS_COMPILE must be a string as lists
in env cause a eval failure
2023-02-22 21:23:04 +02:00
github-actions[bot]
87f957b5e2
Merge master into staging-next 2023-02-12 16:02:45 +00:00
Sandro Jäckel
d5e55b8df9
bash: add pkgsStatic.bash to passthru
to prevent regressions on updates
2023-02-12 13:48:04 +01:00
Alyssa Ross
c9a88f969d bash: add debug info 2023-01-29 10:47:01 +00:00
Alyssa Ross
e049b85910 bash: apply static fix unconditionally
To ease maintenance.
2023-01-23 15:59:25 +00:00
Guillaume Girol
33afbf39f6 treewide: switch to nativeCheckInputs
checkInputs used to be added to nativeBuildInputs. Now we have
nativeCheckInputs to do that instead. Doing this treewide change allows
to keep hashes identical to before the introduction of
nativeCheckInputs.
2023-01-21 12:00:00 +00:00
Alyssa Ross
be0d0f2905 pkgsStatic.bash: fix build
Link: https://lists.gnu.org/archive/html/bug-bash/2022-10/msg00000.html
2023-01-13 13:12:40 +00:00
Markus Napierkowski
aae36e6869
bash: 5.1 -> 5.2 2022-12-28 21:05:43 +01:00