[Buildroot] [PATCH 1/1] toolchain/helpers.mk: fixup check_gcc_version.

Peter Korsgaard peter at korsgaard.com
Tue Feb 21 14:59:20 UTC 2017


>>>>> "ren" == ren guo <ren_guo at c-sky.com> writes:

 > Thx Thomas,
 > Cool Idea! but it need be retested.

 > I couldn't find a proper way to avoid the spaces around the ".", and i
 > think sed is ok :)

Alternatively we could drop the . and use the shell or awk or whatever
to convert from space separated to .-separated:

echo "__GNUC__ __GNUC_MINOR__" | gcc -P -E - | \
     { read MAJOR MINOR; echo $MAJOR.$MINOR ; }

Not that this is so much prettier.

-- 
Bye, Peter Korsgaard



More information about the buildroot mailing list