svn commit: r339898 - head/lib/libc/amd64/sys

Brooks Davis brooks at freebsd.org
Thu Nov 1 16:04:08 UTC 2018


On Thu, Nov 01, 2018 at 08:57:24AM -0400, Charlie Li wrote:
> On 29/10/2018 20:11, Konstantin Belousov wrote:
> > Author: kib
> > Date: Tue Oct 30 00:11:30 2018
> > New Revision: 339898
> > URL: https://svnweb.freebsd.org/changeset/base/339898
> > 
> > Log:
> >   Convert amd64_get/set_fs/gsbase to ifunc.
> >   
> >   Note that this is the first use of ifuncs in our userspace.
> >   
> >   Sponsored by:	The FreeBSD Foundation
> >   MFC after:	1 month
> > 
> > Deleted:
> >   head/lib/libc/amd64/sys/amd64_detect_rdfsgsbase.c
> >   head/lib/libc/amd64/sys/amd64_detect_rdfsgsbase.h
> > Modified:
> >   head/lib/libc/amd64/sys/Makefile.inc
> >   head/lib/libc/amd64/sys/amd64_get_fsbase.c
> >   head/lib/libc/amd64/sys/amd64_get_gsbase.c
> >   head/lib/libc/amd64/sys/amd64_set_fsbase.c
> >   head/lib/libc/amd64/sys/amd64_set_gsbase.c
> > 
> Using LLVM 7 to build world, fails:
> 
> --- amd64_get_fsbase.o ---
> /usr/src/lib/libc/amd64/sys/amd64_get_fsbase.c:60:1: error: ifunc
> resolver function must have no parameters
> --- amd64_get_gsbase.o ---
> /usr/src/lib/libc/amd64/sys/amd64_get_gsbase.c:60:1: error: ifunc
> resolver function must have no parameters
> DEFINE_UIFUNC(, int, amd64_get_gsbase, (void **), static)
> ^
> /usr/local/obj/usr/src/amd64.amd64/tmp/usr/include/x86/ifunc.h:43:44:
> note: expanded from macro 'DEFINE_UIFUNC'
> --- amd64_get_fsbase.o ---
> DEFINE_UIFUNC(, int, amd64_get_fsbase, (void **), static)
> ^
> /usr/local/obj/usr/src/amd64.amd64/tmp/usr/include/x86/ifunc.h:43:44:
> note: expanded from macro 'DEFINE_UIFUNC'
> --- amd64_get_gsbase.o ---
>     qual ret_type name args __attribute__((ifunc(#name "_resolver")));  \
>                                            ^
> --- amd64_get_fsbase.o ---
>     qual ret_type name args __attribute__((ifunc(#name "_resolver")));  \
>                                            ^
> 1 error generated.
> --- amd64_get_gsbase.o ---
> 1 error generated.
> *** [amd64_get_gsbase.o] Error code 1
> 
> make[4]: stopped in /usr/src/lib/libc
> 
> CI appears green after this commit, so I'm inclined to pin this on yet
> another instance of LLVM 7 being stricter than LLVM 6. Backing out this
> revision allows the build to continue (successfully).

Is this failure with devel/llvm70?  It's currently missing the patch
required to make this work.  https://reviews.freebsd.org/D17709 contains
this patch among others.  I'll see about getting it applied.

-- Brooks
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 455 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/svn-src-head/attachments/20181101/37c3e6c4/attachment.sig>


More information about the svn-src-head mailing list