mirror of
https://github.com/mistydemeo/tigerbrew.git
synced 2026-11-05 17:42:42 -05:00
ENV.no_optimization has handled things in the stdenv where setting the default optimisation flags are skipped in C/CXXFLAGS. However, indirectly in the background, the cc wrapper script still sets -Os via the $HOMEBREW_OPTIMIZATION_LEVEL in the super env. This causes issues on GCC builds from version 7 onwards where g++ is always being invoked with -Os via superenv which generates a different compiler from the one which the build process does (xgcc) and when it comes to do the stage comparison, things fail. With this change if ENV.no_optimization is set, $HOMEBREW_OPTIMIZATION_LEVEL is deleted from the build env, and the cc wrapper skips setting an optimisation level. Fixes issue #554