diff options
author | Martin Weinelt <mweinelt@users.noreply.github.com> | 2023-10-22 02:42:33 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-22 02:42:33 +0200 |
commit | 8dfad603247387df1df4826b8bea58efc5d012d8 (patch) | |
tree | 91bdc70e902cd910ec60539ae9b6ce24e448669c /pkgs/test | |
parent | 9e1ae78a702a764d6815dac293f460f14720d140 (diff) | |
parent | 1cf369a0dd162e2da454edd7880eb87bd4543eef (diff) |
Merge pull request #257792 from NixOS/staging-next
staging-next 2023-09-28
Diffstat (limited to 'pkgs/test')
-rw-r--r-- | pkgs/test/cc-wrapper/default.nix | 7 | ||||
-rw-r--r-- | pkgs/test/cc-wrapper/include-cxxabi.cc | 8 | ||||
-rw-r--r-- | pkgs/test/make-binary-wrapper/add-flags.c | 12 | ||||
-rw-r--r-- | pkgs/test/make-binary-wrapper/add-flags.cmdline | 3 | ||||
-rw-r--r-- | pkgs/test/make-binary-wrapper/add-flags.env | 2 |
5 files changed, 26 insertions, 6 deletions
diff --git a/pkgs/test/cc-wrapper/default.nix b/pkgs/test/cc-wrapper/default.nix index 8809030989e69..74009c97980d2 100644 --- a/pkgs/test/cc-wrapper/default.nix +++ b/pkgs/test/cc-wrapper/default.nix @@ -30,6 +30,13 @@ in stdenv.mkDerivation { $CXX -o cxx-check ${./cxx-main.cc} ${emulator} ./cxx-check + # test for https://github.com/NixOS/nixpkgs/issues/214524#issuecomment-1431745905 + # .../include/cxxabi.h:20:10: fatal error: '__cxxabi_config.h' file not found + # in libcxxStdenv + echo "checking whether cxxabi.h can be included... " >&2 + $CXX -o include-cxxabi ${./include-cxxabi.cc} + ${emulator} ./include-cxxabi + ${lib.optionalString (stdenv.isDarwin && stdenv.cc.isClang) '' echo "checking whether compiler can build with CoreFoundation.framework... " >&2 mkdir -p foo/lib diff --git a/pkgs/test/cc-wrapper/include-cxxabi.cc b/pkgs/test/cc-wrapper/include-cxxabi.cc new file mode 100644 index 0000000000000..6ffc97e414a56 --- /dev/null +++ b/pkgs/test/cc-wrapper/include-cxxabi.cc @@ -0,0 +1,8 @@ +#include <cxxabi.h> +#include <iostream> + +int main(int argc, char **argv) +{ + std::cerr << "ok" << std::endl; + return 0; +} diff --git a/pkgs/test/make-binary-wrapper/add-flags.c b/pkgs/test/make-binary-wrapper/add-flags.c index 3ae8678d4421a..d998a5f6f983c 100644 --- a/pkgs/test/make-binary-wrapper/add-flags.c +++ b/pkgs/test/make-binary-wrapper/add-flags.c @@ -3,19 +3,21 @@ #include <assert.h> int main(int argc, char **argv) { - char **argv_tmp = calloc(4 + argc + 2 + 1, sizeof(*argv_tmp)); + char **argv_tmp = calloc(6 + argc + 2 + 1, sizeof(*argv_tmp)); assert(argv_tmp != NULL); argv_tmp[0] = argv[0]; argv_tmp[1] = "-x"; argv_tmp[2] = "-y"; argv_tmp[3] = "-z"; argv_tmp[4] = "-abc"; + argv_tmp[5] = "-g"; + argv_tmp[6] = "*.txt"; for (int i = 1; i < argc; ++i) { - argv_tmp[4 + i] = argv[i]; + argv_tmp[6 + i] = argv[i]; } - argv_tmp[4 + argc + 0] = "-foo"; - argv_tmp[4 + argc + 1] = "-bar"; - argv_tmp[4 + argc + 2] = NULL; + argv_tmp[6 + argc + 0] = "-foo"; + argv_tmp[6 + argc + 1] = "-bar"; + argv_tmp[6 + argc + 2] = NULL; argv = argv_tmp; argv[0] = "/send/me/flags"; diff --git a/pkgs/test/make-binary-wrapper/add-flags.cmdline b/pkgs/test/make-binary-wrapper/add-flags.cmdline index f42d26f3adf0e..1ca964ab4e7a7 100644 --- a/pkgs/test/make-binary-wrapper/add-flags.cmdline +++ b/pkgs/test/make-binary-wrapper/add-flags.cmdline @@ -1,3 +1,4 @@ --append-flags "-foo -bar" \ --add-flags "-x -y -z" \ - --add-flags -abc + --add-flags -abc \ + --add-flags "-g *.txt" diff --git a/pkgs/test/make-binary-wrapper/add-flags.env b/pkgs/test/make-binary-wrapper/add-flags.env index 3626b8cf97b06..f0641ef36f7c3 100644 --- a/pkgs/test/make-binary-wrapper/add-flags.env +++ b/pkgs/test/make-binary-wrapper/add-flags.env @@ -4,5 +4,7 @@ SUBST_ARGV0 -y -z -abc +-g +*.txt -foo -bar |