On Feb 06 2017, Palmer Dabbelt <pal...@dabbelt.com> wrote: > +/* Because RISC-V only has word-sized atomics, it requries libatomic where > + others do not. So link libatomic by default, as needed. */ > +#undef LIB_SPEC > +#ifdef LD_AS_NEEDED_OPTION > +#define LIB_SPEC GNU_USER_TARGET_LIB_SPEC \ > + " %{pthread:" LD_AS_NEEDED_OPTION " -latomic " LD_NO_AS_NEEDED_OPTION "}" > +#else > +#define LIB_SPEC GNU_USER_TARGET_LIB_SPEC " -latomic " > +#endif
Why is -latomic added only with -pthread if --as-needed is supported, but unconditionally if not? Wouldn't it make sense to add it unconditionally in both cases? Andreas. -- Andreas Schwab, SUSE Labs, sch...@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different."