Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 May 2018 13:07:13 +0300
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Conrad Meyer <cem@freebsd.org>
Cc:        Ed Maste <emaste@freebsd.org>, src-committers <src-committers@freebsd.org>, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r333461 - head/sys/amd64/amd64
Message-ID:  <20180511100713.GG6887@kib.kiev.ua>
In-Reply-To: <CAG6CVpWpVm%2BQhOS-pEBmoo=11hkYacysgcHAkvcVneTF1JWvrA@mail.gmail.com>
References:  <201805101501.w4AF1iI0039082@repo.freebsd.org> <CAG6CVpWpVm%2BQhOS-pEBmoo=11hkYacysgcHAkvcVneTF1JWvrA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, May 10, 2018 at 07:57:03PM -0700, Conrad Meyer wrote:
> On Thu, May 10, 2018 at 8:01 AM, Konstantin Belousov <kib@freebsd.org> wrote:
> > Author: kib
> > Date: Thu May 10 15:01:43 2018
> > New Revision: 333461
> > URL: https://svnweb.freebsd.org/changeset/base/333461
> >
> > Log:
> >   Make fpusave() and fpurestore() on amd64 ifuncs.
> >
> >   From now on, linking amd64 kernel requires either lld or newer ld.bfd.
> 
> Hi,
> 
> This commit seems to break amd64-gcc cross toolchain build (note, this
> is a cc error, not ld):
> 
> In file included from /usr/src/sys/amd64/amd64/fpu.c:64:0:
> /usr/src/sys/amd64/amd64/fpu.c:195:22: error: ifunc is not supported
> on this target
>  DEFINE_IFUNC(, void, fpusave, (void *), static)
>                       ^
> ./x86/ifunc.h:55:19: note: in definition of macro 'DEFINE_IFUNC'
>      qual ret_type name args __attribute__((ifunc(#name "_resolver"))); \
>                    ^~~~
> /usr/src/sys/amd64/amd64/fpu.c:202:22: error: ifunc is not supported
> on this target
>  DEFINE_IFUNC(, void, fpurestore, (void *), static)
>                       ^
> ./x86/ifunc.h:55:19: note: in definition of macro 'DEFINE_IFUNC'
>      qual ret_type name args __attribute__((ifunc(#name "_resolver"))); \
>                    ^~~~
> --- fpu.o ---
> *** [fpu.o] Error code 1

On FreeBSD, gcc configuration requires explicit --enable-gnu-indirect-function
option.  I see it in e.g. lang/gcc7 port Makefile.

On the other hand, I do not understand how devel/amd64-xtoolchain-gcc
and devel/powerpc64-xtoolchain-gcc are build, so cannot see whether the
switch is added to the configure invocation.  But I suspect that it is
not.

In other words, most likely the problem is due to the port itself.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20180511100713.GG6887>