From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thiemo Seufer To: binutils@sourceware.cygnus.com Subject: Re: Question: the differences between -mabi=xxx and -32/-64 in the mips gas Date: Tue, 21 Aug 2001 12:20:00 -0000 Message-id: <20010821212015.H30301@rembrandt.csv.ica.uni-stuttgart.de> References: <20010821094852.A4188@lucon.org> X-SW-Source: 2001-08/msg00480.html H . J . Lu wrote: > The -mabi=xxx swicth in the mips gas is not ducomented. What are the > differences between -mabi=xxx and -32/-64, other than there are more > options with -mabi=xxx? AFAICS there shouldn't be one. Coincidentally, I've just made this patch which implies -64 for -mabi=64 and fixes also the handling of -mabi=64 WRT -mgp{32,64} and -mfp32. Thiemo 2001-08-21 Thiemo Seufer /gas/ChangeLog * tc_mips.c (md_parse_option): Remove comment about mips_32bitmode, it should be set later if needed. Removed setting of mips_64 for OPTION_GP64. Set mips_64 to zero for OPTION_GP32. Let -mabi=64 imply -64. diff -BurpNX /bigdisk/src/binutils-exclude src-orig/gas/config/tc-mips.c src/gas/config/tc-mips.c --- src-orig/gas/config/tc-mips.c Sat Aug 18 21:47:23 2001 +++ src/gas/config/tc-mips.c Tue Aug 21 18:21:49 2001 @@ -9222,31 +9497,15 @@ md_parse_option (c, arg) case OPTION_GP32: mips_gp32 = 1; mips_64 = 0; - - /* We deliberately don't allow "-gp32" to set the MIPS_32BITMODE - flag in object files because to do so would make it - impossible to link with libraries compiled without "-gp32". - This is unnecessarily restrictive. - - We could solve this problem by adding "-gp32" multilibs to - gcc, but to set this flag before gcc is built with such - multilibs will break too many systems. */ - -#if 0 - mips_32bitmode = 1; -#endif break; case OPTION_GP64: mips_gp32 = 0; - mips_64 = 1; -#if 0 - mips_32bitmode = 0; -#endif break; case OPTION_FP32: mips_fp32 = 1; + mips_64 = 0; break; case OPTION_MABI: @@ -9258,6 +9517,7 @@ md_parse_option (c, arg) { mips_abi_string = arg; mips_32bit_abi = (strcmp (arg, "32") == 0); + mips_64 = (strcmp (arg, "64") == 0); } break;