Wilco Dijkstra <wilco.dijks...@arm.com> writes: > Increase the priority of the init_have_lse_atomics constructor so it runs > before other constructors. This improves chances that rr works when LSE > atomics are supported.
Can you add a comment above the function explaining why we chose 90 in particular? I see 100 was originally suggested in the PR. Thanks, Richard > Regress and bootstrap pass, OK for commit? > > 2022-05-24 Wilco Dijkstra <wdijk...@arm.com> > > libgcc/ > PR libgcc/105708 > * config/aarch64/lse-init.c: Increase constructor priority. > > --- > diff --git a/libgcc/config/aarch64/lse-init.c > b/libgcc/config/aarch64/lse-init.c > index > fc875b7fe80e947623e570eac130e7a14b516551..988882d91dfeed77f299aa610d72091499271490 > 100644 > --- a/libgcc/config/aarch64/lse-init.c > +++ b/libgcc/config/aarch64/lse-init.c > @@ -38,7 +38,7 @@ _Bool __aarch64_have_lse_atomics > > unsigned long int __getauxval (unsigned long int); > > -static void __attribute__((constructor)) > +static void __attribute__((constructor (90))) > init_have_lse_atomics (void) > { > unsigned long hwcap = __getauxval (AT_HWCAP);