Commit b57e557
Propagate CMAKE_SYSROOT/gcc-toolchain into hwloc's autotools CC/CXX (#1597)
PR #1585 forwards CC=${CMAKE_C_COMPILER}/CXX=${CMAKE_CXX_COMPILER}
into hwloc's ExternalProject_Add autogen.sh/configure invocation, but
those are bare compiler paths with no notion of CMAKE_SYSROOT or
CMAKE_C_COMPILER_EXTERNAL_TOOLCHAIN. When UMF_LINK_HWLOC_STATICALLY is
combined with a sysroot- or toolchain-file-pinned compiler, hwloc still
ends up built against the host's headers/libs instead of the sysroot's,
which can produce ABI mismatches (e.g. undefined glibc symbols) at
final link time.
CC/CXX are passed to autotools as space-separated "compiler [flags...]"
strings (the same convention as CC="ccache gcc"), so --sysroot and
--gcc-toolchain can be appended directly without needing wrapper
scripts or touching CMAKE_C_COMPILER/CMAKE_CXX_COMPILER themselves.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>1 parent 2c4fd67 commit b57e557
1 file changed
Lines changed: 23 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
329 | 329 | | |
330 | 330 | | |
331 | 331 | | |
332 | | - | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
333 | 351 | | |
334 | 352 | | |
335 | 353 | | |
| |||
338 | 356 | | |
339 | 357 | | |
340 | 358 | | |
341 | | - | |
342 | | - | |
| 359 | + | |
| 360 | + | |
343 | 361 | | |
344 | | - | |
345 | | - | |
| 362 | + | |
| 363 | + | |
346 | 364 | | |
347 | 365 | | |
348 | 366 | | |
| |||
0 commit comments