Quantcast
Channel: Active questions tagged gcc - Stack Overflow
Viewing all articles
Browse latest Browse all 22024

Print GCC version without license/copyright information

$
0
0

I'm both writing Makefiles and setting up Docker images for building in a CI environment. In these various scripts I want to print the version of the tools I'm setting up and/or using.

gcc --version shows the simple version number and some copyright and license information. Example output on my machine:

$ gcc --version
gcc.exe (x86_64-posix-seh-rev0, Built by MinGW-W64 project) 8.1.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Is there a simpler way to get just the version information without parsing this output?


Viewing all articles
Browse latest Browse all 22024

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>