[PATCH] Don't run personality syscall at configure time; don't check it at all

Tom Tromey tromey@adacore.com
Wed May 12 19:58:56 GMT 2021


Pedro> -  AC_CHECK_DECLS([ADDR_NO_RANDOMIZE],,, [#include <sys/personality.h>])

>> ... and the corresponding define in nat/linux-personality.c.
>> 
>> (I tried just including the linux/ header but it doesn't declare
>> 'personality'.)

Pedro> Would it work to just include both?

No, they both define the same enum constants, so I think this wouldn't
work.

Pedro> Otherwise, do we really need the configure check?  Wouldn't just:

Pedro> #ifndef ADDR_NO_RANDOMIZE
Pedro> # define ADDR_NO_RANDOMIZE 0x0040000
Pedro> #endif

Pedro> work the same?

They neglected to use the self-#define trick for these constants.

Tom


More information about the Gdb-patches mailing list