kernel gcc version fix

This commit is contained in:
Harald Hope 2023-11-08 10:15:47 -08:00
parent 415155f557
commit 1c83e8c789

12
pinxi
View file

@ -50,8 +50,8 @@ use POSIX qw(ceil uname strftime ttyname);
## INXI INFO ##
my $self_name='pinxi';
my $self_version='3.3.31';
my $self_date='2023-11-07';
my $self_patch='08';
my $self_date='2023-11-08';
my $self_patch='09';
## END INXI INFO ##
my ($b_pledge,@pledges);
@ -28785,6 +28785,9 @@ sub version_proc {
# $result='Linux version 2.6.1 (GNU 0.9 GNU-Mach 1.8+git20201007-486/Hurd-0.9 i686-AT386)';
# $result='NetBSD version 9.1 (netbsd@localhost) (gcc version 7.5.0) NetBSD 9.1 (GENERIC) #0: Sun Oct 18 19:24:30 UTC 2020';
# $result='Linux version 6.0.8-0-generic (chimera@chimera) (clang version 15.0.4, LLD 15.0.4) #1 SMP PREEMPT_DYNAMIC Fri Nov 11 13:45:29 UTC 2022';
# 2023 ubuntu, sigh..
# $result='Linux version 6.5.8-1-liquorix-amd64 (steven@liquorix.net) (gcc (Debian 13.2.0-4) 13.2.0, GNU ld (GNU Binutils for Debian) 2.41) #1 ZEN SMP PREEMPT liquorix 6.5-9.1~trixie (2023-10-19)';
$result='Linux version 6.5.0-9-generic (buildd@bos03-amd64-043) (x86_64-linux-gnu-gcc-13 (Ubuntu 13.2.0-4ubuntu3) 13.2.0, GNU ld (GNU Binutils for Ubuntu) 2.41) #9-Ubuntu SMP PREEMPT_DYNAMIC Sat Oct 7 01:35:40 UTC 2023';
}
if ($result =~ /(gcc|clang).*version\s([^,\s\)]+)/){
$version = $2;
@ -28796,6 +28799,11 @@ sub version_proc {
$version ||= 'N/A';
@$compiler = ($1,$version);
}
elsif ($result =~ /\((\S+\s*)(gcc|clang)[^\(]*\([^\)]+\)\s+([0-9\.]+)(\s[^.]*)?,\s*/){
$version = $3;
$version ||= 'N/A';
@$compiler = ($2,$version);
}
}
main::log_data('dump','@$compiler',$compiler) if $b_log;
eval $end if $b_log;