From b7e00ed89ecf726f0860d2e305bbc12ca78398af Mon Sep 17 00:00:00 2001 From: Jacek Galowicz Date: Thu, 9 Dec 2021 15:45:35 +0000 Subject: make-binary-wrapper: Add -Wall -Werror -Wpedantic --- pkgs/build-support/setup-hooks/make-binary-wrapper.sh | 7 ++++++- pkgs/test/make-binary-wrapper/default.nix | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'pkgs') diff --git a/pkgs/build-support/setup-hooks/make-binary-wrapper.sh b/pkgs/build-support/setup-hooks/make-binary-wrapper.sh index 2b6d316d81e..b0ed01de4cf 100644 --- a/pkgs/build-support/setup-hooks/make-binary-wrapper.sh +++ b/pkgs/build-support/setup-hooks/make-binary-wrapper.sh @@ -31,7 +31,12 @@ assertExecutable() { # use the `strings` command or open the binary file in a text editor. makeWrapper() { assertExecutable "$1" - makeDocumentedCWrapper "$1" "${@:3}" | cc -Os -x c -o "$2" - + makeDocumentedCWrapper "$1" "${@:3}" | \ + cc \ + -Wall -Werror -Wpedantic \ + -Os \ + -x c \ + -o "$2" - } # Syntax: wrapProgram diff --git a/pkgs/test/make-binary-wrapper/default.nix b/pkgs/test/make-binary-wrapper/default.nix index c9e045a4d98..c5bb6970aac 100644 --- a/pkgs/test/make-binary-wrapper/default.nix +++ b/pkgs/test/make-binary-wrapper/default.nix @@ -3,7 +3,7 @@ let env = { nativeBuildInputs = [ makeBinaryWrapper ]; }; envCheck = runCommand "envcheck" env '' - ${gcc}/bin/cc -o $out ${./envcheck.c} + ${gcc}/bin/cc -Wall -Werror -Wpedantic -o $out ${./envcheck.c} ''; makeGoldenTest = testname: runCommand "test-wrapper_${testname}" env '' mkdir -p /tmp/foo -- cgit 1.4.1