]> Sergey Matveev's repositories - public-inbox.git/commitdiff
lei sucks: preserve utsname.machine, add "x86" where appropriate
authorEric Wong <e@80x24.org>
Fri, 30 Apr 2021 09:24:31 +0000 (09:24 +0000)
committerEric Wong <e@80x24.org>
Fri, 30 Apr 2021 19:59:42 +0000 (19:59 +0000)
It's helpful for us to distinguish x86 kernels from x86_64
kernels when using an x86 userspace.  OSes are dropping i386
support and only support i486 and newer, so "x86" is a more
appropriate description for that platform than "i386".

lib/PublicInbox/LeiSucks.pm

index d364a856d2415a59a47cb62ab5e8efe523a2fb8f..2ce64d629167294e61256a8f9f02ec66e81bd877 100644 (file)
@@ -18,7 +18,8 @@ sub lei_sucks {
        $lei->start_pager if -t $lei->{1};
        my ($os, undef, $rel, undef, $mac)= POSIX::uname();
        if ($mac eq 'x86_64' && $Config{ptrsize} == 4) {
-               $mac = $Config{cppsymbols} =~ /\b__ILP32__=1\b/ ? 'x32' : 'i386'
+               $mac .= $Config{cppsymbols} =~ /\b__ILP32__=1\b/ ?
+                       ',u=x32' : ',u=x86';
        }
        eval { require PublicInbox };
        my $pi_ver = eval('$PublicInbox::VERSION') // '(???)';