Re: CVS Update@xxxxxxxxxxxxxx: linux

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 8 Jul 2005, Richard Sandiford wrote:

> Right.  I've always thought of them as the canonical options for gcc
> as well.  I think the only reason internal compilers like cc1 have
> -mel and -meb is because gcc's target options system has traditionally
> required every target option to begin with "-m".  (That's no longer
> a restriction in 4.1 FWIW.)

 I'm not sure relaxing this restriction is actually a good idea -- there 
may be tools external to GCC that make this assumption for additional 
handling of options passed to GCC.  I could imagine libtool being 
sensitive, for example (but that's just an assumption -- I haven't checked 
it).  And this classification of options -- "-f*" for optimization tweaks 
and "-m*" for target-dependent ones -- seems to be useful for humans (or 
at least one), too, as one does not to have to resort to documentation for 
every option encountered in Makefiles to have an idea about it.

> So contrary to what was said upthread, I've always treated
> the omission of these options from invoke.texi as deliberate.

 OK, I stand corrected.

> They're really internal compiler flags rather than user flags.

 Which actually happen to work...

> You should use -EL and -EB instead.

 ... unlike these.

 FWIW, I prepared the following patch for GCC 3.4.x the other day -- would 
you care to verify whether it's still needed for 4.x?  It may be worth 
applying to 3.4, too -- I think the branch hasn't got closed yet, has it?

2005-07-08  Maciej W. Rozycki  <macro@xxxxxxxx>

	* config/mips/linux.h (CC1_SPEC): Override defaults from
	config/linux.h.

 Unfortunately it won't let us remove the newly introduced hackery from 
Linux as (unlike you) we need to support versions back to 2.95.x.  
Therefore I sustain my proposal to use "-mel" and "-meb" as more reliable 
-- I'm pretty sure they used to work for 2.95.x, too.

  Maciej

gcc-3.4.4-20050617-linux-cc1-spec-0.patch
--- gcc/gcc/config/mips/linux.h	30 Jul 2004 15:33:08 -0000
+++ gcc/gcc/config/mips/linux.h	17 Jun 2005 19:59:20 -0000
@@ -101,6 +101,16 @@ Boston, MA 02111-1307, USA.  */
 %{fPIC|fPIE|fpic|fpie:-D__PIC__ -D__pic__} \
 %{pthread:-D_REENTRANT}"
 
+/* Merged from linux.h and mips/mips.h.  */
+#undef CC1_SPEC
+#define CC1_SPEC "\
+%{profile:-p} \
+%{gline:%{!g:%{!g0:%{!g1:%{!g2: -g1}}}}} \
+%{mips16*:%{!fno-section-relative-addressing:-fsection-relative-addressing -fno-common}} \
+%{fsection-relative-addressing:-fno-common} \
+%{G*} %{EB:-meb} %{EL:-mel} %{EB:%{EL:%emay not use both -EB and -EL}} \
+%(subtarget_cc1_spec)"
+
 /* From iris5.h */
 /* -G is incompatible with -KPIC which is the default, so only allow objects
    in the small data section if the user explicitly asks for it.  */


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux