1
0
mirror of https://github.com/systemd/systemd synced 2025-09-28 08:14:46 +02:00

Compare commits

..

No commits in common. "f82d80da067aa6c73c19ea84c0261db4961368c4" and "56347fe7f32d0427b371e3c354486241d4e98a20" have entirely different histories.

6 changed files with 17 additions and 27 deletions

View File

@ -14,11 +14,7 @@ PassEnvironment=
NO_BUILD
WIPE
SANITIZERS
CC
CXX
CFLAGS
CPPFLAGS
CXXFLAGS
LDFLAGS
LLVM
MESON_VERBOSE

View File

@ -57,7 +57,6 @@ Packages=
knot
libapparmor1
libcap-progs
libtss2-tcti-device0
multipath-tools
ncat
open-iscsi

View File

@ -36,10 +36,10 @@ fi
# instead. The rootfs is overlaid with a writable tmpfs during the build script so these changes don't end up
# in the image itself.
tee --append /etc/makepkg.conf >/dev/null <<EOF
export CC="$( ((CC)) && echo "$CC" || ((LLVM)) && echo clang || echo gcc)"
export CXX="$( ((CXX)) && echo "$CXX" || ((LLVM)) && echo clang++ || echo g++)"
export CC_LD="$( ((LD)) && echo "$LD" || ((LLVM)) && echo lld)"
export CXX_LD="$( ((LD)) && echo "$LD" || ((LLVM)) && echo lld)"
export CC="$( ((LLVM)) && echo clang || echo gcc)"
export CXX="$( ((LLVM)) && echo clang++ || echo g++)"
export CC_LD="$( ((LLVM)) && echo lld)"
export CXX_LD="$( ((LLVM)) && echo lld)"
export CFLAGS="\$CFLAGS $MKOSI_CFLAGS $CFLAGS"
export CXXFLAGS="\$CXXFLAGS $MKOSI_CFLAGS $CFLAGS"
export LDFLAGS="\$LDFLAGS $MKOSI_LDFLAGS $LDFLAGS"

View File

@ -67,14 +67,12 @@ DEB_BUILD_PROFILES="$(awk '$1=$1' <<<"\
")"
# TODO: Drop GENSYMBOLS_LEVEL once https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=986746 is fixed.
# Note that CXXFLAGS is for the C++ compiler, and CPPFLAGS is for the C/C++ preprocessor, they are not the same:
# https://en.wikipedia.org/wiki/CFLAGS
build() {
env \
CC="$( ((CC)) && echo "$CC" || ((LLVM)) && echo clang || echo gcc)" \
CXX="$( ((CXX)) && echo "$CXX" || ((LLVM)) && echo clang++ || echo g++)" \
CC_LD="$( ((LD)) && echo "$LD" || ((LLVM)) && echo lld)" \
CXX_LD="$( ((LD)) && echo "$LD" || ((LLVM)) && echo lld)" \
CC="$( ((LLVM)) && echo clang || echo gcc)" \
CXX="$( ((LLVM)) && echo clang++ || echo g++)" \
CC_LD="$( ((LLVM)) && echo lld)" \
CXX_LD="$( ((LLVM)) && echo lld)" \
DEB_BUILD_OPTIONS="$(awk '$1=$1' <<<"\
$( ((WITH_TESTS)) || echo nocheck) \
$( ((WITH_DOCS)) || echo nodoc) \
@ -86,7 +84,6 @@ build() {
DEB_BUILD_PROFILES="$DEB_BUILD_PROFILES" \
DEB_CFLAGS_APPEND="$MKOSI_CFLAGS $CFLAGS" \
DEB_CXXFLAGS_APPEND="$MKOSI_CFLAGS $CFLAGS" \
DEB_CPPFLAGS_APPEND="$CPPFLAGS" \
DEB_LDFLAGS_APPEND="$MKOSI_LDFLAGS $LDFLAGS" \
DPKG_FORCE="unsafe-io" \
DPKG_DEB_COMPRESSOR_TYPE="none" \

View File

@ -86,10 +86,10 @@ build() {
--unset CFLAGS \
--unset CXXFLAGS \
--unset LDFLAGS \
CC="$( ((CC)) && echo "$CC" || ((LLVM)) && echo clang || echo gcc)" \
CXX="$( ((CXX)) && echo "$CXX" || ((LLVM)) && echo clang++ || echo g++)" \
CC_LD="$( ((LD)) && echo "$LD" || ((LLVM)) && echo lld)" \
CXX_LD="$( ((LD)) && echo "$LD" || ((LLVM)) && echo lld)" \
CC="$( ((LLVM)) && echo clang || echo gcc)" \
CXX="$( ((LLVM)) && echo clang++ || echo g++)" \
CC_LD="$( ((LLVM)) && echo lld)" \
CXX_LD="$( ((LLVM)) && echo lld)" \
rpmbuild \
-bb \
--noprep \

View File

@ -36,20 +36,18 @@ void reset_ansi_feature_caches(void) {
ColorMode parse_systemd_colors(void) {
const char *e;
/* Note: do not log in this function, to avoid infinite recursion issues, as the log functions call
* this when deciding whether to color the output. */
e = getenv("SYSTEMD_COLORS");
if (!e)
return _COLOR_MODE_INVALID;
return color_mode_from_string(e);
ColorMode m = color_mode_from_string(e);
if (m < 0)
return log_debug_errno(m, "Failed to parse $SYSTEMD_COLORS value '%s', ignoring: %m", e);
return m;
}
static ColorMode get_color_mode_impl(void) {
/* Note: do not log in this function, to avoid infinite recursion issues, as the log functions call
* this when deciding whether to color the output. */
/* Returns the mode used to choose output colors. The possible modes are COLOR_OFF for no colors,
* COLOR_16 for only the base 16 ANSI colors, COLOR_256 for more colors, and COLOR_24BIT for
* unrestricted color output. */