This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] gdb/testsuite/gdb.threads: Make sure TLS tests link against pthreads.


On 12 June 2013 00:02, Andrew Pinski <pinskia@gmail.com> wrote:
> On Fri, Jun 7, 2013 at 11:40 AM, Will Newton <will.newton@linaro.org> wrote:
>>
>> On Ubuntu the compiler passes --as-needed to the linker which means
>> no DT_NEEDED entry is added for libpthread when building the TLS
>> tests. This causes the test to fail as a libpthread is required to
>> look up TLS variables. Add some calls to pthread functions to make
>> sure libpthread is linked.
>
>
> I think this should be an debian/Ubuntu local only patch as the
> default for FSF GCC/binutils is not to pass --as-needed.

I admit the change is a little, erm, weird, but my hope was to avoid
causing pain to people who build gdb on Ubuntu. This isn't just Ubunto
or Debian developers but Ubuntu or Debian users that happen to have
downloaded a gdb tarball from gnu.org. Similar test failures in
binutils have been worked around by adding -Wl,--no-as-needed which we
could also do here, but I was concerned that this may break non-gcc
compilers.

--
Will Newton
Toolchain Working Group, Linaro


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]