Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
base: 88e20e3877bf
Choose a base ref
...
head repository: NixOS/nixpkgs
compare: 8f5c939147da
Choose a head ref
  • 2 commits
  • 1 file changed
  • 1 contributor

Commits on Dec 23, 2020

  1. gnats: format hardened flag isn't supported

    When invoking a simple Ada program with `gcc` from `gnats10`, the
    following warnings are shown:
    
    ```
    $ gcc -c conftest.adb
    gnat1: warning: command-line option ‘-Wformat=1’ is valid for C/C++/ObjC/ObjC++ but not for Ada
    gnat1: warning: command-line option ‘-Wformat-security’ is valid for C/C++/ObjC/ObjC++ but not for Ada
    gnat1: warning: ‘-Werror=’ argument ‘-Werror=format-security’ is not valid for Ada
    $ echo $?
    0
    ```
    
    This is only spammy when compiling Ada programs inside a Nix derivation,
    but certain configure scripts (such as the ./configure script from the
    gcc that's built by coreboot's `make crossgcc` command) fail entirely
    when getting that warning output.
    
    https://nixos.wiki/wiki/Coreboot currently suggests manually running
    
    > NIX_HARDENING_ENABLE="${NIX_HARDENING_ENABLE/ format/}" make crossgcc
    
    … but actually teaching the nixpkgs-provided cc wrapper that `format`
    isn't supported as a hardening flag seems to be the more canonical way
    to do this in nixpgks.
    
    After this, Ada programs still compile:
    
    ```
    $ gcc -c conftest.adb
    $ echo $?
    0
    ```
    
    And the compiler output is empty.
    flokli committed Dec 23, 2020
    Copy the full SHA
    07c4056 View commit details
    Browse the repository at this point in the history

Commits on Dec 24, 2020

  1. Merge pull request #107435 from flokli/gnats-cc-wrapper-format-unsupp…

    …orted
    
    gnats: format hardened flag isn't supported
    flokli committed Dec 24, 2020
    Copy the full SHA
    8f5c939 View commit details
    Browse the repository at this point in the history