diff mbox

[MIPS] Refine configure guard for .module availability

Message ID 6D39441BF12EF246A7ABCE6654B0235320F785D4@LEMAIL01.le.imgtec.org
State New
Headers show

Commit Message

Matthew Fortune Nov. 21, 2014, 2:04 p.m. UTC
(I'm not sure if I need approval from someone else for MIPS
specific top level 'configure' changes.  I'm cautiously assuming
I do for now.)

Since adding o32 FFPXX support, the MIPS backend uses the .module
directive to emit a .module [no]oddspreg when .module support is
detected in binutils.  The oddspreg option was however only added
to binutils with FPXX and not the initial .module support.  This
leads to errors when using binutils-gdb between the following
commits:

commit 919731affbef19fcad8dddb0a595bb05755cb345
Author: mfortune <matthew.fortune@imgtec.com>
Date:   Tue May 20 13:28:20 2014 +0100

    Add MIPS .module directive

commit 351cdf24d223290b15fa991e5052ec9e9bd1e284
Author: Matthew Fortune <matthew.fortune@imgtec.com>
Date:   Tue Jul 29 11:27:59 2014 +0100

    [MIPS] Implement O32 FPXX, FP64 and FP64A ABI extensions

I have updated the configure check for .module to check for both
.module and FPXX support.  There was no point in separating
the detection of .module from detection of FPXX as there is no
need to switch to .module until using FPXX.

Tested a build of the compiler for mipsel-linux-gnu, mips64el-linux-gnu
with binutils which predates and postdates FPXX and checked that the
configure results are correct and that .module vs .gnu_attribute is
generated appropriately.

Thanks,
Matthew

gcc/

	* configure.ac: When checking for .module support ensure that
	o32 FPXX is supported to avoid a second configure check.
	* configure: Regenerate.

Comments

Matthew Fortune Nov. 21, 2014, 9:28 p.m. UTC | #1
Matthew Fortune <Matthew.Fortune@imgtec.com> writes:
> (I'm not sure if I need approval from someone else for MIPS specific 
> top level 'configure' changes.  I'm cautiously assuming I do for now.)

FWIW, MIPS maintainership covers all MIPS-specific code and documentation (except for externally-maintained code) so you don't need approval.

Thanks Richard. I've committed on that basis.

Matthew
diff mbox

Patch

diff --git a/gcc/configure.ac b/gcc/configure.ac
index f6e7ec3..584400d 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -4280,8 +4280,9 @@  LCF0:
 	  [Define if your assembler supports .gnu_attribute.])])
 
     gcc_GAS_CHECK_FEATURE([.module support],
-      gcc_cv_as_mips_dot_module,,,
-      [.module fp=32],,
+      gcc_cv_as_mips_dot_module,,[-32],
+      [.module mips2
+       .module fp=xx],,
       [AC_DEFINE(HAVE_AS_DOT_MODULE, 1,
 	  [Define if your assembler supports .module.])])
     if test x$gcc_cv_as_mips_dot_module = xno \