Commit ba4f140
authored
[OpenMP] Don't use libproc on Solaris (#142379)
`openmp` currently doesn't compile on 32-bit Solaris:
```
FAILED: projects/openmp/runtime/src/CMakeFiles/omp.dir/z_Linux_util.cpp.o
[...]
In file included from openmp/runtime/src/z_Linux_util.cpp:78:
In file included from /usr/include/libproc.h:25:
In file included from /usr/include/gelf.h:10:
/usr/include/libelf.h:22:2: error: "large files are not supported by libelf"
22 | #error "large files are not supported by libelf"
| ^
In file included from openmp/runtime/src/z_Linux_util.cpp:78:
/usr/include/libproc.h:42:2: error: "Cannot use libproc in the large file compilation environment"
42 | #error "Cannot use libproc in the large file compilation environment"
| ^
```
Looking closer, there's no point in using `Pgrab` (the only interface
from `<libproc.h>`) at all: the resulting `ps_prochandle_t *` isn't used
in the remainder of the code and the original PR #82930 gives no
indication why it is deemed necessary/useful.
While at it, this patch switches to use `/proc/self/xmap`, matching
`compiler-rt`'s `sanitizer_procmaps_solaris.cpp`, and makes some minor
formatting fixes.
Tested on `sparc-sun-solaris2.11`, `sparcv9-sun-solaris2.11`,
`i386-pc-solaris2.11`, and `amd64-pc-solaris2.11`.1 parent 370d017 commit ba4f140
File tree
2 files changed
+10
-23
lines changed- openmp/runtime
- cmake
- src
2 files changed
+10
-23
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | 152 | | |
156 | 153 | | |
157 | 154 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
79 | 78 | | |
80 | 79 | | |
81 | 80 | | |
| |||
2232 | 2231 | | |
2233 | 2232 | | |
2234 | 2233 | | |
2235 | | - | |
| 2234 | + | |
2236 | 2235 | | |
2237 | 2236 | | |
2238 | 2237 | | |
2239 | | - | |
2240 | | - | |
2241 | | - | |
| 2238 | + | |
2242 | 2239 | | |
2243 | | - | |
2244 | | - | |
2245 | | - | |
2246 | | - | |
2247 | | - | |
2248 | | - | |
2249 | | - | |
2250 | | - | |
2251 | | - | |
2252 | | - | |
2253 | | - | |
| 2240 | + | |
| 2241 | + | |
| 2242 | + | |
2254 | 2243 | | |
2255 | 2244 | | |
2256 | 2245 | | |
2257 | 2246 | | |
| 2247 | + | |
2258 | 2248 | | |
2259 | 2249 | | |
2260 | | - | |
| 2250 | + | |
2261 | 2251 | | |
2262 | 2252 | | |
2263 | 2253 | | |
2264 | 2254 | | |
2265 | 2255 | | |
2266 | 2256 | | |
2267 | | - | |
| 2257 | + | |
2268 | 2258 | | |
2269 | 2259 | | |
2270 | 2260 | | |
2271 | | - | |
| 2261 | + | |
2272 | 2262 | | |
2273 | 2263 | | |
2274 | 2264 | | |
| |||
2277 | 2267 | | |
2278 | 2268 | | |
2279 | 2269 | | |
2280 | | - | |
| 2270 | + | |
2281 | 2271 | | |
2282 | 2272 | | |
2283 | 2273 | | |
| |||
0 commit comments