From 93836f842bdda094346bac6fc88b2bc8f89929af Mon Sep 17 00:00:00 2001 From: Harald Hope Date: Sat, 16 Dec 2023 18:16:30 -0800 Subject: [PATCH] finished compilers --- pinxi | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/pinxi b/pinxi index 7024f73..858e33c 100755 --- a/pinxi +++ b/pinxi @@ -28272,6 +28272,7 @@ sub set_build_prop { } # Return all detected compiler versions +# args: 0: compiler sub get_compiler_data { eval $start if $b_log; my $compiler = $_[0]; @@ -36789,7 +36790,7 @@ sub info_item { } } if ($extra > 0){ - my ($clang,$clang_alt,$gcc,$gcc_alt,$path,$zigcc,$zigcc_version); + my ($clang,$clang_alt,$gcc,$gcc_alt,$path,$zigcc,$zigcc_alt); my $clangs = main::get_compiler_data('clang'); if (@$clangs){ $clang = shift @$clangs; @@ -36806,8 +36807,13 @@ sub info_item { } $gcc ||= 'N/A'; # should not be needed after fix but leave in case undef } - if ($path = main::check_program('zigcc')){ - ($zigcc,$zigcc_version) = ProgramData::full('zigcc',$path); + my $zigccs = main::get_compiler_data('zigcc'); + if (@$zigccs){ + $zigcc = shift @$zigccs; + if ($extra > 1 && @$zigccs){ + $zigcc_alt = join('/', @$zigccs); + } + $zigcc ||= 'N/A'; # should not be needed after fix but leave in case undef } my $compiler = ($gcc || $clang || $zigcc) ? '': 'N/A'; $data->{$data_name}[$index]{main::key($num++,1,1,'Compilers')} = $compiler; @@ -36824,8 +36830,10 @@ sub info_item { } } if ($zigcc){ - $zigcc_version ||= 'N/A'; - $data->{$data_name}[$index]{main::key($num++,0,2,'zigcc')} = $zigcc_version; + $data->{$data_name}[$index]{main::key($num++,1,2,'zigcc')} = $zigcc; + if ($extra > 1 && $zigcc_alt){ + $data->{$data_name}[$index]{main::key($num++,0,3,'alt')} = $zigcc_alt; + } } } # $index++ if $extra > 1 && !$loaded{'shell-data'};