From patchwork Tue Dec 7 14:44:45 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svr4.h avoidance: cris Date: Tue, 07 Dec 2010 04:44:45 -0000 From: "Joseph S. Myers" X-Patchwork-Id: 74554 Message-Id: To: gcc-patches@gcc.gnu.org Cc: hp@axis.com This patch in the series removing svr4.h from the headers used by particular targets in GCC stops cris*-*-linux* from using svr4.h, defining the two macros used from that header in cris/linux.h instead. Tested building cc1 and xgcc for a cross to cris-linux-gnu. OK to commit? 2010-12-07 Joseph Myers * config/cris/linux.h (SIZE_TYPE, PTRDIFF_TYPE): Define. * config.gcc (crisv32-*-linux* | cris-*-linux*): Don't use svr4.h. diff -rupN --exclude=.svn gcc-mainline-3/gcc/config/cris/linux.h gcc-mainline/gcc/config/cris/linux.h --- gcc-mainline-3/gcc/config/cris/linux.h 2010-12-02 09:39:19.000000000 -0800 +++ gcc-mainline/gcc/config/cris/linux.h 2010-12-07 06:36:17.000000000 -0800 @@ -132,7 +132,14 @@ along with GCC; see the file COPYING3. builtin_define ("__NO_UNDERSCORES__"); \ } \ while (0) + +/* Node: Type Layout */ +#undef SIZE_TYPE +#define SIZE_TYPE "unsigned int" + +#undef PTRDIFF_TYPE +#define PTRDIFF_TYPE "int" /* Node: Sections */ diff -rupN --exclude=.svn gcc-mainline-3/gcc/config.gcc gcc-mainline/gcc/config.gcc --- gcc-mainline-3/gcc/config.gcc 2010-12-06 03:31:49.000000000 -0800 +++ gcc-mainline/gcc/config.gcc 2010-12-07 06:33:08.000000000 -0800 @@ -942,7 +942,7 @@ cris-*-elf | cris-*-none) use_gcc_stdint=wrap ;; crisv32-*-linux* | cris-*-linux*) - tm_file="dbxelf.h elfos.h svr4.h ${tm_file} linux.h glibc-stdint.h cris/linux.h" + tm_file="dbxelf.h elfos.h ${tm_file} linux.h glibc-stdint.h cris/linux.h" # We need to avoid using t-linux, so override default tmake_file tmake_file="cris/t-cris t-slibgcc-elf-ver cris/t-linux" extra_options="${extra_options} cris/linux.opt"