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
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 673827fd319e
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 7e571eb9943d
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on May 27, 2020

  1. gcc: optimize cross-compiled libraries

    `libstdc++` and a few other libraries are comiled with the options
    set in `EXTRA_TARGET_FLAGS`. Normally, this is filled form
    `EXTRA_FLAGS` inside of `builder.sh`, from which it inherits its
    optimization option. For cross compilers `EXTRA_TARGET_FLAGS` is
    set by a dedicated function that does not specify any optimization,
    leading to sub-par runtime performance of many C++ programs.
    tobim committed May 27, 2020
    Copy the full SHA
    2be2b53 View commit details
  2. Merge pull request #88988 from tobim/optimize-cross-libstdc++

    gcc: optimize cross-compiled libraries
    matthewbauer authored May 27, 2020
    Copy the full SHA
    7e571eb View commit details
Showing with 4 additions and 1 deletion.
  1. +4 −1 pkgs/development/compilers/gcc/common/extra-target-flags.nix
5 changes: 4 additions & 1 deletion pkgs/development/compilers/gcc/common/extra-target-flags.nix
Original file line number Diff line number Diff line change
@@ -5,9 +5,12 @@ let
in

{
# For non-cross builds these flags are currently assigned in builder.sh.
# It would be good to consolidate the generation of makeFlags
# ({C,CXX,LD}FLAGS_FOR_{BUILD,TARGET}, etc...) at some point.
EXTRA_TARGET_FLAGS = let
mkFlags = dep: langD: lib.optionals (targetPlatform != hostPlatform && dep != null && !langD) ([
"-idirafter ${lib.getDev dep}${dep.incdir or "/include"}"
"-O2 -idirafter ${lib.getDev dep}${dep.incdir or "/include"}"
] ++ stdenv.lib.optionals (! crossStageStatic) [
"-B${lib.getLib dep}${dep.libdir or "/lib"}"
]);