From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/8336 Path: news.gmane.org!not-for-mail From: Bobby Bingham Newsgroups: gmane.linux.lib.musl.general Subject: Re: SuperH conflict of arch/sh/__set_thread_area vs thread/__set_thread_area Date: Wed, 19 Aug 2015 20:34:00 -0500 Message-ID: <20150820013400.GA14179@dora.lan> References: <5769061.FLTLqujSyv@debian64> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 X-Trace: ger.gmane.org 1440034477 26180 80.91.229.3 (20 Aug 2015 01:34:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 20 Aug 2015 01:34:37 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-8348-gllmg-musl=m.gmane.org@lists.openwall.com Thu Aug 20 03:34:22 2015 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1ZSEkF-0005cQ-86 for gllmg-musl@m.gmane.org; Thu, 20 Aug 2015 03:34:19 +0200 Original-Received: (qmail 9301 invoked by uid 550); 20 Aug 2015 01:34:16 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 9278 invoked from network); 20 Aug 2015 01:34:15 -0000 Content-Disposition: inline In-Reply-To: <5769061.FLTLqujSyv@debian64> X-Operating-System: Linux dora 3.18.16 User-Agent: Mutt/1.5.23 (2014-03-12) Xref: news.gmane.org gmane.linux.lib.musl.general:8336 Archived-At: On Thu, Aug 20, 2015 at 02:44:11AM +0200, Christian Lamparter wrote: > Hello, > > I'm trying to add a port for a SH4-like ARCH to OpenWRT, which uses the latest > musl-1.1.10 as the default libc. I'm having the following problem when building > the toolchain: > > During the final linker-step, the symbol "__set_thread_area" declared twice. > This is because the SH architecture provides a separate __set_thread_area [0], > (other archs use the standard syscall wrapper from [1]). There is an empty file src/thread/sh/__set_thread_area.s which should be overriding src/thread/__set_thread_area.c. Therefore, only the definition from arch/sh/src/__set_thread_area.c should be getting linked in. Can you tell why src/thread/__set_thread_area.c is still getting used? > > Obviously, I want this issue fixed. However I'm new to SuperH and musl, that's > why I need advise :-D. For now, I defined the src/thread/__set_thread_area as > a weak symbol. Now, that's just a crude hack, what would be better solution? > (I can make and post the patch if necessary - But sadly, I can't test it on the > hardware yet)? > > Regards, > Christian > > [0] > [1]