> -----Original Message-----
> From: Joseph Myers [mailto:jos...@codesourcery.com]
> Sent: Friday, November 09, 2012 5:10 AM
> To: Terry Guo
> Cc: gcc-patches@gcc.gnu.org
> Subject: RE: [RFC] New feature to reuse one multilib among different
> targets
> 
> On Thu, 8 Nov 2012, Terry Guo wrote:
> 
> > To convert such statements to data structure used by multilib_raw, I
> > refactor codes in genmultilib into two functions combo_to_dir and
> 
> The "function" keyword for creating shell functions is not POSIX, and I
> don't know if we ensure that $SHELL is a shell supporting functions.
> (It's documented that CONFIG_SHELL may need to be set to a POSIX shell
> if /bin/sh isn't sufficient, but does that feed through to the value of
> SHELL used to run this script?)
> 

You are right that we should make script POSIX compliant. This v3 patch
removed "function" and "local" which don't belong to POSIX standard. I also
verified that CONFIG_SHELL is passed to this script with value "/bin/sh".

Checked new genmultilib script with command "checkbashisms --posix
genmultilib" in Ubuntu. No warning and error messages reported.

[...]
> 
> Documentation changes need mentioning in ChangeLog entries.
> 

Added them in following ChangeLog.

BR,
Terry

2012-11-09  Terry Guo  <terry....@arm.com>

        * genmultilib (combo_to_dir): New function.
        (options_output): New function.
        (MULTILIB_REUSE): New argument.
        * Makefile.in (s-mlib): Add a new argument MULTILIB_REUSE.
        * gcc.c (multilib_reuse): New spec.
        (set_multilib_dir): Use multilib_reuse.
        * doc/fragments.texi: Mention MULTILIB_REUSE.

Attachment: multilib-reuse-v3.patch
Description: Binary data

Reply via email to