Re: [PATCH] hardened: use LD_PIE_SPEC only if defined

2023-12-14 Thread Marek Polacek
On Thu, Dec 14, 2023 at 04:50:49PM -0300, Alexandre Oliva wrote: > > sol2.h may define LINK_PIE_SPEC and leave LD_PIE_SPEC undefined, but > gcc.cc will only provide a LD_PIE_SPEC definition if LINK_PIE_SPEC is > not defined, and then it uses LD_PIE_SPEC guarded by #ifdef HAVE_LD_PIE > only. Add L

[PATCH] hardened: use LD_PIE_SPEC only if defined

2023-12-14 Thread Alexandre Oliva
sol2.h may define LINK_PIE_SPEC and leave LD_PIE_SPEC undefined, but gcc.cc will only provide a LD_PIE_SPEC definition if LINK_PIE_SPEC is not defined, and then it uses LD_PIE_SPEC guarded by #ifdef HAVE_LD_PIE only. Add LD_PIE_SPEC to the guard. Regstrapped on x86_64-linux-gnu; also testing on