config-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bugs in config.guess


From: Torbjörn Granlund
Subject: Bugs in config.guess
Date: Sat, 21 Dec 2019 01:42:05 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (berkeley-unix)

BUG 1. Temp files/directories left behind due to repeated
set_cc_for_build

This code invokes set_cc_for_build:

    case "$UNAME_SYSTEM" in
    Linux|GNU|GNU/*)
            # If the system lacks a compiler, then just pick glibc.
            # We could probably try harder.
            LIBC=gnu

            set_cc_for_build

Then, the larger case ... esac statement re-invokes set_cc_for_build for
a lot of different systems.

Why is this a problem?  Because set_cc_for_build set the variable "tmp"
to a temporary directory which is also creates, and which it then relies
on a trap function to delete.

When set_cc_for_build is re-invoked tmp is reassigned, and the old
directory is forgotten.

This can be fixed in a lot of ways.  Perhaps set_cc_for_build should set
a flag (set_cc_for_build_invoked=true) when invoked and not do anything
when re-invoked?




BUG 2. Missing /proc/cpuinfo results is garbage printout.

The code

    alpha:Linux:*:*)
        case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in

is not good.  Please use

    alpha:Linux:*:*)
        case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' /proc/cpuinfo 
2>/dev/null` in

instead.  (Indeed, at least one place in config.guess already does
that.)

-- 
Torbjörn
Please encrypt, key id 0xC8601622



reply via email to

[Prev in Thread] Current Thread [Next in Thread]