Skip to content
  • Rodrigo Mesquita's avatar
    32a8103f
    configure: Use LDFLAGS when trying linkers · 32a8103f
    Rodrigo Mesquita authored and Marge Bot's avatar Marge Bot committed
    A user may configure `LDFLAGS` but not `LD`. When choosing a linker, we
    will prefer `ldd`, then `ld.gold`, then `ld.bfd` -- however, we have to
    check for a working linker. If either of these fail, we try the next in
    line.
    
    However, we were not considering the `$LDFLAGS` when checking if these
    linkers worked. So we would pick a linker that does not support the
    current $LDFLAGS and fail further down the line when we used that linker
    with those flags.
    
    Fixes #24565, where `LDFLAGS=-Wl,-z,pack-relative-relocs` is not
    supported by `ld.gold` but that was being picked still.
    32a8103f
    configure: Use LDFLAGS when trying linkers
    Rodrigo Mesquita authored and Marge Bot's avatar Marge Bot committed
    A user may configure `LDFLAGS` but not `LD`. When choosing a linker, we
    will prefer `ldd`, then `ld.gold`, then `ld.bfd` -- however, we have to
    check for a working linker. If either of these fail, we try the next in
    line.
    
    However, we were not considering the `$LDFLAGS` when checking if these
    linkers worked. So we would pick a linker that does not support the
    current $LDFLAGS and fail further down the line when we used that linker
    with those flags.
    
    Fixes #24565, where `LDFLAGS=-Wl,-z,pack-relative-relocs` is not
    supported by `ld.gold` but that was being picked still.
Loading