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

ren_guo ren_guo at c-sky.com
Wed Feb 22 02:16:36 UTC 2017


On 2017年02月21日 22:59, Peter Korsgaard wrote:

>   > 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.
>
Thx Peter,

"bash read" seems not bad :) ... But I like 'sed' a little more?

Best Regards

guoren



More information about the buildroot mailing list