Skip to content
Snippets Groups Projects
  • Peter A. Jonsson's avatar
    e44c887f
    Fix version detection for recent gcc · e44c887f
    Peter A. Jonsson authored
    GCC 7 in Ubuntu 18 and GCC 9 in Ubuntu 20
    only emits the major version when called
    with -dumpversion which causes GCC_MINOR_VERSION
    to become empty. GCC also has a -dumpfullversion
    that will emit the entire version on GCC 7
    and later, but msp430-gcc will fail with
    an error message because there are no input
    files.
    
    Adding both parameters makes both msp430-gcc
    and GCC 7/9 on Ubuntu provide the full version
    so use that in the GCC version detection.
    e44c887f
    History
    Fix version detection for recent gcc
    Peter A. Jonsson authored
    GCC 7 in Ubuntu 18 and GCC 9 in Ubuntu 20
    only emits the major version when called
    with -dumpversion which causes GCC_MINOR_VERSION
    to become empty. GCC also has a -dumpfullversion
    that will emit the entire version on GCC 7
    and later, but msp430-gcc will fail with
    an error message because there are no input
    files.
    
    Adding both parameters makes both msp430-gcc
    and GCC 7/9 on Ubuntu provide the full version
    so use that in the GCC version detection.