config-patches
[Top][All Lists]
Advanced

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

Re: [PATCH] * config.sub: Consolidate OS version checking


From: John Ericson
Subject: Re: [PATCH] * config.sub: Consolidate OS version checking
Date: Thu, 24 May 2018 01:11:35 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1

On 05/24/18 01:00, Ben Elliston wrote:
Applied, thanks.  I'm just waiting on the -sequent patch, John, and
then I think I am all caught up.

Cheers, Ben

Ah right. That's why the 6/6 didn't apply in the first place. I didn't realize that until now; since the ptx one deletes code, but revised 6/6 actually technically subsumes it.

> Also, don't you mean "ptx" (not "ipx")?

Indeed

> Can you please add a test case or two to config-sub.data that shows the correct behaviour?

Well it depends what we want. Right now

> valid_cpu-valid_os

in the most general case normalizes to

> valid_cpu-unknown-valid_os

with a big exception of valid_cpu being x86 of some sort, in which case it normalized to

> valid_cpu-pc-valid_os

This matters because at the bottom "unknown" is defaulted to various actual vendors where unambigous, while "pc" isn't. This means we have

> $ ./config.sub x86_64-unknown-ptx
> x86_64-sequent-ptx

but

> $ ./config.sub x86_64-pc-ptx
> x86_64-pc-ptx

and

> $ ./config.sub x86_64-ptx
> x86_64-pc-ptx

There's a few ways forward. The simplest is just to get rid of the x86 specical case --- with LLVM's influence on configs these days I don't think "unknown" would be as surprising as the comment in the code complains. Another solution is to across the board "refine" "unknown" and "pc" alike to more specific vendors. A third solution would be to default to unknown up above, but then refine to pc as a last resort at the bottom. The one complication with that is that *-unknown is a valid basic_machine pattern, which I think is a bit permissive, but that can be worked around with boolean flag variables.

For reference:

5308529936fc0c7bbbc8e04ad31974982481ecd0 commit that added the ptx exception

3836f7b0c4f252e56aa1124a9b235ba62c2a45da commit that added the *-unknown pattern



reply via email to

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