This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][RFC] -EB / -EL don't properly affect gcc predefined symbols
- From: Andrew Pinski <pinskia at gmail dot com>
- To: Hiroki Kaminaga <kaminaga at sm dot sony dot co dot jp>
- Cc: ralf at linux-mips dot org, gcc at gcc dot gnu dot org
- Date: Thu, 12 Oct 2006 07:26:04 -0700
- Subject: Re: [PATCH][RFC] -EB / -EL don't properly affect gcc predefined symbols
- References: <20061012.170655.48802878.kaminaga@sm.sony.co.jp>
On Thu, 2006-10-12 at 17:06 +0900, Hiroki Kaminaga wrote:
> Hi,
>
> Regarding the PR:
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29413
>
> Is below patch adequate to fix the problem?
> Works fine with me, but haven't done any regression test.
As I mentioned in the bug report, the problem is that CC1_SPEC
is the wrong one.
Adding EB/EL to CPP_SPEC will only fix the C/C++/Objective-C front-ends
and no others.
The attached patch is the more correct way to solve this.
Thanks,
Andrew Pinski
Index: mips.h
===================================================================
--- mips.h (revision 117658)
+++ mips.h (working copy)
@@ -865,13 +865,12 @@ extern const struct mips_rtx_cost_data *
/* CC1_SPEC is the set of arguments to pass to the compiler proper. */
-#ifndef CC1_SPEC
+#undef CC1_SPEC
#define CC1_SPEC "\
%{gline:%{!g:%{!g0:%{!g1:%{!g2: -g1}}}}} \
%{G*} %{EB:-meb} %{EL:-mel} %{EB:%{EL:%emay not use both -EB and -EL}} \
%{save-temps: } \
%(subtarget_cc1_spec)"
-#endif
/* Preprocessor specs. */