On Wed, Aug 29, 2012 at 01:54:17PM -0400, Brad Smith wrote: > On Wed, Aug 29, 2012 at 09:13:55PM +0400, Simon Atanasyan wrote: > > Hi, > > > > On Thu, Aug 23, 2012 at 8:48 AM, Jonathan Gray <[email protected]> wrote: > > > Here is a patch to add __foo__ type defines for mips which > > > were otherwise missing. Matches what gcc was producing on > > > OpenBSD/sgi (mips64eb). > > > > Are you sure that __mips__ is not defined? The following call defines > > "__mips", "__mips__" and "mips" (under some conditions) macros. > > > > [[ > > DefineStd(Builder, "mips", Opts); > > ]] > > I had pointed out to Jonathan on our OpenBSD list that most of what he > was looking for was already covered by the use of DefineStd. I posted > another diff that covers the mips64 symbols we're still missing from > the Driver.
just rebuilt trunk clang: clang -target mips64-unknown-openbsd5.2 -dM -E - < /dev/null | fgrep -i mips | sort -u #define MIPSEB 1 #define _MIPSEB 1 #define _MIPS_ARCH "mips64" #define _MIPS_ARCH_MIPS64 1 #define _MIPS_SIM _ABI64 #define _MIPS_SZINT 32 #define _MIPS_SZLONG 64 #define _MIPS_SZPTR 64 #define __MIPSEB 1 #define __MIPSEB__ 1 #define __mips 1 #define __mips64 1 #define __mips64__ 1 #define __mips__ 1 #define __mips_hard_float 1 #define __mips_n64 1 #define _mips 1 #define mips 1 OpenBSD/sgi with gcc 4.2.1: cc -dM -E - < /dev/null | fgrep -i mips | sort -u #define MIPSEB 1 #define _MIPSEB 1 #define _MIPS_ARCH "mips3" #define _MIPS_ARCH_MIPS3 1 #define _MIPS_FPSET 32 #define _MIPS_ISA _MIPS_ISA_MIPS3 #define _MIPS_SIM _ABI64 #define _MIPS_SZINT 32 #define _MIPS_SZLONG 64 #define _MIPS_SZPTR 64 #define _MIPS_TUNE "mips3" #define _MIPS_TUNE_MIPS3 1 #define __MIPSEB 1 #define __MIPSEB__ 1 #define __mips 3 #define __mips64 1 #define __mips64__ 1 #define __mips__ 1 #define __mips_fpr 64 #define __mips_hard_float 1 #define __mips_n64 1 #define _mips 1 #define mips 1 I think that covers all the defines we care about, but for interest's sake here is the diff between them: --- /tmp/gcc Fri Aug 31 01:29:43 2012 +++ /tmp/clang Fri Aug 31 01:27:10 2012 @@ -1,22 +1,17 @@ #define MIPSEB 1 #define _MIPSEB 1 -#define _MIPS_ARCH "mips3" -#define _MIPS_ARCH_MIPS3 1 -#define _MIPS_FPSET 32 -#define _MIPS_ISA _MIPS_ISA_MIPS3 +#define _MIPS_ARCH "mips64" +#define _MIPS_ARCH_MIPS64 1 #define _MIPS_SIM _ABI64 #define _MIPS_SZINT 32 #define _MIPS_SZLONG 64 #define _MIPS_SZPTR 64 -#define _MIPS_TUNE "mips3" -#define _MIPS_TUNE_MIPS3 1 #define __MIPSEB 1 #define __MIPSEB__ 1 -#define __mips 3 +#define __mips 1 #define __mips64 1 #define __mips64__ 1 #define __mips__ 1 -#define __mips_fpr 64 #define __mips_hard_float 1 #define __mips_n64 1 #define _mips 1 _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
