This is the mail archive of the gcc-patches@gcc.gnu.org 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]

[build] Only build mips-tfile, mips-tdump native (PR target/3746)


There's a long-standing PR that mips-tfile and mips-tdump fail to
compile in a cross.  This happens because both refer to non-existant
mips/a.out.h files in the cross-compilation case.  Since the tools are
now only used on Tru64 UNIX and gas/gld don't work for that target,
there's no point in trying to build them.  Besides, if gas worked,
mips-tfile wouldn't be needed at all.

The following patch only enables them native, and removes cross support
from mips-tfile.c/mips-tdump.c.

Bootstrapped without regressions on alpha-dec-osf5.1b and verified that
a i386-pc-solaris2.10 x alpha-dec-osf5.1b only dies when trying to build
libgcc due to lack of assembler and target headers.

Installed on mainline.

	Rainer


2011-05-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	PR target/3746
	* config.gcc (alpha*-dec-osf5.1*): Only build mips-tfile,
	mips-tdump native.
	* mips-tfile.c: Remove CROSS_DIRECTORY_STRUCTURE handling.
	* mips-tdump.c: Likewise.

diff --git a/gcc/config.gcc b/gcc/config.gcc
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -748,7 +748,9 @@ alpha*-dec-osf5.1*)
 	then
 		tm_file="${tm_file} dbx.h"
 	fi
-	if test x$gas != xyes
+	# mips-tfile and mips-tdump are only used with the native assembler
+	# and require the Tru64 UNIX <a.out.h>, so only build native.
+	if test x$gas != xyes && test x${host} = x${target}
 	then
 		extra_passes="mips-tfile mips-tdump"
 	fi
diff --git a/gcc/mips-tdump.c b/gcc/mips-tdump.c
--- a/gcc/mips-tdump.c
+++ b/gcc/mips-tdump.c
@@ -26,11 +26,7 @@ along with GCC; see the file COPYING3.  
 #ifdef index
 #undef index
 #endif
-#ifndef CROSS_DIRECTORY_STRUCTURE
 #include <a.out.h>
-#else
-#include "mips/a.out.h"
-#endif /* CROSS_DIRECTORY_STRUCTURE */
 
 /* Include getopt.h for the sake of getopt_long.  */
 #include "getopt.h"
diff --git a/gcc/mips-tfile.c b/gcc/mips-tfile.c
--- a/gcc/mips-tfile.c
+++ b/gcc/mips-tfile.c
@@ -1,4 +1,4 @@
-/* Update the symbol table (the .T file) in a MIPS object to
+/* Update the symbol table (the .T file) in a ECOFF object to
    contain debugging information specified by the GNU compiler
    in the form of comments (the mips assembler does not support
    assembly access to debug information).
@@ -633,12 +633,7 @@ extern void error (const char *format, .
 
 #undef index
 
-#ifndef CROSS_DIRECTORY_STRUCTURE
 #include <a.out.h>
-#else
-#include "mips/a.out.h"
-#endif /* CROSS_DIRECTORY_STRUCTURE */
-
 #include "gstab.h"
 
 #define IS_ASM_IDENT(ch) \


-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University


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