diff options
author | midipix <writeonce@midipix.org> | 2021-05-26 15:38:16 +0000 |
---|---|---|
committer | midipix <writeonce@midipix.org> | 2021-05-26 16:48:10 +0000 |
commit | f1798db88e99ecf2029a73277ac54ed912de553b (patch) | |
tree | a89b17997d21a0569bbab10fbca9e4c789732f7a /sofort | |
parent | 92afeef250d5ee95e6c265ac07cffcedcb0b15b6 (diff) | |
download | ptycon-f1798db88e99ecf2029a73277ac54ed912de553b.tar.bz2 ptycon-f1798db88e99ecf2029a73277ac54ed912de553b.tar.xz |
build system: ccenv: ccenv_set_cc_bits(): support strict compiler drivers.
Diffstat (limited to 'sofort')
-rw-r--r-- | sofort/ccenv/ccenv.sh | 23 |
1 files changed, 18 insertions, 5 deletions
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 |