Message ID | yddvcygaa3i.fsf@manam.CeBiTec.Uni-Bielefeld.DE |
---|---|
State | New |
Headers | show |
Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> writes: > Ok for mainline if that passes? Definitely, thanks. Richard > 2011-04-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> > > * config/mips/mips.h (DBX_OUTPUT_SOURCE_LINE): Remove. > * config/mips/mips.opt (mmips-tfile): Remove. > > * doc/install.texi (Specific, mips-*-*): Move mips-tfile, > mips-tdump reference to ... > (Specific, alpha*-dec-osf5.1): ... here. > Adapt for Tru64 UNIX. > * doc/trouble.texi (Cross-Compiler Problems): Replace MIPS > reference by Tru64 UNIX.
Not strictly related to this patch, but there are other cleanups possible because of the only-used-on-Tru64 nature of mips-tdump/mips-tfile. In particular, there are seven target macros (all undocumented) used by those programs and nowhere else in GCC: ALIGN_SYMTABLE_OFFSET CODE_MASK MIPS_IS_STAB MIPS_MARK_STAB MIPS_UNMARK_STAB SHASH_SIZE THASH_SIZE. Since those are only defined in alpha.h and only used on those programs, it would be better to hardcode the definitions inside mips-{tdump,tfile}.c, remove them from alpha.h and so eliminate seven target macros (about 1% of the total). If you also hardcode the right definition of MIPS_DEBUGGING_INFO (used both in mips-tfile and elsewhere) then these programs should no longer depend on target macros and their tm.h includes can be removed. (There are many other instances of #if conditionals in those programs, all of which are suspect since the programs are native-only for a single target and so shouldn't need conditional compilation at all. But those other conditionals aren't relevant to target macro elimination.)
Joseph, > Not strictly related to this patch, but there are other cleanups possible > because of the only-used-on-Tru64 nature of mips-tdump/mips-tfile. In > particular, there are seven target macros (all undocumented) used by those > programs and nowhere else in GCC: ALIGN_SYMTABLE_OFFSET CODE_MASK > MIPS_IS_STAB MIPS_MARK_STAB MIPS_UNMARK_STAB SHASH_SIZE THASH_SIZE. > Since those are only defined in alpha.h and only used on those programs, > it would be better to hardcode the definitions inside > mips-{tdump,tfile}.c, remove them from alpha.h and so eliminate seven > target macros (about 1% of the total). If you also hardcode the right > definition of MIPS_DEBUGGING_INFO (used both in mips-tfile and elsewhere) > then these programs should no longer depend on target macros and their > tm.h includes can be removed. seems like a plan. I'll have a look, especially since several of the macros are only used in either mips-tfile.c or mips-tdump.c, so such a patch wouldn't introduce much duplication. > (There are many other instances of #if conditionals in those programs, all > of which are suspect since the programs are native-only for a single > target and so shouldn't need conditional compilation at all. But those > other conditionals aren't relevant to target macro elimination.) I strongly suspect this occured when the MIPS port no longer needed mips-tfile, but didn't remove MIPS dependencies. Rainer
diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h --- a/gcc/config/mips/mips.h +++ b/gcc/config/mips/mips.h @@ -2556,12 +2556,6 @@ do \ } \ while (0) -/* mips-tfile does not understand .stabd directives. */ -#define DBX_OUTPUT_SOURCE_LINE(STREAM, LINE, COUNTER) do { \ - dbxout_begin_stabn_sline (LINE); \ - dbxout_stab_value_internal_label ("LM", &COUNTER); \ -} while (0) - /* Use .loc directives for SDB line numbers. */ #define SDB_OUTPUT_SOURCE_LINE(STREAM, LINE) \ fprintf (STREAM, "\t.loc\t%d %d\n", num_source_filenames, LINE) diff --git a/gcc/config/mips/mips.opt b/gcc/config/mips/mips.opt --- a/gcc/config/mips/mips.opt +++ b/gcc/config/mips/mips.opt @@ -222,10 +222,6 @@ mmemcpy Target Report Mask(MEMCPY) Don't optimize block moves -mmips-tfile -Target -Use the mips-tfile postpass - mmt Target Report Var(TARGET_MT) Allow the use of MT instructions diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi --- a/gcc/doc/install.texi +++ b/gcc/doc/install.texi @@ -3102,6 +3102,10 @@ As of GNU binutils 2.21, neither GNU @co are supported on Tru64 UNIX, so you must not configure GCC with @option{--with-gnu-as} or @option{--with-gnu-ld}. +Cross-compilers for the Tru64 UNIX target currently do not work because +the auxiliary programs @command{mips-tdump} and @command{mips-tfile} can't +be compiled on anything but Tru64 UNIX. + GCC writes a @samp{.verstamp} directive to the assembler output file unless it is built as a cross-compiler. It gets the version to use from the system header file @file{/usr/include/stamp.h}. If you install a @@ -3843,12 +3847,6 @@ the use of break, use the @option{--with @command{configure} option when configuring GCC@. The default is to use traps on systems that support them. -Cross-compilers for the MIPS as target using the MIPS assembler -currently do not work, because the auxiliary programs -@file{mips-tdump.c} and @file{mips-tfile.c} can't be compiled on -anything but a MIPS@. It does work to cross compile for a MIPS -if you use the GNU assembler and linker. - The assembler from GNU binutils 2.17 and earlier has a bug in the way it sorts relocations for REL targets (o32, o64, EABI). This can cause bad code to be generated for simple C++ programs. Also the linker diff --git a/gcc/doc/trouble.texi b/gcc/doc/trouble.texi --- a/gcc/doc/trouble.texi +++ b/gcc/doc/trouble.texi @@ -55,7 +55,7 @@ for several reasons. @itemize @bullet @item At present, the program @file{mips-tfile} which adds debug -support to object files on MIPS systems does not work in a cross +support to object files on Tru64 UNIX systems does not work in a cross compile environment. @end itemize