head -r343670 clang assertion failure from attempting -g in XCFLAGS and XCXXFLAGS for cross-buildworld

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

head -r343670 clang assertion failure from attempting -g in XCFLAGS and XCXXFLAGS for cross-buildworld

freebsd-toolchain mailing list
Apparently because I tried to use:

#
XCFLAGS+= -g
XCXXFLAGS+= -g
#
# Avoid stripping but do not control host -g status as well:
DEBUG_FLAGS+=

for an amd64->armv7 cross-buildworld based on:

SRC_ENV_CONF="/root/src.configs/src.conf.armv7-clang-bootstrap.amd64-host"

the result was:

# Meta data file /usr/obj/armv7_clang/arm.armv7/usr/src/arm.armv7/lib/csu/arm/crt1.o.meta
CMD cc -g -mcpu=cortex-a7 -target armv7-gnueabihf-freebsd13.0 --sysroot=/usr/obj/armv7_clang/arm.armv7/usr/src/arm.armv7/tmp -B/usr/obj/armv7_clang/arm.armv7/usr/src/arm.armv7/tmp/usr/bin -O -pipe -I/
usr/src/lib/csu/common -I/usr/src/lib/libc/include -DCRT_IRELOC_SUPPRESS -std=gnu99 -Wsystem-headers -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-a
rith -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
-Wthread-safety -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Qunused-arguments   -c -o crt1.o crt1.s
CWD /usr/obj/armv7_clang/arm.armv7/usr/src/arm.armv7/lib/csu/arm
TARGET crt1.o
-- command output --
Assertion failed: (Header.MCDwarfFiles.empty()), function resetRootFile, file /usr/src/contrib/llvm/include/llvm/MC/MCDwarf.h, line 316.
cc: error: unable to execute command: Abort trap (core dumped)
cc: error: clang integrated assembler command failed due to signal (use -v to see invocation)
FreeBSD clang version 7.0.1 (tags/RELEASE_701/final 349250) (based on LLVM 7.0.1)
Target: armv7--freebsd13.0-gnueabihf
Thread model: posix
InstalledDir: /usr/bin
cc: note: diagnostic msg: PLEASE submit a bug report to https://bugs.freebsd.org/submit/ and include the crash backtrace, preprocessed source, and associated run script.
cc: note: diagnostic msg: Error generating preprocessed source(s) - no preprocessable inputs.

*** Error code 254

-- filemon acquired metadata --
# filemon version 5
# Target pid 41789
# Start 1549232398.729028
V 5
E 41865 /bin/sh
R 41865 /etc/libmap.conf
R 41865 /var/run/ld-elf.so.hints
R 41865 /lib/libedit.so.7
R 41865 /lib/libc.so.7
R 41865 /lib/libncursesw.so.8
R 41865 /dev/hv_tsc
F 41865 41867
E 41867 /usr/bin/cc
R 41867 /dev/hv_tsc
F 41867 41873
E 41873 /usr/bin/cc
R 41873 /dev/hv_tsc
R 41873 crt1.s
W 41873 crt1.o
D 41873 crt1.o
X 41873 0 134
X 41867 -2 0
X 41865 254 0
# Stop 1549232399.279017
# Bye bye


I also had:

#
XCFLAGS+= -mcpu=cortex-a7
XCXXFLAGS+= -mcpu=cortex-a7
# There is no XCPPFLAGS but XCPP gets XCFLAGS content.

but that has been long standing in my environment.


For reference:

# more ~/src.configs/src.conf.armv7-clang-bootstrap.amd64-host
TO_TYPE=armv7
#
KERNCONF=GENERIC-NODBG
TARGET=arm
.if ${.MAKE.LEVEL} == 0
TARGET_ARCH=${TO_TYPE}
.export TARGET_ARCH
.endif
#
#WITH_CROSS_COMPILER=
WITH_SYSTEM_COMPILER=
WITH_SYSTEM_LINKER=
#
#CPUTYPE=soft
WITH_LIBCPLUSPLUS=
#WITH_LLD_BOOTSTRAP=
WITHOUT_BINUTILS_BOOTSTRAP=
WITH_ELFTOOLCHAIN_BOOTSTRAP=
#Disables avoiding bootstrap: WITHOUT_LLVM_TARGET_ALL=
WITHOUT_LLVM_TARGET_AARCH64=
WITH_LLVM_TARGET_ARM=
WITHOUT_LLVM_TARGET_MIPS=
WITHOUT_LLVM_TARGET_POWERPC=
WITHOUT_LLVM_TARGET_SPARC=
WITHOUT_LLVM_TARGET_X86=
#WITH_CLANG_BOOTSTRAP=
WITH_CLANG=
WITH_CLANG_IS_CC=
WITH_CLANG_FULL=
WITH_CLANG_EXTRAS=
WITH_LLD=
WITH_LLD_IS_LD=
WITHOUT_BINUTILS=
#
# Linking lldb fails for armv7
WITHOUT_LLDB=
#
WITH_BOOT=
WITHOUT_LIB32=
#
WITHOUT_GCC_BOOTSTRAP=
WITHOUT_GCC=
WITHOUT_GCC_IS_CC=
WITHOUT_GNUCXX=
#
NO_WERROR=
#WERROR=
MALLOC_PRODUCTION=
#
WITH_REPRODUCIBLE_BUILD=
WITH_DEBUG_FILES=
#
XCFLAGS+= -g
XCXXFLAGS+= -g
#
# Avoid stripping but do not control host -g status as well:
DEBUG_FLAGS+=
#
XCFLAGS+= -mcpu=cortex-a7
XCXXFLAGS+= -mcpu=cortex-a7
# There is no XCPPFLAGS but XCPP gets XCFLAGS content.



===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)

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