On 11/03/2019 16:17, Bruce Dubbs via lfs-dev wrote:
On 3/11/19 9:18 AM, Pierre Labastie via lfs-dev wrote:
Hi,

In Gcc-7, a new compile time option has been introduced:
--with-gcc-major-version-only
with the effect of having only the major version in directory names.
But it has also the effect that "gcc -dumpversion" only shows
the major version. For example, on Debian unstable:
----
$ gcc -dumpversion
8
----
There is a new command line switch, introduced also for
Gcc-7: -dumpfullversion. For example:
----
$ gcc -dumpfullversion
8.3.0
----

But for versions less than 7, gcc -dumpversion returns an error.

I am not sure we would want to change our "version-check.sh"
script, since the major version is enough (if greater than 7)
for knowing whether the version is greater than the minimal one.

But if we want, the following command always returns the full
version, and no errors, whatever gcc's version is:
----
$ gcc -dumpfullversion -dumpversion
----
(in this order). Will do that for jhalfs...

For the version check we use 'gcc --version | head -n1' which is valid for all versions and gives slightly more info:

$ gcc --version | head -n1
gcc (GCC) 8.2.0

For the users, I think this is fine.  jhalfs can certainly use what is best for the scripts.


Oh yes, sorry for the noise... Why did I assume that there was the same command in jhalfs and in version-check.sh?

Pierre
--
http://lists.linuxfromscratch.org/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to