Mercurial > hg > CbC > CbC_gcc
comparison gcc/config/host-darwin.c @ 67:f6334be47118
update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
author | nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 22 Mar 2011 17:18:12 +0900 |
parents | a06113de4d67 |
children | 04ced10e8804 |
comparison
equal
deleted
inserted
replaced
65:65488c3d617d | 67:f6334be47118 |
---|---|
1 /* Darwin host-specific hook definitions. | 1 /* Darwin host-specific hook definitions. |
2 Copyright (C) 2003, 2004, 2005, 2007 Free Software Foundation, Inc. | 2 Copyright (C) 2003, 2004, 2005, 2007, 2010 Free Software Foundation, Inc. |
3 | 3 |
4 This file is part of GCC. | 4 This file is part of GCC. |
5 | 5 |
6 GCC is free software; you can redistribute it and/or modify it | 6 GCC is free software; you can redistribute it and/or modify it |
7 under the terms of the GNU General Public License as published | 7 under the terms of the GNU General Public License as published |
18 <http://www.gnu.org/licenses/>. */ | 18 <http://www.gnu.org/licenses/>. */ |
19 | 19 |
20 #include "config.h" | 20 #include "config.h" |
21 #include "system.h" | 21 #include "system.h" |
22 #include "coretypes.h" | 22 #include "coretypes.h" |
23 #include <sys/mman.h> | 23 #include "diagnostic-core.h" |
24 #include "toplev.h" | |
25 #include "config/host-darwin.h" | 24 #include "config/host-darwin.h" |
26 | 25 |
27 /* Yes, this is really supposed to work. */ | 26 /* Yes, this is really supposed to work. */ |
28 static char pch_address_space[1024*1024*1024] __attribute__((aligned (4096))); | 27 static char pch_address_space[1024*1024*1024] __attribute__((aligned (4096))); |
29 | 28 |
57 | 56 |
58 /* Round the size to a whole page size. Normally this is a no-op. */ | 57 /* Round the size to a whole page size. Normally this is a no-op. */ |
59 sz = (sz + pagesize - 1) / pagesize * pagesize; | 58 sz = (sz + pagesize - 1) / pagesize * pagesize; |
60 | 59 |
61 if (munmap (pch_address_space + sz, sizeof (pch_address_space) - sz) != 0) | 60 if (munmap (pch_address_space + sz, sizeof (pch_address_space) - sz) != 0) |
62 fatal_error ("couldn't unmap pch_address_space: %m"); | 61 fatal_error ("couldn%'t unmap pch_address_space: %m"); |
63 | 62 |
64 if (ret) | 63 if (ret) |
65 { | 64 { |
66 mmap_result = mmap (addr, sz, | 65 mmap_result = mmap (addr, sz, |
67 PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_FIXED, | 66 PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_FIXED, |