-
-
Couldn't load subscription status.
- Fork 681
Description
We gather and clean up compiler flags. Also we
- add
--enable-fat-binarytoconfigure(as an alternative to settingSAGE_FAT_BINARY) - add
--enable_debug={no|symbols|yes}as alternative to settingSAGE_DEBUG - compile with
-Og -gifSAGE_DEBUG=yes - compile with
-O2ifSAGE_DEBUG=no(some packages withO3instead) - compile with
-O2 -gotherwise (some packages withO3instead)
During the build of Sage there are now flags that can be exported
in spkg_install.in with one line, instead of checking SAGE_DEBUG
etc. for each individual package, e.g. by
export CFLAGS=$CFLAGS(redundant, use flags as above)export CFLAGS=$CFLAGS_O3(O3instead ofO2, but only if not in debug mode)export CFLAGS=$ORIGINAL_CFLAGS(use$CFLAGSas set beforeconfigure)
Likewise we do with CXXFLAGS, FCFLAGS, F77FLAGS.
We try to respect the user's choice and do not overwrite the flags if already
set by the user, but only add compile flags if necessary for packages to work.
Inidividual packages can still be compiled with specified flags or in debug mode using
make CFLAGS=-O2 some-package
or
make SAGE_DEBUG="yes" some-package
This ticket prepares #27122, which adds -march=native to the defaults.
Component: build
Keywords: compile flags, sd111
Author: Jonathan Kliem
Branch/Commit: 3bb3099
Reviewer: Matthias Koeppe
Issue created by migration from https://trac.sagemath.org/ticket/30375