annotate sources/patches/gcc-core-macrosity.patch @ 1573:e102acef0200

Teach the compiler to emit the macro linux 3.7 wants in the mips build.
author Rob Landley <rob@landley.net>
date Sat, 15 Dec 2012 01:45:36 -0600
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1573
e102acef0200 Teach the compiler to emit the macro linux 3.7 wants in the mips build.
Rob Landley <rob@landley.net>
parents:
diff changeset
1 Back in 2007 gcc started predefining __SIZEOF_BLAH__ macros, and the 3.7
e102acef0200 Teach the compiler to emit the macro linux 3.7 wants in the mips build.
Rob Landley <rob@landley.net>
parents:
diff changeset
2 kernel won't build without them, so hack them into the toolchain.
e102acef0200 Teach the compiler to emit the macro linux 3.7 wants in the mips build.
Rob Landley <rob@landley.net>
parents:
diff changeset
3
e102acef0200 Teach the compiler to emit the macro linux 3.7 wants in the mips build.
Rob Landley <rob@landley.net>
parents:
diff changeset
4 --- gcc-core/gcc/c-cppbuiltin.c 2007-03-12 13:50:38.000000000 -0500
e102acef0200 Teach the compiler to emit the macro linux 3.7 wants in the mips build.
Rob Landley <rob@landley.net>
parents:
diff changeset
5 +++ gcc-core.bak/gcc/c-cppbuiltin.c 2012-12-14 22:22:25.922719393 -0600
e102acef0200 Teach the compiler to emit the macro linux 3.7 wants in the mips build.
Rob Landley <rob@landley.net>
parents:
diff changeset
6 @@ -549,6 +549,25 @@
e102acef0200 Teach the compiler to emit the macro linux 3.7 wants in the mips build.
Rob Landley <rob@landley.net>
parents:
diff changeset
7 if (flag_openmp)
e102acef0200 Teach the compiler to emit the macro linux 3.7 wants in the mips build.
Rob Landley <rob@landley.net>
parents:
diff changeset
8 cpp_define (pfile, "_OPENMP=200505");
e102acef0200 Teach the compiler to emit the macro linux 3.7 wants in the mips build.
Rob Landley <rob@landley.net>
parents:
diff changeset
9
e102acef0200 Teach the compiler to emit the macro linux 3.7 wants in the mips build.
Rob Landley <rob@landley.net>
parents:
diff changeset
10 +#define MACRO_AND_CHEESE(NAME, TYPE) \
e102acef0200 Teach the compiler to emit the macro linux 3.7 wants in the mips build.
Rob Landley <rob@landley.net>
parents:
diff changeset
11 + builtin_define_with_int_value("__SIZEOF_" NAME "__", \
e102acef0200 Teach the compiler to emit the macro linux 3.7 wants in the mips build.
Rob Landley <rob@landley.net>
parents:
diff changeset
12 + tree_low_cst(TYPE_SIZE_UNIT(TYPE##_type_node), 1))
e102acef0200 Teach the compiler to emit the macro linux 3.7 wants in the mips build.
Rob Landley <rob@landley.net>
parents:
diff changeset
13 +
e102acef0200 Teach the compiler to emit the macro linux 3.7 wants in the mips build.
Rob Landley <rob@landley.net>
parents:
diff changeset
14 + MACRO_AND_CHEESE("INT", integer);
e102acef0200 Teach the compiler to emit the macro linux 3.7 wants in the mips build.
Rob Landley <rob@landley.net>
parents:
diff changeset
15 + MACRO_AND_CHEESE("LONG", long_integer);
e102acef0200 Teach the compiler to emit the macro linux 3.7 wants in the mips build.
Rob Landley <rob@landley.net>
parents:
diff changeset
16 + MACRO_AND_CHEESE("LONG_LONG", long_long_integer);
e102acef0200 Teach the compiler to emit the macro linux 3.7 wants in the mips build.
Rob Landley <rob@landley.net>
parents:
diff changeset
17 + MACRO_AND_CHEESE("SHORT", short_integer);
e102acef0200 Teach the compiler to emit the macro linux 3.7 wants in the mips build.
Rob Landley <rob@landley.net>
parents:
diff changeset
18 + MACRO_AND_CHEESE("FLOAT", float);
e102acef0200 Teach the compiler to emit the macro linux 3.7 wants in the mips build.
Rob Landley <rob@landley.net>
parents:
diff changeset
19 + MACRO_AND_CHEESE("DOUBLE", double);
e102acef0200 Teach the compiler to emit the macro linux 3.7 wants in the mips build.
Rob Landley <rob@landley.net>
parents:
diff changeset
20 + MACRO_AND_CHEESE("LONG_DOUBLE", long_double);
e102acef0200 Teach the compiler to emit the macro linux 3.7 wants in the mips build.
Rob Landley <rob@landley.net>
parents:
diff changeset
21 + MACRO_AND_CHEESE("SIZE_T", size);
e102acef0200 Teach the compiler to emit the macro linux 3.7 wants in the mips build.
Rob Landley <rob@landley.net>
parents:
diff changeset
22 + MACRO_AND_CHEESE("WCHAR_T", wchar);
e102acef0200 Teach the compiler to emit the macro linux 3.7 wants in the mips build.
Rob Landley <rob@landley.net>
parents:
diff changeset
23 + MACRO_AND_CHEESE("WINT_T", wint);
e102acef0200 Teach the compiler to emit the macro linux 3.7 wants in the mips build.
Rob Landley <rob@landley.net>
parents:
diff changeset
24 + MACRO_AND_CHEESE("PTRDIFF_T", unsigned_ptrdiff);
e102acef0200 Teach the compiler to emit the macro linux 3.7 wants in the mips build.
Rob Landley <rob@landley.net>
parents:
diff changeset
25 +
e102acef0200 Teach the compiler to emit the macro linux 3.7 wants in the mips build.
Rob Landley <rob@landley.net>
parents:
diff changeset
26 + builtin_define_with_int_value("__SIZEOF_POINTER__",
e102acef0200 Teach the compiler to emit the macro linux 3.7 wants in the mips build.
Rob Landley <rob@landley.net>
parents:
diff changeset
27 + POINTER_SIZE/BITS_PER_UNIT);
e102acef0200 Teach the compiler to emit the macro linux 3.7 wants in the mips build.
Rob Landley <rob@landley.net>
parents:
diff changeset
28 +
e102acef0200 Teach the compiler to emit the macro linux 3.7 wants in the mips build.
Rob Landley <rob@landley.net>
parents:
diff changeset
29 /* A straightforward target hook doesn't work, because of problems
e102acef0200 Teach the compiler to emit the macro linux 3.7 wants in the mips build.
Rob Landley <rob@landley.net>
parents:
diff changeset
30 linking that hook's body when part of non-C front ends. */
e102acef0200 Teach the compiler to emit the macro linux 3.7 wants in the mips build.
Rob Landley <rob@landley.net>
parents:
diff changeset
31 # define preprocessing_asm_p() (cpp_get_options (pfile)->lang == CLK_ASM)