This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH][SH] Multilib selection rework

On 06/04/09 18:01, Paolo Bonzini wrote:
The attached patch retains the new interface I created, but adds a new
possibility: --without-multilib-list. This achieves the same thing, but
hopefully in a more meaningful way?

Yes, nicer.

I'm trying to decide what the best possible interface for this might be. Here's the factors:

1. If no --with-multilib-list is given then the default for --target *must* be used. This is for backwards compatibility.

2. --with-multilib-list=LIST is already defined and *must* not change it's meaning, although extending it is OK. Again, this is for backwards compatibility.

3. Some way is needed to disable the default without adding any extra mutlilibs.

I originally suggested adding --with-multilib-list=none, and then subsequently --without-multilib-list to do the same thing, but now I'm concerned that maybe this removes the possibility of explicitly not giving the option, IYSWIM.

4. Maybe there should be some way to explicitly set it to the default.

Previously, this was possible by specifying --with-multilib-list=<blank>
but that was an accidental feature that I doubt anybody is using.

How about this interface?

<no option>
    default multilibs

--with-multilib-list={no | default}
    explicitly select default multilibs

--with-multilib-list={<blank> | none}
    disable all multilibs except for any secondary endian library.

    no change to current behaviour

The problem is that I don't know of a (non-bash) way for the config.gcc
script to tell the difference between a variable that is undefined, and
a variable that is set empty. It is important to retain the old
behaviour when the option is not given.

Thanks to Andreas Schwab for explaining how to do this. For some reason I thought "${var+set}" was a bashism.

Ok for me, but please wait for Ian's ack, with two nits in the
elimination of bashisms:

+ TM_MULTILIB_CONFIG="`echo $TM_MULTILIB_CONFIG | sed 's:^/::'`"
> No need for double quotes around a variable set; instead quote
> "$TM_MULTILIB_CONFIG" just in case.

There should be no white-space in this string, and, if there is, the exact format is not critical. I will remove the quotes.

Same here:

+ TM_MULTILIB_EXCEPTIONS_CONFIG="${TM_MULTILIB_EXCEPTIONS_CONFIG} `echo $sh_multilib | sed 's/^!//'`" ;;

Close the double quote before the `, and wrap echo's argument with double quotes.

Same again, no extra quotes are required for this string. It's going to get pasted into a makefile without quotes, in any case.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]