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: 799fa4d40440
Choose a base ref
...
head repository: NixOS/nixpkgs
compare: 7f3fed9cba62
Choose a head ref
  • 2 commits
  • 5 files changed
  • 1 contributor

Commits on Apr 21, 2019

  1. cc-wrapper: make machine configuration configurable

    It is useful to make these dynamic and not bake them into gcc. This
    means we don’t have to rebuild gcc to change these values. Instead, we
    will pass cflags to gcc based on platform values. This was already
    done hackily for android gcc (which is multi-target), but not for our
    own gccs which are single target.
    
    To accomplish this, we need to add a few things:
    
    - add ‘arch’ to cpu
    - add NIX_CFLAGS_COMPILE_BEFORE flag (goes before args)
    - set -march everywhere
    - set mcpu, mfpu, mmode, and mtune based on targetPlatform.gcc flags
    
    cc-wrapper: only set -march when it is in the cpu type
    
    Some architectures don’t have a good mapping of -march. For instance
    POWER architecture doesn’t support the -march flag at all!
    
    https://gcc.gnu.org/onlinedocs/gcc/RS_002f6000-and-PowerPC-Options.html#RS_002f6000-and-PowerPC-Options
    matthewbauer committed Apr 21, 2019
    Copy the full SHA
    d180cb9 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #59225 from matthewbauer/dynamic-gcc-config

    cc-wrapper: make machine configuration configurable
    matthewbauer committed Apr 21, 2019
    Copy the full SHA
    7f3fed9 View commit details
    Browse the repository at this point in the history