[PATCH] Fix build on rhES5

Simon Marchi simark@simark.ca
Mon Nov 8 21:57:08 GMT 2021


On 2021-11-08 4:28 p.m., Tom Tromey via Gdb-patches wrote:
> The rhES5 build failed due to an upstream import a while back.  The
> bug here is that, while the 'personality' function exists,
> ADDR_NO_RANDOMIZE is only defined in <linux/personality.h>, not
> <sys/personality.h>.
>
> However, <linux/personality.h> does not declare the 'personality'
> function, and <sys/personality.h> and <linux/personality.h> cannot
> both be included.
>
> This patch restores one of the removed configure checks and updates
> the code to check it.
>
> We had this as a local patch at AdaCore, because it seemed like there
> was no interest upstream.  However, now it turns out that this fixes
> PR build/28555, so I'm sending it now.

LGTM.

Can you just add somewhere (in linux-personality.c or common.m4) a
mention that to our knowledge, this it for RHEL5 and uclibc-ng < 1.0.39?
This way when someone sees this in 10 years or so, they'll probably be
know it's ok to remove it.

Simon


More information about the Gdb-patches mailing list