comparison gcc/config/host-linux.c @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents f6334be47118
children 84e7813d76e9
comparison
equal deleted inserted replaced
68:561a7518be6b 111:04ced10e8804
1 /* Linux host-specific hook definitions. 1 /* Linux host-specific hook definitions.
2 Copyright (C) 2004, 2005, 2007, 2008, 2010 Free Software Foundation, Inc. 2 Copyright (C) 2004-2017 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
66 that's probably free. */ 66 that's probably free. */
67 #if defined(__alpha) 67 #if defined(__alpha)
68 # define TRY_EMPTY_VM_SPACE 0x10000000000 68 # define TRY_EMPTY_VM_SPACE 0x10000000000
69 #elif defined(__ia64) 69 #elif defined(__ia64)
70 # define TRY_EMPTY_VM_SPACE 0x2000000100000000 70 # define TRY_EMPTY_VM_SPACE 0x2000000100000000
71 #elif defined(__x86_64) && defined(__LP64__)
72 # define TRY_EMPTY_VM_SPACE 0x1000000000
71 #elif defined(__x86_64) 73 #elif defined(__x86_64)
72 # define TRY_EMPTY_VM_SPACE 0x1000000000 74 # define TRY_EMPTY_VM_SPACE 0x60000000
73 #elif defined(__i386) 75 #elif defined(__i386)
74 # define TRY_EMPTY_VM_SPACE 0x60000000 76 # define TRY_EMPTY_VM_SPACE 0x60000000
75 #elif defined(__powerpc__) 77 #elif defined(__powerpc__)
76 # define TRY_EMPTY_VM_SPACE 0x60000000 78 # define TRY_EMPTY_VM_SPACE 0x60000000
77 #elif defined(__s390x__) 79 #elif defined(__s390x__)
82 # define TRY_EMPTY_VM_SPACE 0x8000000000 84 # define TRY_EMPTY_VM_SPACE 0x8000000000
83 #elif defined(__sparc__) 85 #elif defined(__sparc__)
84 # define TRY_EMPTY_VM_SPACE 0x60000000 86 # define TRY_EMPTY_VM_SPACE 0x60000000
85 #elif defined(__mc68000__) 87 #elif defined(__mc68000__)
86 # define TRY_EMPTY_VM_SPACE 0x40000000 88 # define TRY_EMPTY_VM_SPACE 0x40000000
89 #elif defined(__aarch64__) && defined(__ILP32__)
90 # define TRY_EMPTY_VM_SPACE 0x60000000
91 #elif defined(__aarch64__)
92 # define TRY_EMPTY_VM_SPACE 0x1000000000
93 #elif defined(__ARM_EABI__)
94 # define TRY_EMPTY_VM_SPACE 0x60000000
95 #elif defined(__mips__) && defined(__LP64__)
96 # define TRY_EMPTY_VM_SPACE 0x8000000000
97 #elif defined(__mips__)
98 # define TRY_EMPTY_VM_SPACE 0x60000000
87 #else 99 #else
88 # define TRY_EMPTY_VM_SPACE 0 100 # define TRY_EMPTY_VM_SPACE 0
89 #endif 101 #endif
90 102
91 /* Determine a location where we might be able to reliably allocate SIZE 103 /* Determine a location where we might be able to reliably allocate SIZE
202 214
203 while (size) 215 while (size)
204 { 216 {
205 ssize_t nbytes; 217 ssize_t nbytes;
206 218
207 nbytes = read (fd, base, MIN (size, SSIZE_MAX)); 219 nbytes = read (fd, base, MIN (size, (size_t)-1 >> 1));
208 if (nbytes <= 0) 220 if (nbytes <= 0)
209 return -1; 221 return -1;
210 base = (char *) base + nbytes; 222 base = (char *) base + nbytes;
211 size -= nbytes; 223 size -= nbytes;
212 } 224 }