Prepend -m32 to existing flags as opposed to silently override and discard them: - set(CMAKE_<tool>_FLAGS -m32 ) + string(PREPEND CMAKE_<tool>_FLAGS " -m32") This stops discarding additional flags passed with either cmake -DCMAKE_<tool>_FLAGS="-fu -bar" or cmake -C params.cmake. Note this bug was affecting only the combination of x86 and CMAKE_<tool>_FLAGS. x86_64 wasn't affected and other, non-empty CMAKE_<tool>_FLAGS_[DEBUG/RELEASE/etc.] weren't affected either. Also convert flags string to list when invoking --print-libgcc-file-name to support more than one CMAKE_C_FLAGS. Signed-off-by: Marc Herbert <marc.herbert@intel.com> |
||
|---|---|---|
| .. | ||
| clang | ||
| gcc | ||
| host-gcc | ||
| xcc | ||