I have been building FreeBSD for many years, as in since 2.2.8.
Currently my amd64 build of 12-STABLE is built with the following src.conf:
WITHOUT_BHYVE=1
WITHOUT_CAPSICUM=1
WITHOUT_CDDL=1
WITHOUT_CLANG_EXTRAS=1
WITHOUT_CLANG_FULL=1
WITHOUT_CROSS_COMPILER=1
WITHOUT_DEBUG_FILES=1
WITHOUT_EXAMPLES=1
WITHOUT_HYPERV=1
WITHOUT_JAIL=1
WITHOUT_LOCALES=1
WITHOUT_PROFILE=1
WITHOUT_QUOTAS=1
WITHOUT_TESTS=1
And a make.conf of:
BATCH=yes
MK_CDDL=no
MK_CLANG_EXTRAS=no
MK_DEBUG_FILES=no
MK_NO_PROFILE=yes
MK_TESTS=no
OPTIONS_UNSET=JAVA
WITH_JADETEX=no
WITHOUT_CDDL=yes
WITHOUT_CLANG_FULL=yes
WITHOUT_CTF=yes
WITHOUT_CTM=yes
DISABLE_VULNERABILITIES=yes
So far, so good. (I do this to fit the whole thing onto a CD-image.)
Fooling around, and using xhyve on my Mac, I want to build a i386 version in a
VM.
So I grabbed the 20190314 snapshot of 12-STABLE, i386 flavor, and installed it.
Works great.
Now to rebuild the world.
The buildworld and buildkernel steps both immediately fail due to the linker not
supporting ifuncs.
The code that stops the buildworld is this from /usr/src/lib/libc/Makefile:
---
.if (${LIBC_ARCH} == amd64 || ${LIBC_ARCH} == i386) && \
${.TARGETS:Mall} == all && \
defined(LINKER_FEATURES) && ${LINKER_FEATURES:Mifunc} ==
""
.error ${LIBC_ARCH} libc requires linker ifunc support
.endif
---
However the linker on my system is the lld linker that supports ifuncs! Why
does this check fail?
I am building on i386 but I am only building i386, as in I am not building all
targets or amd64.
I edited the two Makefiles that have this check to remove the check and the
builds proceed just fine.
So it appears that these checks are flawed, or I am soon to learn something new
about FreeBSD!
Thanks,
Dan Allen