From 4c9368ca9b8b1ffd216e5ae768a214b96a0d6bdb Mon Sep 17 00:00:00 2001 From: midipix Date: May 26 2021 16:48:14 +0000 Subject: build system: ccenv: ccenv_set_cc_bits(): support strict compiler drivers. --- diff --git a/sofort/ccenv/ccenv.sh b/sofort/ccenv/ccenv.sh index c932d45..de7926e 100644 --- a/sofort/ccenv/ccenv.sh +++ b/sofort/ccenv/ccenv.sh @@ -708,11 +708,24 @@ ccenv_set_cc_bits() "$ccenv_internal_type" \ "$ccenv_internal_guess") - printf '%s' "$ccenv_internal_str" \ - | eval $ccenv_cc -S -xc - -o - \ - $(printf '%s' "$ccenv_cflags") \ - > /dev/null 2>&3 \ - && ccenv_internal_size=$ccenv_internal_guess + if [ -n "$ccenv_dumpmachine_switch" ]; then + printf '%s' "$ccenv_internal_str" \ + | eval $ccenv_cc -S -xc - -o - \ + $(printf '%s' "$ccenv_cflags") \ + > /dev/null 2>&3 \ + && ccenv_internal_size=$ccenv_internal_guess + else + ccenv_tmpname='ccenv/c3RyaWN0X21vZGUK.c' + + printf '%s' "$ccenv_internal_str" \ + > "$ccenv_tmpname" + + $ccenv_cc -c "$ccenv_tmpname" -o a.out \ + > /dev/null 2>&3 \ + && ccenv_internal_size=$ccenv_internal_guess + + rm "$ccenv_tmpname" + fi fi done