Re: building head -r338675 with devel/amd64-gcc: /usr/local/x86_64-unknown-freebsd12.0/bin/ld: warning: -z ifunc-noplt ignored

From: Michael Tuexen <tuexen_at_freebsd.org>
Date: Sun, 23 Sep 2018 13:36:08 +0200
Resending from correct address...
> On 22. Sep 2018, at 05:57, Warner Losh <imp_at_bsdimp.com> wrote:
> 
> Hmmm, what does make -V LINKER_TYPE and make -V LINKER_FEATURES say?
> 
> They look good for me, but the only way you get this error is if they are
> wrong.
> 
> Although from your typescript, I see:
> 
> ===> lib/libc (cleandir)
> make[4]: "/usr/home/bcran/workspace/freebsd/lib/libc/Makefile" line 26:
> amd64 libc requires linker ifunc support
> 
> which tells me that we need to exclude all the non-build targets from this
> check.... This will use the HOST linker rather than the TARGET linker.
> 
> So something like:
> 
> diff --git a/lib/libc/Makefile b/lib/libc/Makefile
> index a1ce123c0f33..11575e1cabff 100644
> --- a/lib/libc/Makefile
> +++ b/lib/libc/Makefile
> _at__at_ -21,10 +21,12 _at__at_ LIBC_ARCH=${MACHINE_ARCH}
> LIBC_ARCH=${MACHINE_CPUARCH}
> .endif
> 
> +.if build(all)
> .if (${LIBC_ARCH} == amd64 || ${LIBC_ARCH} == i386) && \
>    defined(LINKER_FEATURES) && ${LINKER_FEATURES:Mifunc} == ""
> .error ${LIBC_ARCH} libc requires linker ifunc support
> .endif
> +.endif
Using this patch I was able to build/install world and kernel on an i386 system.
However, after removing it, I can't build world then. When trying to compile a
kernel "the old way" I end up with:

tuexen_at_head:~/head/sys/i386/conf % config -g TCP
WARNING: duplicate option `GEOM_PART_GPT' encountered.
Kernel build directory is ../compile/TCP
Don't forget to do ``make cleandepend && make depend''
tuexen_at_head:~/head/sys/i386/conf % cd ../compile/TCP/
tuexen_at_head:~/head/sys/i386/compile/TCP % make -j 6
make: "../../../conf/../../../conf/kern.pre.mk" line 126: amd64/i386 kernel requires linker ifunc support

This is r338893.

amd64 works without any problem. So this is i386 specific. Any idea how to fix it?

Best regards
Michael
> 
> # All library objects contain FreeBSD revision strings by default; they
> may be
> # excluded as a space-saving measure.  To produce a library that does
> 
> may be needed, but the problem may be related to caching these values from
> the host as well, even though we rebuild them...
> 
> Warner
> 
> On Fri, Sep 21, 2018 at 9:38 PM Rebecca Cran <rebecca_at_bluestop.org> wrote:
> 
>> On 9/21/18 9:35 PM, Warner Losh wrote:
>>> 
>>> I meant to add, can you give a few lines before the error is spewed
>>> here in email? My IRC computer died before I could see any answers
>>> there...
>>> 
>>> My 11.2-stable system has 6.0.1, so I can't test from there.
>> 
>> 
>> I've uploaded the full 'buildworld' output to
>> https://bluestop.org/files/typescript.txt .
>> 
>> 
>> --
>> 
>> Rebecca
>> 
>> 
> _______________________________________________
> freebsd-current_at_freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscribe_at_freebsd.org"
Received on Sun Sep 23 2018 - 09:36:13 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:18 UTC