head -r351178 amd64->powerpc (32-bit) cross build using devel/xtoolchain-llvm90: "ld: error: symbol '_ThreadRuneLocale' has no type"
Mark Millard
marklmi at yahoo.com
Sun Aug 18 03:39:24 UTC 2019
I decided to see what would happen if I tried a
32-bit powerpc buildworld buildkernel (cross
build) based on using devel/llvm90 (after the rc2
update). Where and how it stopped is shown below.
(Note the reference to clang-9 as well.)
--- all_subdir_usr.bin ---
--- apply.full ---
ld: error: symbol '_ThreadRuneLocale' has no type
>>> defined in /usr/obj/powerpcvtsc-xtoolchain-llvm/powerpc.powerpc/usr/src/powerpc.powerpc/tmp/lib/libc.so.7
>>> referenced by _ctype.h:0 (/usr/obj/powerpcvtsc-xtoolchain-llvm/powerpc.powerpc/usr/src/powerpc.powerpc/tmp/usr/include/_ctype.h:0)
>>> apply.o:(main)
ld: error: symbol '_ThreadRuneLocale' has no type
>>> defined in /usr/obj/powerpcvtsc-xtoolchain-llvm/powerpc.powerpc/usr/src/powerpc.powerpc/tmp/lib/libc.so.7
>>> referenced by runetype.h:98 (/usr/obj/powerpcvtsc-xtoolchain-llvm/powerpc.powerpc/usr/src/powerpc.powerpc/tmp/usr/include/runetype.h:98)
>>> apply.o:(main)
--- all_subdir_lib ---
. . .
--- all_subdir_usr.bin ---
clang-9: error: linker command failed with exit code 1 (use -v to see invocation)
--- all_subdir_bin ---
. . .
--- all_subdir_usr.bin ---
*** [apply.full] Error code 1
make[4]: stopped in /usr/src/usr.bin/apply
.ERROR_TARGET='apply.full'
.ERROR_META_FILE='/usr/obj/powerpcvtsc-xtoolchain-llvm/powerpc.powerpc/usr/src/powerpc.powerpc/usr.bin/apply/apply.full.meta'
.MAKE.LEVEL='4'
MAKEFILE=''
.MAKE.MODE='meta missing-filemon=yes missing-meta=yes silent=yes verbose'
_ERROR_CMD='/usr/local/bin/clang90 -target powerpc-unknown-freebsd13.0 --sysroot=/usr/obj/powerpcvtsc-xtoolchain-llvm/powerpc.powerpc/usr/src/powerpc.powerpc/tmp -B/var/empty -O2 -pipe -g -std=gnu99 -Wno-format-zero-length -fstack-protector-strong -Wsystem-headers -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls -Wold-style-definition -Wno-pointer-sign -Wmissing-variable-declarations -Wthread-safety -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Qunused-arguments -Wl,--secure-plt -Wl,--no-threads -o apply.full apply.o -lsbuf ;'
.CURDIR='/usr/src/usr.bin/apply'
.MAKE='make'
.OBJDIR='/usr/obj/powerpcvtsc-xtoolchain-llvm/powerpc.powerpc/usr/src/powerpc.powerpc/usr.bin/apply'
.TARGETS='all'
DESTDIR='/usr/obj/powerpcvtsc-xtoolchain-llvm/powerpc.powerpc/usr/src/powerpc.powerpc/tmp'
LD_LIBRARY_PATH=''
MACHINE='powerpc'
MACHINE_ARCH='powerpc'
MAKEOBJDIRPREFIX=''
MAKESYSPATH='/usr/src/share/mk'
MAKE_VERSION='20181221'
PATH='/usr/obj/powerpcvtsc-xtoolchain-llvm/powerpc.powerpc/usr/src/powerpc.powerpc/tmp/usr/sbin:/usr/obj/powerpcvtsc-xtoolchain-llvm/powerpc.powerpc/usr/src/powerpc.powerpc/tmp/usr/bin:/usr/obj/powerpcvtsc-xtoolchain-llvm/powerpc.powerpc/usr/src/powerpc.powerpc/tmp/legacy/usr/sbin:/usr/obj/powerpcvtsc-xtoolchain-llvm/powerpc.powerpc/usr/src/powerpc.powerpc/tmp/legacy/usr/bin:/usr/obj/powerpcvtsc-xtoolchain-llvm/powerpc.powerpc/usr/src/powerpc.powerpc/tmp/legacy/bin::/sbin:/bin:/usr/sbin:/usr/bin'
SRCTOP='/usr/src'
OBJTOP='/usr/obj/powerpcvtsc-xtoolchain-llvm/powerpc.powerpc/usr/src/powerpc.powerpc'
.MAKE.MAKEFILES='/usr/src/share/mk/sys.mk /usr/src/share/mk/local.sys.env.mk /usr/src/share/mk/src.sys.env.mk /root/src.configs/src.conf.powerpc-xtoolchain-llvm.amd64-host /usr/src/share/mk/bsd.mkopt.mk /usr/src/share/mk/src.sys.obj.mk /usr/src/share/mk/auto.obj.mk /usr/src/share/mk/bsd.suffixes.mk /root/src.configs/make.conf /usr/src/share/mk/local.sys.mk /usr/src/share/mk/src.sys.mk /dev/null /usr/src/usr.bin/apply/Makefile /usr/src/share/mk/src.opts.mk /usr/src/share/mk/bsd.own.mk /usr/src/share/mk/bsd.opts.mk /usr/src/share/mk/bsd.cpu.mk /usr/src/share/mk/bsd.compiler.mk /usr/src/share/mk/bsd.linker.mk /usr/src/share/mk/bsd.prog.mk /usr/src/share/mk/bsd.init.mk /usr/src/share/mk/local.init.mk /usr/src/share/mk/src.init.mk /usr/src/usr.bin/apply/../Makefile.inc /usr/src/share/mk/bsd.libnames.mk /usr/src/share/mk/src.libnames.mk /usr/src/share/mk/bsd.nls.mk /usr/src/share/mk/bsd.confs.mk /usr/src/share/mk/bsd.files.mk /usr/src/share/mk/bsd.dirs.mk /usr/src/share/mk/bsd.incs.mk /usr/src/share/mk/bsd.links.mk /usr/src/share/mk/bsd.man.mk /usr/src/share/mk/bsd.dep.mk /usr/src/share/mk/bsd.clang-analyze.mk /usr/src/share/mk/bsd.obj.mk /usr/src/share/mk/bsd.subdir.mk /usr/src/share/mk/bsd.sys.mk'
.PATH='. /usr/src/usr.bin/apply'
1 error
This was based on:
# more ~/src.configs/src.conf.powerpc-xtoolchain-llvm.amd64-host
TO_TYPE=powerpc
LLVM_VINTAGE=llvm90
#
KERNCONF=GENERICvtsc-NODBG
TARGET=powerpc
.if ${.MAKE.LEVEL} == 0
TARGET_ARCH=${TO_TYPE}
.export TARGET_ARCH
.endif
#
WITHOUT_CROSS_COMPILER=
WITHOUT_SYSTEM_COMPILER=
WITHOUT_SYSTEM_LINKER=
#
WITH_LLVM_LIBUNWIND=
WITH_LIBCPLUSPLUS=
WITHOUT_LLD_BOOTSTRAP=
WITHOUT_BINUTILS_BOOTSTRAP=
WITHOUT_ELFTOOLCHAIN_BOOTSTRAP=
WITHOUT_LLVM_TARGET_ALL=
WITHOUT_CLANG_BOOTSTRAP=
WITH_CLANG=
WITH_CLANG_IS_CC=
WITH_CLANG_FULL=
WITH_CLANG_EXTRAS=
WITH_LLD=
WITH_LLD_IS_LD=
WITHOUT_BINUTILS=
WITHOUT_PORT_BASE_BINUTILS=
WITH_LLDB=
#
WITH_BOOT=
#
LOADER_DEFAULT_INTERP=4th
#
WITHOUT_GCC_BOOTSTRAP=
WITHOUT_GCC=
WITHOUT_GCC_IS_CC=
WITHOUT_GNUCXX=
#
NO_WERROR=
#
# Avoid build aborting for the likes of, for example,
# sign mismatch errors for integer types. Avoids:
# [-Werror,-Wpointer-sign]
#
WERROR=
MALLOC_PRODUCTION=
#
# Avoid stripping but do not control host -g status as well:
DEBUG_FLAGS+=
#
WITH_REPRODUCIBLE_BUILD=
WITH_DEBUG_FILES=
#
#
# For TO (so-called "cross") stages . . .
#
CROSS_TOOLCHAIN=${LLVM_VINTAGE}
#X_COMPILER_TYPE=clang
CROSS_BINUTILS_PREFIX=/usr/local/${LLVM_VINTAGE}/bin/
.if ${.MAKE.LEVEL} == 0
XCC=/usr/local/bin/clang90
XCXX=/usr/local/bin/clang++90
XCPP=/usr/local/bin/clang-cpp90
.export XCC
.export XCXX
.export XCPP
XAS=/usr/local/${LLVM_VINTAGE}/bin/llvm-as
#XAR=/usr/local/${LLVM_VINTAGE}/bin/llvm-ar
XLD=/usr/local/${LLVM_VINTAGE}/bin/ld
#XNM=/usr/local/${LLVM_VINTAGE}/bin/llvm-nm
XOBJCOPY=/usr/local/${LLVM_VINTAGE}/bin/llvm-objcopy
XOBJDUMP=/usr/local/${LLVM_VINTAGE}/bin/llvm-objdump
#XRANLIB=/usr/local/${LLVM_VINTAGE}/bin/llvm-ranlib
#XSIZE=/usr/local/${LLVM_VINTAGE}/bin/llvm-size
#XSTRINGS=/usr/local/${LLVM_VINTAGE}/bin/llvm-strings
.export XAS
#.export XAR
.export XLD
#.export XNM
.export XOBJCOPY
.export XOBJDUMP
#.export XRANLIB
#.export XSIZE
#.export XSTRINGS
.endif
#
#
# From based on clang (via system). . .
#
.if ${.MAKE.LEVEL} == 0
CC=/usr/bin/clang
CXX=/usr/bin/clang++
CPP=/usr/bin/clang-cpp
.export CC
.export CXX
.export CPP
.endif
# more /usr/src/sys/powerpc/conf/GENERICvtsc-NODBG
#
# GENERIC -- Custom configuration for the powerpc/powerpc
#
include "GENERIC"
ident GENERICvtsc-NODBG
makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols
nooptions PS3 # Sony Playstation 3 HACK!!! to allow sc
options KDB # Enable kernel debugger support
# For minimum debugger support (stable branch) use:
options KDB_TRACE # Print a stack trace for a panic
options DDB # Enable the kernel debugger
options GDB # HACK!!! ...
options ALT_BREAK_TO_DEBUGGER
options BREAK_TO_DEBUGGER
# Extra stuff:
#options VERBOSE_SYSINIT # Enable verbose sysinit messages
#options BOOTVERBOSE=1
#options BOOTHOWTO=RB_VERBOSE
#options KTR
#options KTR_MASK=KTR_BUF
##options KTR_CPUMASK=0xF
#options KTR_VERBOSE
# HACK!!! to allow sc for 2560x1440 display on Radeon X1950 that vt historically mishandled during booting
device sc
#device kbdmux # HACK: already listed by vt
options SC_OFWFB # OFW frame buffer
options SC_DFLT_FONT # compile font in
makeoptions SC_DFLT_FONT=cp437
# Disable any extra checking for. . .
nooptions DEADLKRES # Enable the deadlock resolver
nooptions INVARIANTS # Enable calls of extra sanity checking
nooptions INVARIANT_SUPPORT # Extra sanity checks of internal structures, required by INVARIANTS
nooptions WITNESS # Enable checks to detect deadlocks and cycles
nooptions WITNESS_SKIPSPIN # Don't run witness on spinlocks for speed
nooptions DIAGNOSTIC
nooptions MALLOC_DEBUG_MAXZONES # Separate malloc(9) zones
# Avoid dynamic loads?
device filemon
device geom_label
device mac_ntpd
# more ~/src.configs/make.conf
CFLAGS.gcc+= -v
LDFLAGS.lld+= -Wl,--no-threads
===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)
More information about the freebsd-toolchain
mailing list