On 13 August 2018 at 10:18, Daniel P. Berrangé <berra...@redhat.com> wrote: > Also, we should ensure the min required GCC version via biuld time > check of some kind. eg something like > > #if !(__GNUC_PREREQ(4, 4) || defined(__clang__)) > # error "QEMU requires GCC >= 4.4, or CLang" > #endif
Our current minimum is 4.1, I think (per commit fa54abb8c298f), though we could bump that if there's utility in doing so. Overall I think we should prefer to avoid specific gcc version checks wherever we can. clang supports a useful set of tests like __has_feature and __has_attribute; gcc supports some of these (eg __has_attribute from gcc 5). Random aside: I just stumbled across a comment in configure about a workaround for a gcc 4.6.x bug which says "We should be able to delete this at the end of 2013" :-) thanks -- PMM