From owner-svn-src-all@FreeBSD.ORG Tue Feb 12 15:32:37 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 2B0389A2; Tue, 12 Feb 2013 15:32:37 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from argol.doit.wisc.edu (argol.doit.wisc.edu [144.92.197.212]) by mx1.freebsd.org (Postfix) with ESMTP id E8003B6D; Tue, 12 Feb 2013 15:32:36 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII Received: from avs-daemon.smtpauth3.wiscmail.wisc.edu by smtpauth3.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 7u2-7.05 32bit (built Jul 30 2009)) id <0MI400C0014TOE00@smtpauth3.wiscmail.wisc.edu>; Tue, 12 Feb 2013 08:32:29 -0600 (CST) X-Spam-PmxInfo: Server=avs-3, Version=5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2013.2.12.142415, SenderIP=0.0.0.0 X-Spam-Report: AuthenticatedSender=yes, SenderIP=0.0.0.0 Received: from wanderer.tachypleus.net (adsl-76-208-68-53.dsl.mdsnwi.sbcglobal.net [76.208.68.53]) by smtpauth3.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 7u2-7.05 32bit (built Jul 30 2009)) with ESMTPSA id <0MI400B7K31ZRB10@smtpauth3.wiscmail.wisc.edu>; Tue, 12 Feb 2013 08:32:27 -0600 (CST) X-Wisc-Sender: whitehorn@wisc.edu Message-id: <511A5277.8060507@freebsd.org> Date: Tue, 12 Feb 2013 08:32:23 -0600 From: Nathan Whitehorn User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130112 Thunderbird/17.0.2 To: Andrew Turner Subject: Re: svn commit: r246706 - head/lib/libc/arm/aeabi References: <201302120604.r1C64pEW008741@svn.freebsd.org> In-reply-to: <201302120604.r1C64pEW008741@svn.freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Feb 2013 15:32:37 -0000 A related question to these commits: are EABI binaries incompatible with systems built for OABI? And vice versa? If so, should we mint a new MACHINE_ARCH for ARM EABI (or OABI, I guess)? The usual implication of sharing a uname -p string is that systems can run each other's binaries -- that being broken is a strong argument for a new value. -Nathan On 02/12/13 00:04, Andrew Turner wrote: > Author: andrew > Date: Tue Feb 12 06:04:51 2013 > New Revision: 246706 > URL: http://svnweb.freebsd.org/changeset/base/246706 > > Log: > When clang builds libc it may insert calls to __aeabi_* functions. Normally > this is not a problem as they are resolved by libgcc. The exception is for > the __aeabi_mem* functions. These call back into libc to the appropriate > function. This causes issues for static binaries as we only link against > libc once so there is no way for it to call into libgcc and back. > > The fix for this is to include these symbols in libc but keep them hidden > so binaries use the libgcc version. > > Modified: > head/lib/libc/arm/aeabi/Makefile.inc > > Modified: head/lib/libc/arm/aeabi/Makefile.inc > ============================================================================== > --- head/lib/libc/arm/aeabi/Makefile.inc Tue Feb 12 05:56:00 2013 (r246705) > +++ head/lib/libc/arm/aeabi/Makefile.inc Tue Feb 12 06:04:51 2013 (r246706) > @@ -7,5 +7,24 @@ SRCS+= aeabi_atexit.c \ > aeabi_float.c \ > aeabi_unwind_cpp.c > > +# Add the aeabi_mem* functions. While they live in compiler-rt they call into > +# libc. This causes issues when other parts of libc call these functions. > +# We work around this by including these functions in libc but mark them as > +# hidden so users of libc will not pick up these versions. > +.PATH: ${.CURDIR}/../../contrib/compiler-rt/lib/arm > + > +SRCS+= aeabi_memcmp.S \ > + aeabi_memcpy.S \ > + aeabi_memmove.S \ > + aeabi_memset.S > + > +# Mark the functions as hidden so they are not available outside of libc. > +CFLAGS.aeabi_memcmp.S= -DVISIBILITY_HIDDEN > +CFLAGS.aeabi_memcpy.S= -DVISIBILITY_HIDDEN > +CFLAGS.aeabi_memmove.S= -DVISIBILITY_HIDDEN > +CFLAGS.aeabi_memset.S= -DVISIBILITY_HIDDEN > +CFLAGS+= ${CFLAGS.${.IMPSRC:T}} > + > + > SYM_MAPS+=${.CURDIR}/arm/aeabi/Symbol.map > >