xbps-src: introduce build profiles and use it by default.
common/build-profiles contains the compilation flags used in native builds, and are defined per architecture: - x86_64 (glibc) - x86_64-musl (musl) If XBPS_CFLAGS or XBPS_CXXFLAGS are set in `etc/conf`, the settings from the build profile will be overrided.
This commit is contained in:
parent
aa4d7feb93
commit
c2bd01c8d3
11 changed files with 27 additions and 4 deletions
|
@ -331,6 +331,11 @@ setup_pkg() {
|
|||
dbgflags="-g"
|
||||
fi
|
||||
|
||||
if [ -z "$XBPS_CFLAGS" -a -z "$XBPS_CXXFLAGS" -a -z "$bootstrap" ]; then
|
||||
if [ -s ${XBPS_COMMONDIR}/build-profiles/${XBPS_MACHINE}.sh ]; then
|
||||
. ${XBPS_COMMONDIR}/build-profiles/${XBPS_MACHINE}.sh
|
||||
fi
|
||||
fi
|
||||
export CFLAGS="$XBPS_CFLAGS $XBPS_CROSS_CFLAGS $CFLAGS $dbgflags"
|
||||
export CXXFLAGS="$XBPS_CXXFLAGS $XBPS_CROSS_CXXFLAGS $CXXFLAGS $dbgflags"
|
||||
export CPPFLAGS="$XBPS_CPPFLAGS $XBPS_CROSS_CPPFLAGS $CPPFLAGS"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue