public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Stafford Horne <shorne@gmail.com>
To: gcc-patches@gcc.gnu.org
Cc: openrisc@lists.librecores.org, Yann Morin <yann.morin@orange.com>,
	buildroot@buildroot.org
Subject: Re: [PATCH] or1k: Only define TARGET_HAVE_TLS when HAVE_AS_TLS
Date: Sat, 1 Oct 2022 11:35:55 +0000	[thread overview]
Message-ID: <YzgmG9Ihqt6xC7CA@oscomms1> (raw)
In-Reply-To: <20220929145740.4846-1-shorne@gmail.com>

On Thu, Sep 29, 2022 at 03:57:40PM +0100, Stafford Horne wrote:
> This was found when testing buildroot with linuxthreads enabled.  In
> this case, the build passes --disable-tls to the toolchain during
> configuration.  After building the OpenRISC toolchain it was still
> generating TLS code sequences and causing linker failures such as:
> 
>  ..../or1k-buildroot-linux-uclibc-gcc -o gpsd-3.24/gpsctl .... -lusb-1.0 -lm -lrt -lnsl
>  ..../ld: ..../sysroot/usr/lib/libusb-1.0.so: undefined reference to `__tls_get_addr'
> 
> This patch fixes this by disabling tls for the OpenRISC target when requested
> via --disable-tls.
> 
> Tested-by: Yann E. MORIN <yann.morin@orange.com>
> 
> gcc/ChangeLog:
> 
> 	* config/or1k/or1k.cc (TARGET_HAVE_TLS): Only define if
> 	HAVE_AS_TLS is defined.

I have pushed this upstream now.  Adding buildroot patches should be easy to do
now.

-Stafford

  reply	other threads:[~2022-10-01 11:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-29 14:57 Stafford Horne
2022-10-01 11:35 ` Stafford Horne [this message]
2022-10-01 17:53   ` [Buildroot] " Yann E. MORIN

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YzgmG9Ihqt6xC7CA@oscomms1 \
    --to=shorne@gmail.com \
    --cc=buildroot@buildroot.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=openrisc@lists.librecores.org \
    --cc=yann.morin@orange.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).