This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] [i386] PR 81850 Don't ignore -mabi=sysv on Cygwin/MinGW
- From: Uros Bizjak <ubizjak at gmail dot com>
- To: Daniel Santos <daniel dot santos at pobox dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>, Jan Hubicka <hubicka at ucw dot cz>, Jonathan Yong <10walls at gmail dot com>
- Date: Tue, 22 Aug 2017 08:32:16 +0200
- Subject: Re: [PATCH] [i386] PR 81850 Don't ignore -mabi=sysv on Cygwin/MinGW
- Authentication-results: sourceware.org; auth=none
- References: <20170822021019.6963-1-daniel.santos@pobox.com>
On Tue, Aug 22, 2017 at 4:10 AM, Daniel Santos <daniel.santos@pobox.com> wrote:
> This is a problem that occured because of this code in
> ix86_option_override_internal:
>
> if (!opts_set->x_ix86_abi)
> opts->x_ix86_abi = DEFAULT_ABI;
>
> I tested this along with my other patches. OK for trunk?
>
> * config/i386/i386-opts.h (enum calling_abi): Modify so that no legal
> values are equivalent to zero.
Please add UNKNOWN_ABI to the enum and initialize -mabi in i386.opt to
UNKNOWN_ABI.
Then change the above condition to
if (opts_set->x_ix86_abi == UNKNOWN_ABI)
We can't just init -mabi to DEFAULT_ABI, sinde this is selected at
runtime. Maybe a comment should be added for UNKNOWN_ABI, that it is
overriden in ix86_option_override_internal.
Uros.
> Thanks,
> Daniel
>
> Signed-off-by: Daniel Santos <daniel.santos@pobox.com>
> ---
> gcc/config/i386/i386-opts.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/gcc/config/i386/i386-opts.h b/gcc/config/i386/i386-opts.h
> index 542cd0f3d67..8c2b5380e49 100644
> --- a/gcc/config/i386/i386-opts.h
> +++ b/gcc/config/i386/i386-opts.h
> @@ -44,8 +44,8 @@ last_alg
> /* Available call abi. */
> enum calling_abi
> {
> - SYSV_ABI = 0,
> - MS_ABI = 1
> + SYSV_ABI = 1,
> + MS_ABI = 2
> };
>
> enum fpmath_unit
> --
> 2.13.3
>