Bug 34161
| Summary: | separate %optflags which are bad for ./configure | ||
|---|---|---|---|
| Product: | Sisyphus | Reporter: | Ivan Zakharyaschev <imz> |
| Component: | rpm-build | Assignee: | Gleb F-Malinovskiy <glebfm> |
| Status: | NEW --- | QA Contact: | qa-sisyphus |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | arseny, glebfm, imz, mike, rx1513 |
| Version: | unstable | ||
| Hardware: | all | ||
| OS: | Linux | ||
| Bug Depends on: | 34162 | ||
| Bug Blocks: | |||
Проверка актуальности: не реализовано. В rpm-build 4.0.4.214-alt1 макрос %configure по-прежнему экспортирует CFLAGS/CXXFLAGS с полным набором %optflags (включая -O2 и добавленный пакетом -Werror), механизма отбора флагов «для configure» и «для make» нет. I'd like to add yet another data point here. In February this year I made an attempt to establish common CFLAGS, CXXFLAGS, FFLAGS, FCFLAGS and others globally (more rigorously, for each package that makes use of C, CXX or Fortran toolchains respectively), moving those assignments out from %configure and other configure-step helpers. Prior to the change the environment variables were not set for "cargo build". Turned out rust-cargo flips over and goes haywire: https://git.altlinux.org/tasks/407662/build/200/x86_64/log I was unable to locate the source of that problem in reasonable time. (In reply to Ivan Zakharyaschev from comment #0) > Examples: > > 1. Optimization flags may be unwanted in ./configure because they slow down > the tests. (Instead, something like -O0 may be wanted if this is not the > default.) > > 2. -Werror (added to %optflags by %def_enable Werror or by other ways) make > the tests in ./configure behave differently. Isn't that a misimplemented conftest at the end of the day? :) Wouldn't it be unwise to try to fix every upstream at once in a central place? (Ответ для Arseny Maslennikov на комментарий #2) > Prior to the change the environment variables were not set for "cargo build". > Turned out rust-cargo flips over and goes haywire: > https://git.altlinux.org/tasks/407662/build/200/x86_64/log > I was unable to locate the source of that problem in reasonable time. I will check later when I get enough free time. Open a bug for rust-cargo. As far as I know, some packages may define their own logic for handling CFLAGS, etc., or Cargo may simply has overwritten the upstream CFLAGS with the ones from the environment. |

Description
Ivan Zakharyaschev 2017-11-09 13:51:47 MSK