Can't build kernel anymore: amd64 kernel requires linker ifunc support

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

Can't build kernel anymore: amd64 kernel requires linker ifunc support

Emeric POUPON-2
Hello,

Maybe I missed something, but I recently updated /usr/src (HEAD) and I can't build the kernel anymore, I get this:

# make -j4 buildkernel
--- buildkernel ---
make[1]: "/usr/src/Makefile.inc1" line 166: SYSTEM_COMPILER: Determined that CC=cc matches the source tree.  Not bootstrapping a cross-compiler.
--- buildkernel ---

--------------------------------------------------------------
>>> Kernel build for GENERIC started on Wed May 16 09:35:03 CEST 2018
--------------------------------------------------------------
===> GENERIC
mkdir -p /usr/obj/usr/src/amd64.amd64/sys
--------------------------------------------------------------
>>> stage 1: configuring the kernel
--------------------------------------------------------------
cd /usr/src/sys/amd64/conf;  PATH=/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/sbin:/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/bin:/usr/obj/usr/src/amd64.amd64/tmp/legacy/bin:/usr/obj/usr/src/amd64.amd64/tmp/usr/sbin:/usr/obj/usr/src/amd64.amd64/tmp/usr/bin:/sbin:/bin:/usr/sbin:/usr/bin  config  -d /usr/obj/usr/src/amd64.amd64/sys/GENERIC  -I '/usr/src/sys/amd64/conf' '/usr/src/sys/amd64/conf/GENERIC'
Kernel build directory is /usr/obj/usr/src/amd64.amd64/sys/GENERIC
Don't forget to do ``make cleandepend && make depend''
--------------------------------------------------------------
>>> stage 2.1: cleaning up the object tree
--------------------------------------------------------------
cd /usr/obj/usr/src/amd64.amd64/sys/GENERIC; COMPILER_VERSION=60000 COMPILER_FEATURES=" c++11 retpoline" COMPILER_TYPE=clang COMPILER_FREEBSD_VERSION=1200014 MACHINE_ARCH=amd64 MACHINE=amd64 CPUTYPE= CC="cc -target x86_64-unknown-freebsd12.0 --sysroot=/usr/obj/usr/src/amd64.amd64/tmp -B/usr/obj/usr/src/amd64.amd64/tmp/usr/bin" CXX="c++  -target x86_64-unknown-freebsd12.0 --sysroot=/usr/obj/usr/src/amd64.amd64/tmp -B/usr/obj/usr/src/amd64.amd64/tmp/usr/bin" CPP="cpp -target x86_64-unknown-freebsd12.0 --sysroot=/usr/obj/usr/src/amd64.amd64/tmp -B/usr/obj/usr/src/amd64.amd64/tmp/usr/bin" AS="as" AR="ar" LD="ld" LLVM_LINK="" NM=nm OBJCOPY="objcopy" RANLIB=ranlib STRINGS= SIZE="size" INSTALL="sh /usr/src/tools/install.sh" PATH=/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/sbin:/usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/bin:/usr/obj/usr/src/amd64.amd64/tmp/legacy/bin:/usr/obj/usr/src/amd64.amd64/tmp/usr/sbin:/usr/obj/usr/src/amd64.amd64/tmp/usr/bin:/sbin:/bin:/usr/sbin:/usr/bin make  -j 4 -
 J 15,16 -m /usr/src/share/mk  KERNEL=kernel cleandir
make[2]: "/usr/src/sys/conf/kern.pre.mk" line 125: amd64 kernel requires linker ifunc support
*** [buildkernel] Error code 1

make[1]: stopped in /usr/src
1 error



How can I proceed?

Regards,
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Can't build kernel anymore: amd64 kernel requires linker ifunc support

Oliver Pinter-4
On Wednesday, May 16, 2018, Emeric POUPON <[hidden email]>
wrote:

> Hello,
>
> Maybe I missed something, but I recently updated /usr/src (HEAD) and I
> can't build the kernel anymore, I get this:
>
> # make -j4 buildkernel
> --- buildkernel ---
> make[1]: "/usr/src/Makefile.inc1" line 166: SYSTEM_COMPILER: Determined
> that CC=cc matches the source tree.  Not bootstrapping a cross-compiler.
> --- buildkernel ---
>
> --------------------------------------------------------------
> >>> Kernel build for GENERIC started on Wed May 16 09:35:03 CEST 2018
> --------------------------------------------------------------
> ===> GENERIC
> mkdir -p /usr/obj/usr/src/amd64.amd64/sys
> --------------------------------------------------------------
> >>> stage 1: configuring the kernel
> --------------------------------------------------------------
> cd /usr/src/sys/amd64/conf;  PATH=/usr/obj/usr/src/amd64.
> amd64/tmp/legacy/usr/sbin:/usr/obj/usr/src/amd64.amd64/
> tmp/legacy/usr/bin:/usr/obj/usr/src/amd64.amd64/tmp/
> legacy/bin:/usr/obj/usr/src/amd64.amd64/tmp/usr/sbin:/usr/
> obj/usr/src/amd64.amd64/tmp/usr/bin:/sbin:/bin:/usr/sbin:/usr/bin
> config  -d /usr/obj/usr/src/amd64.amd64/sys/GENERIC  -I
> '/usr/src/sys/amd64/conf' '/usr/src/sys/amd64/conf/GENERIC'
> Kernel build directory is /usr/obj/usr/src/amd64.amd64/sys/GENERIC
> Don't forget to do ``make cleandepend && make depend''
> --------------------------------------------------------------
> >>> stage 2.1: cleaning up the object tree
> --------------------------------------------------------------
> cd /usr/obj/usr/src/amd64.amd64/sys/GENERIC; COMPILER_VERSION=60000
> COMPILER_FEATURES=" c++11 retpoline" COMPILER_TYPE=clang
> COMPILER_FREEBSD_VERSION=1200014 MACHINE_ARCH=amd64 MACHINE=amd64
> CPUTYPE= CC="cc -target x86_64-unknown-freebsd12.0
> --sysroot=/usr/obj/usr/src/amd64.amd64/tmp -B/usr/obj/usr/src/amd64.amd64/tmp/usr/bin"
> CXX="c++  -target x86_64-unknown-freebsd12.0 --sysroot=/usr/obj/usr/src/amd64.amd64/tmp
> -B/usr/obj/usr/src/amd64.amd64/tmp/usr/bin" CPP="cpp -target
> x86_64-unknown-freebsd12.0 --sysroot=/usr/obj/usr/src/amd64.amd64/tmp
> -B/usr/obj/usr/src/amd64.amd64/tmp/usr/bin" AS="as" AR="ar" LD="ld"
> LLVM_LINK="" NM=nm OBJCOPY="objcopy" RANLIB=ranlib STRINGS= SIZE="size"
> INSTALL="sh /usr/src/tools/install.sh" PATH=/usr/obj/usr/src/amd64.
> amd64/tmp/legacy/usr/sbin:/usr/obj/usr/src/amd64.amd64/
> tmp/legacy/usr/bin:/usr/obj/usr/src/amd64.amd64/tmp/
> legacy/bin:/usr/obj/usr/src/amd64.amd64/tmp/usr/sbin:/usr/
> obj/usr/src/amd64.amd64/tmp/usr/bin:/sbin:/bin:/usr/sbin:/usr/bin make
> -j 4 -
>  J 15,16 -m /usr/src/share/mk  KERNEL=kernel cleandir
> make[2]: "/usr/src/sys/conf/kern.pre.mk" line 125: amd64 kernel requires
> linker ifunc support
> *** [buildkernel] Error code 1
>
> make[1]: stopped in /usr/src
> 1 error
>
>
>
> How can I proceed?


Please consult the ${srctop}/UPDATING file or search back on freebsd
current mail list.

Hint: buildworld before kernel


>
> Regards,
> _______________________________________________
> [hidden email] mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-arch
> To unsubscribe, send any mail to "[hidden email]"
>
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Can't build kernel anymore: amd64 kernel requires linker ifunc support

Emeric POUPON-2

>> make[2]: "/usr/src/sys/conf/kern.pre.mk" line 125: amd64 kernel requires
>> linker ifunc support
>> *** [buildkernel] Error code 1
>>
>> make[1]: stopped in /usr/src
>> 1 error
>>
>>
>>
>> How can I proceed?
>
>
> Please consult the ${srctop}/UPDATING file or search back on freebsd
> current mail list.
>
> Hint: buildworld before kernel
>

Thanks for your help.

Actually, I already did all the steps described here: https://www.freebsd.org/doc/handbook/makeworld.html with success.
After step 10, I now get this error.
I tried to put WITHOUT_LLD_BOOTSTRAP=yes in /etc/src.conf + rebuild everything with no luck.

Regards,


_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Can't build kernel anymore: amd64 kernel requires linker ifunc support

Oliver Pinter-4
On Wednesday, May 16, 2018, Emeric POUPON <[hidden email]>
wrote:

>
> >> make[2]: "/usr/src/sys/conf/kern.pre.mk" line 125: amd64 kernel
> requires
> >> linker ifunc support
> >> *** [buildkernel] Error code 1
> >>
> >> make[1]: stopped in /usr/src
> >> 1 error
> >>
> >>
> >>
> >> How can I proceed?
> >
> >
> > Please consult the ${srctop}/UPDATING file or search back on freebsd
> > current mail list.
> >
> > Hint: buildworld before kernel
> >
>
> Thanks for your help.
>
> Actually, I already did all the steps described here:
> https://www.freebsd.org/doc/handbook/makeworld.html with success.
> After step 10, I now get this error.
> I tried to put WITHOUT_LLD_BOOTSTRAP=yes in /etc/src.conf + rebuild
> everything with no luck.
>
>
Please remove this line from your src.conf, lld is required for building
kernel since the ifunc support.



> Regards,
>
>
>
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Can't build kernel anymore: amd64 kernel requires linker ifunc support

Emeric POUPON-2

>> Thanks for your help.
>>
>> Actually, I already did all the steps described here:
>> https://www.freebsd.org/doc/handbook/makeworld.html with success.
>> After step 10, I now get this error.
>> I tried to put WITHOUT_LLD_BOOTSTRAP=yes in /etc/src.conf + rebuild
>> everything with no luck.
>>
>>
> Please remove this line from your src.conf, lld is required for building
> kernel since the ifunc support.
>

I already did all the steps of the handbook without this line, and I finally had the issue I described.
What I told is that adding this line + make buildworld does not solve the kernel building issue.
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Can't build kernel anymore: amd64 kernel requires linker ifunc support

Hans Petter Selasky-6
On 05/16/18 11:42, Emeric POUPON wrote:

>
>>> Thanks for your help.
>>>
>>> Actually, I already did all the steps described here:
>>> https://www.freebsd.org/doc/handbook/makeworld.html with success.
>>> After step 10, I now get this error.
>>> I tried to put WITHOUT_LLD_BOOTSTRAP=yes in /etc/src.conf + rebuild
>>> everything with no luck.
>>>
>>>
>> Please remove this line from your src.conf, lld is required for building
>> kernel since the ifunc support.
>>
>
> I already did all the steps of the handbook without this line, and I finally had the issue I described.
> What I told is that adding this line + make buildworld does not solve the kernel building issue.

Try adding:

-m $PWD/share/mk

After make.

Not sure if it helps.

--HPS

_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Can't build kernel anymore: amd64 kernel requires linker ifunc support

Warner Losh
On Wed, May 16, 2018 at 3:49 AM, Hans Petter Selasky <[hidden email]>
wrote:

> On 05/16/18 11:42, Emeric POUPON wrote:
>
>>
>> Thanks for your help.
>>>>
>>>> Actually, I already did all the steps described here:
>>>> https://www.freebsd.org/doc/handbook/makeworld.html with success.
>>>> After step 10, I now get this error.
>>>> I tried to put WITHOUT_LLD_BOOTSTRAP=yes in /etc/src.conf + rebuild
>>>> everything with no luck.
>>>>
>>>>
>>>> Please remove this line from your src.conf, lld is required for building
>>> kernel since the ifunc support.
>>>
>>>
>> I already did all the steps of the handbook without this line, and I
>> finally had the issue I described.
>> What I told is that adding this line + make buildworld does not solve the
>> kernel building issue.
>>
>
> Try adding:
>
> -m $PWD/share/mk
>
> After make.
>
> Not sure if it helps.


LD=ld.lld make

is the magic here. The kernel needs a new linker to properly link in the
ifunc, and that's not our ancient ld. lld does it, as does the latter-day
binutils.

Warner
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Can't build kernel anymore: amd64 kernel requires linker ifunc support

Rodney W. Grimes-4
> On Wed, May 16, 2018 at 3:49 AM, Hans Petter Selasky <[hidden email]>
> wrote:
>
> > On 05/16/18 11:42, Emeric POUPON wrote:
> >
> >>
> >> Thanks for your help.
> >>>>
> >>>> Actually, I already did all the steps described here:
> >>>> https://www.freebsd.org/doc/handbook/makeworld.html with success.
> >>>> After step 10, I now get this error.
> >>>> I tried to put WITHOUT_LLD_BOOTSTRAP=yes in /etc/src.conf + rebuild
> >>>> everything with no luck.
> >>>>
> >>>>
> >>>> Please remove this line from your src.conf, lld is required for building
> >>> kernel since the ifunc support.
> >>>
> >>>
> >> I already did all the steps of the handbook without this line, and I
> >> finally had the issue I described.
> >> What I told is that adding this line + make buildworld does not solve the
> >> kernel building issue.
> >>
> >
> > Try adding:
> >
> > -m $PWD/share/mk
> >
> > After make.
> >
> > Not sure if it helps.
>
>
> LD=ld.lld make
>
> is the magic here. The kernel needs a new linker to properly link in the
> ifunc, and that's not our ancient ld. lld does it, as does the latter-day
> binutils.

Since this now seems to be a mandatory thing to get a kernel built
can it please be set in the Makefile that is needing it?



--
Rod Grimes                                                 [hidden email]
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Can't build kernel anymore: amd64 kernel requires linker ifunc support

Warner Losh
On Wed, May 16, 2018 at 7:35 AM, Rodney W. Grimes <
[hidden email]> wrote:

> > On Wed, May 16, 2018 at 3:49 AM, Hans Petter Selasky <[hidden email]>
> > wrote:
> >
> > > On 05/16/18 11:42, Emeric POUPON wrote:
> > >
> > >>
> > >> Thanks for your help.
> > >>>>
> > >>>> Actually, I already did all the steps described here:
> > >>>> https://www.freebsd.org/doc/handbook/makeworld.html with success.
> > >>>> After step 10, I now get this error.
> > >>>> I tried to put WITHOUT_LLD_BOOTSTRAP=yes in /etc/src.conf + rebuild
> > >>>> everything with no luck.
> > >>>>
> > >>>>
> > >>>> Please remove this line from your src.conf, lld is required for
> building
> > >>> kernel since the ifunc support.
> > >>>
> > >>>
> > >> I already did all the steps of the handbook without this line, and I
> > >> finally had the issue I described.
> > >> What I told is that adding this line + make buildworld does not solve
> the
> > >> kernel building issue.
> > >>
> > >
> > > Try adding:
> > >
> > > -m $PWD/share/mk
> > >
> > > After make.
> > >
> > > Not sure if it helps.
> >
> >
> > LD=ld.lld make
> >
> > is the magic here. The kernel needs a new linker to properly link in the
> > ifunc, and that's not our ancient ld. lld does it, as does the latter-day
> > binutils.
>
> Since this now seems to be a mandatory thing to get a kernel built
> can it please be set in the Makefile that is needing it?
>

No. It's a transient requirement that will be gone shortly when Ed does the
next step of lld integration.

Wanrer
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Can't build kernel anymore: amd64 kernel requires linker ifunc support

Ed Maste-2
In reply to this post by Rodney W. Grimes-4
On 16 May 2018 at 09:35, Rodney W. Grimes
<[hidden email]> wrote:
>>
>> LD=ld.lld make
>>
>> is the magic here. The kernel needs a new linker to properly link in the
>> ifunc, and that's not our ancient ld. lld does it, as does the latter-day
>> binutils.
>
> Since this now seems to be a mandatory thing to get a kernel built
> can it please be set in the Makefile that is needing it?

It's already handled by the Makefile that needs it when using the
normal build process - i.e., "make buildworld buildkernel" (or
toolchain or kernel-toolchain followed by buildkernel).

The failure arises when building a kernel the "old" way, using config
and then and make in the kernel directory. This inherently uses the
host's linker (/usr/bin/ld), which is too old to link the kernel. We
can't just add LD=ld.lld to the kernel's Makefile(s), because it would
break external toolchain and other cases where users use a specific
linker. I hope to introduce a KERNEL_LD Make variable that controls
the linker used for the kernel link, but it's more involved than a one
or two line change for the same reason that we can't just set
LD=ld.lld.

ld.lld will start being installed as /usr/bin/ld once these two issues
are resolved:

pr227968 [exp-run] Update lang/ghc to 8.4.2, devel/stack to 1.7.1, and
all the */hs-* ports
pr214864 [exp-run] test build with lld as /usr/bin/ld

The exp-run for the first is complete and I believe we are now just
waiting on the change to be committed. As soon as that happens I will
ask for another exp-run for the second PR, and will commit the change
to install lld by default as soon as it completes (assuming
successfully).
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Can't build kernel anymore: amd64 kernel requires linker ifunc support

Rodney W. Grimes-4
> On 16 May 2018 at 09:35, Rodney W. Grimes
> <[hidden email]> wrote:
> >>
> >> LD=ld.lld make
> >>
> >> is the magic here. The kernel needs a new linker to properly link in the
> >> ifunc, and that's not our ancient ld. lld does it, as does the latter-day
> >> binutils.
> >
> > Since this now seems to be a mandatory thing to get a kernel built
> > can it please be set in the Makefile that is needing it?
>
> It's already handled by the Makefile that needs it when using the
> normal build process - i.e., "make buildworld buildkernel" (or
> toolchain or kernel-toolchain followed by buildkernel).
>
> The failure arises when building a kernel the "old" way, using config
> and then and make in the kernel directory. This inherently uses the
> host's linker (/usr/bin/ld), which is too old to link the kernel. We
> can't just add LD=ld.lld to the kernel's Makefile(s), because it would
> break external toolchain and other cases where users use a specific
> linker. I hope to introduce a KERNEL_LD Make variable that controls
> the linker used for the kernel link, but it's more involved than a one
> or two line change for the same reason that we can't just set
> LD=ld.lld.
>
> ld.lld will start being installed as /usr/bin/ld once these two issues
> are resolved:
...

In the meantime what about reverting the ifunc usage until this
can be done?

>
> pr227968 [exp-run] Update lang/ghc to 8.4.2, devel/stack to 1.7.1, and
> all the */hs-* ports
> pr214864 [exp-run] test build with lld as /usr/bin/ld
>
> The exp-run for the first is complete and I believe we are now just
> waiting on the change to be committed. As soon as that happens I will
> ask for another exp-run for the second PR, and will commit the change
> to install lld by default as soon as it completes (assuming
> successfully).
> _______________________________________________
> [hidden email] mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-arch
> To unsubscribe, send any mail to "[hidden email]"
>

--
Rod Grimes                                                 [hidden email]
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Can't build kernel anymore: amd64 kernel requires linker ifunc support

Oliver Pinter-4
On 5/16/18, Rodney W. Grimes <[hidden email]> wrote:

>> On 16 May 2018 at 09:35, Rodney W. Grimes
>> <[hidden email]> wrote:
>> >>
>> >> LD=ld.lld make
>> >>
>> >> is the magic here. The kernel needs a new linker to properly link in
>> >> the
>> >> ifunc, and that's not our ancient ld. lld does it, as does the
>> >> latter-day
>> >> binutils.
>> >
>> > Since this now seems to be a mandatory thing to get a kernel built
>> > can it please be set in the Makefile that is needing it?
>>
>> It's already handled by the Makefile that needs it when using the
>> normal build process - i.e., "make buildworld buildkernel" (or
>> toolchain or kernel-toolchain followed by buildkernel).
>>
>> The failure arises when building a kernel the "old" way, using config
>> and then and make in the kernel directory. This inherently uses the
>> host's linker (/usr/bin/ld), which is too old to link the kernel. We
>> can't just add LD=ld.lld to the kernel's Makefile(s), because it would
>> break external toolchain and other cases where users use a specific
>> linker. I hope to introduce a KERNEL_LD Make variable that controls
>> the linker used for the kernel link, but it's more involved than a one
>> or two line change for the same reason that we can't just set
>> LD=ld.lld.
>>
>> ld.lld will start being installed as /usr/bin/ld once these two issues
>> are resolved:
> ...
>
> In the meantime what about reverting the ifunc usage until this
> can be done?

Nope. If somebody take trouble over compiling their kernel manually,
then at least
read the documentation, how to compile their system in the new way.
We talking about 12-CURRENT and not about 1X-STABLE branches....

>
>>
>> pr227968 [exp-run] Update lang/ghc to 8.4.2, devel/stack to 1.7.1, and
>> all the */hs-* ports
>> pr214864 [exp-run] test build with lld as /usr/bin/ld
>>
>> The exp-run for the first is complete and I believe we are now just
>> waiting on the change to be committed. As soon as that happens I will
>> ask for another exp-run for the second PR, and will commit the change
>> to install lld by default as soon as it completes (assuming
>> successfully).
>> _______________________________________________
>> [hidden email] mailing list
>> https://lists.freebsd.org/mailman/listinfo/freebsd-arch
>> To unsubscribe, send any mail to "[hidden email]"
>>
>
> --
> Rod Grimes
> [hidden email]
>
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Can't build kernel anymore: amd64 kernel requires linker ifunc support

Warner Losh
On Wed, May 16, 2018 at 1:34 PM, Oliver Pinter <
[hidden email]> wrote:

> On 5/16/18, Rodney W. Grimes <[hidden email]> wrote:
> >> On 16 May 2018 at 09:35, Rodney W. Grimes
> >> <[hidden email]> wrote:
> >> >>
> >> >> LD=ld.lld make
> >> >>
> >> >> is the magic here. The kernel needs a new linker to properly link in
> >> >> the
> >> >> ifunc, and that's not our ancient ld. lld does it, as does the
> >> >> latter-day
> >> >> binutils.
> >> >
> >> > Since this now seems to be a mandatory thing to get a kernel built
> >> > can it please be set in the Makefile that is needing it?
> >>
> >> It's already handled by the Makefile that needs it when using the
> >> normal build process - i.e., "make buildworld buildkernel" (or
> >> toolchain or kernel-toolchain followed by buildkernel).
> >>
> >> The failure arises when building a kernel the "old" way, using config
> >> and then and make in the kernel directory. This inherently uses the
> >> host's linker (/usr/bin/ld), which is too old to link the kernel. We
> >> can't just add LD=ld.lld to the kernel's Makefile(s), because it would
> >> break external toolchain and other cases where users use a specific
> >> linker. I hope to introduce a KERNEL_LD Make variable that controls
> >> the linker used for the kernel link, but it's more involved than a one
> >> or two line change for the same reason that we can't just set
> >> LD=ld.lld.
> >>
> >> ld.lld will start being installed as /usr/bin/ld once these two issues
> >> are resolved:
> > ...
> >
> > In the meantime what about reverting the ifunc usage until this
> > can be done?
>
> Nope. If somebody take trouble over compiling their kernel manually,
> then at least
> read the documentation, how to compile their system in the new way.
> We talking about 12-CURRENT and not about 1X-STABLE branches....


IMHO, this is an acceptable breakage for -current. This is on the 'experts
only' path and there's a note in UPDATING to cope. We don't intend to keep
it that way forever, and the benefit of getting useful testing from a wider
audience in this case, imho, out weights the minor inconvenience for the
small minority of users that go old-school.

Warner
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "[hidden email]"
Reply | Threaded
Open this post in threaded view
|

Re: Can't build kernel anymore: amd64 kernel requires linker ifunc support

Emeric POUPON-2
In reply to this post by Warner Losh

> LD=ld.lld make
>
> is the magic here. The kernel needs a new linker to properly link in the
> ifunc, and that's not our ancient ld. lld does it, as does the latter-day
> binutils.
>
> Warner

Thanks a lot, that works fine!

Emeric
_______________________________________________
[hidden email] mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "[hidden email]"