Starting down the road of compiling mips64 for clang. I get a clang crash here: -------------------------------------------------------------- >>> stage 4.2: building libraries -------------------------------------------------------------- cd /home/sbruno/bsd/clang360-import; MAKEOBJDIRPREFIX=/var/tmp/mips.mips64 MACHINE_ARCH=mips64 MACHINE=mips CPUTYPE= GROFF_BIN_PATH=/var/tmp/mips.mips64/home/sbruno/bsd/clang360-import/tmp/legacy/usr/bin GROFF_FONT_PATH=/var/tmp/mips.mips64/home/sbruno/bsd/clang360-import/tmp/legacy/usr/share/groff_font GROFF_TMAC_PATH=/var/tmp/mips.mips64/home/sbruno/bsd/clang360-import/tmp/legacy/usr/share/tmac _SHLIBDIRPREFIX=/var/tmp/mips.mips64/home/sbruno/bsd/clang360-import/tmp _LDSCRIPTROOT= VERSION="FreeBSD 11.0-CURRENT mips64 1100058" INSTALL="sh /home/sbruno/bsd/clang360-import/tools/install.sh" PATH=/var/tmp/mips.mips64/home/sbruno/bsd/clang360-import/tmp/legacy/usr/sbin:/var/tmp/mips.mips64/home/sbruno/bsd/clang360-import/tmp/legacy/usr/bin:/var/tmp/mips.mips64/home/sbruno/bsd/clang360-import/tmp/legacy/usr/games:/var/tmp/mips.mips64/home/sbruno/bsd/clang360-import/tmp/legacy/bin:/var/tmp/mips.mips64/home/sbruno/bsd/clang360-import/tmp/usr/sbin:/var/tmp/mips.mips64/home/sbruno/bsd/clang360-import/tmp/usr/bin:/var/tmp/mips.mips64/home/sbruno/bsd/clang360-import/tmp/usr/games:/sbin:/bin:/usr/sbin:/usr/bin CC="cc " CXX="c++ " DEPFLAGS="" CPP="cpp " AS="as" AR="ar" LD="ld" NM=nm OBJDUMP=objdump OBJCOPY="objcopy" RANLIB=ranlib STRINGS= SIZE="size" make -f Makefile.inc1 DESTDIR=/var/tmp/mips.mips64/home/sbruno/bsd/clang360-import/tmp -DNO_FSCHG MK_HTML=no -DNO_LINT MK_MAN=no MK_PROFILE=no MK_TESTS=no MK_TESTS_SUPPORT=yes libraries cd /home/sbruno/bsd/clang360-import && make -f Makefile.inc1 _prereq_libs && make -f Makefile.inc1 _startup_libs && make -f Makefile.inc1 _prebuild_libs && make -f Makefile.inc1 _generic_libs ===> gnu/lib/libssp/libssp_nonshared (obj,depend,all,install) sh /home/sbruno/bsd/clang360-import/tools/install.sh -C -o root -g wheel -m 444 libssp_nonshared.a /var/tmp/mips.mips64/home/sbruno/bsd/clang360-import/tmp/usr/lib ===> gnu/lib/libgcc (obj,depend,all,install) sh /home/sbruno/bsd/clang360-import/tools/install.sh -C -o root -g wheel -m 444 libgcc_eh.a /var/tmp/mips.mips64/home/sbruno/bsd/clang360-import/tmp/usr/lib ===> lib/libcompiler_rt (obj,depend,all,install) cc -O -pipe -v -G0 -fpic -fvisibility=hidden -DVISIBILITY_HIDDEN -std=gnu99 -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter -Qunused-arguments -c /home/sbruno/bsd/clang360-import/lib/libcompiler_rt/../../contrib/compiler-rt/lib/builtins/absvti2.c -o absvti2.o FreeBSD clang version 3.6.0 (tags/RELEASE_360/rc2 227651) 20150131 Target: mips64-unknown-freebsd11.0 Thread model: posix "/var/tmp/mips.mips64/home/sbruno/bsd/clang360-import/tmp/usr/bin/cc" -cc1 -triple mips64-unknown-freebsd11.0 -emit-obj -disable-free -main-file-name absvti2.c -mrelocation-model pic -pic-level 1 -mthread-model posix -mdisable-fp-elim -masm-verbose -mconstructor-aliases -target-cpu mips64r2 -target-feature -o32 -target-feature +n64 -target-abi n64 -mfloat-abi hard -mllvm -mips-ssection-threshold=0 -v -dwarf-column-info -coverage-file /var/tmp/mips.mips64/home/sbruno/bsd/clang360-import/lib/libcompiler_rt/absvti2.o -resource-dir /var/tmp/mips.mips64/home/sbruno/bsd/clang360-import/tmp/usr/bin/../lib/clang/3.6.0 -D VISIBILITY_HIDDEN -isysroot /var/tmp/mips.mips64/home/sbruno/bsd/clang360-import/tmp -O2 -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter -std=gnu99 -fdebug-compilation-dir /var/tmp/mips.mips64/home/sbruno/bsd/clang360-import/lib/libcompiler_rt -ferror-limit 19 -fmessage-length 0 -fvisibility hidden -mstackrealign -fobjc-runtime=gnustep -fdiagnostics-show-option -vectorize-loops -vectorize-slp -o absvti2.o -x c /home/sbruno/bsd/clang360-import/lib/libcompiler_rt/../../contrib/compiler-rt/lib/builtins/absvti2.c clang -cc1 version 3.6.0 based upon LLVM 3.6.0 default target mips64-unknown-freebsd11.0 #include "..." search starts here: #include <...> search starts here: /var/tmp/mips.mips64/home/sbruno/bsd/clang360-import/tmp/usr/bin/../lib/clang/3.6.0/include /var/tmp/mips.mips64/home/sbruno/bsd/clang360-import/tmp/usr/include End of search list. fatal error: error in backend: Cannot select: 0x8032c5cc0: i64,glue = subc 0x8032c5660, 0x8032c5000 [ORD=4] [ID=11] 0x8032c5660: i64 = xor 0x8032c5000, 0x8032c5550 [ORD=3] [ID=10] 0x8032c5000: i64 = sra 0x8032c5dd0, 0x8032c6550 [ORD=2] [ID=7] 0x8032c5dd0: i64,ch = CopyFromReg 0x80326e930, 0x8032c6990 [ORD=2] [ID=6] 0x8032c6990: i64 = Register %vreg2 [ID=1] 0x8032c6550: i32 = Constant<63> [ID=5] 0x8032c5550: i64,ch = CopyFromReg 0x8032c5dd0:1, 0x8032c6660 [ORD=2] [ID=8] 0x8032c6660: i64 = Register %vreg3 [ID=2] 0x8032c5000: i64 = sra 0x8032c5dd0, 0x8032c6550 [ORD=2] [ID=7] 0x8032c5dd0: i64,ch = CopyFromReg 0x80326e930, 0x8032c6990 [ORD=2] [ID=6] 0x8032c6990: i64 = Register %vreg2 [ID=1] 0x8032c6550: i32 = Constant<63> [ID=5] In function: __absvti2 cc: error: clang frontend command failed with exit code 70 (use -v to see invocation) FreeBSD clang version 3.6.0 (tags/RELEASE_360/rc2 227651) 20150131 Target: mips64-unknown-freebsd11.0 Thread model: posix 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: ******************** PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT: Preprocessed source(s) and associated run script(s) are located at: cc: note: diagnostic msg: /tmp/absvti2-6a9ce7.c cc: note: diagnostic msg: /tmp/absvti2-6a9ce7.sh cc: note: diagnostic msg: ******************** *** Error code 70 Stop. make[4]: stopped in /home/sbruno/bsd/clang360-import/lib/libcompiler_rt *** Error code 1 Stop. make[3]: stopped in /home/sbruno/bsd/clang360-import *** Error code 1 Stop. make[2]: stopped in /home/sbruno/bsd/clang360-import *** Error code 1 Stop. make[1]: stopped in /home/sbruno/bsd/clang360-import *** Error code 1 Stop. make: stopped in /home/sbruno/bsd/clang360-import
Created attachment 152461 [details] c source file from clang36 crash
Created attachment 152462 [details] script to build c source file to exhibit crash
This compiles with clang trunk r227785, though there are some warnings about unsupported feature flags: $ /share/dim/llvm/227785-trunk-freebsd11-i386-aconf-rel-1/bin/clang "-cc1" "-triple" "mips64-unknown-freebsd11.0" "-emit-obj" "-disable-free" "-main-file-name" "absvti2.c" "-mrelocation-model" "pic" "-pic-level" "1" "-mthread-model" "posix" "-mdisable-fp-elim" "-masm-verbose" "-mconstructor-aliases" "-target-cpu" "mips64r2" "-target-feature" "-o32" "-target-feature" "+n64" "-target-abi" "n64" "-mfloat-abi" "hard" "-mllvm" "-mips-ssection-threshold=0" "-v" "-dwarf-column-info" "-D" "VISIBILITY_HIDDEN" "-O2" "-Wsystem-headers" "-Werror" "-Wall" "-Wno-format-y2k" "-Wno-uninitialized" "-Wno-pointer-sign" "-Wno-empty-body" "-Wno-string-plus-int" "-Wno-unused-const-variable" "-Wno-tautological-compare" "-Wno-unused-value" "-Wno-parentheses-equality" "-Wno-unused-function" "-Wno-enum-conversion" "-Wno-unused-local-typedef" "-Wno-switch" "-Wno-switch-enum" "-Wno-knr-promoted-parameter" "-std=gnu99" "-ferror-limit" "19" "-fmessage-length" "0" "-fvisibility" "hidden" "-mstackrealign" "-fobjc-runtime=gnustep" "-fdiagnostics-show-option" "-vectorize-loops" "-vectorize-slp" "-x" "c" "absvti2-6a9ce7.c" clang -cc1 version 3.7.0 based upon LLVM 3.7.0svn default target i386-unknown-freebsd11.0 #include "..." search starts here: #include <...> search starts here: /share/dim/llvm/227785-trunk-freebsd11-i386-aconf-rel-1/bin/../lib/clang/3.7.0/include /usr/include End of search list. '-o32' is not a recognized feature for this target (ignoring feature) '+n64' is not a recognized feature for this target (ignoring feature) '-o32' is not a recognized feature for this target (ignoring feature) '+n64' is not a recognized feature for this target (ignoring feature) '-o32' is not a recognized feature for this target (ignoring feature) '+n64' is not a recognized feature for this target (ignoring feature) '-o32' is not a recognized feature for this target (ignoring feature) '+n64' is not a recognized feature for this target (ignoring feature) '-o32' is not a recognized feature for this target (ignoring feature) '+n64' is not a recognized feature for this target (ignoring feature) '-o32' is not a recognized feature for this target (ignoring feature) '+n64' is not a recognized feature for this target (ignoring feature) '-o32' is not a recognized feature for this target (ignoring feature) '+n64' is not a recognized feature for this target (ignoring feature) '-o32' is not a recognized feature for this target (ignoring feature) '+n64' is not a recognized feature for this target (ignoring feature) The reduced test case is: __int128 a; __int128 __absvti2() { __int128 s = -1; return (a ^ s) - 1; }
Most likely fixed by this commit, I'll test later: http://llvm.org/viewvc/llvm-project?view=revision&revision=227003
(In reply to Dimitry Andric from comment #4) Yep, applied the phabricator review to my tree and we get a bit farther, then a second clang crash occurs. Target: mips64-unknown-freebsd11.0 Thread model: posix "/var/tmp/mips.mips64/home/sbruno/bsd/clang360-import/tmp/usr/bin/cc" -cc1 -triple mips64-unknown-freebsd11.0 -emit-obj -disable-free -main-file-name fixdfti.c -mrelocation-model pic -pic-level 1 -mthread-model posix -mdisable-fp-elim -masm-verbose -mconstructor-aliases -target-cpu mips64r2 -target-feature -o32 -target-feature +n64 -target-abi n64 -mfloat-abi hard -mllvm -mips-ssection-threshold=0 -v -dwarf-column-info -coverage-file /var/tmp/mips.mips64/home/sbruno/bsd/clang360-import/lib/libcompiler_rt/fixdfti.o -resource-dir /var/tmp/mips.mips64/home/sbruno/bsd/clang360-import/tmp/usr/bin/../lib/clang/3.6.0 -D VISIBILITY_HIDDEN -isysroot /var/tmp/mips.mips64/home/sbruno/bsd/clang360-import/tmp -O2 -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter -std=gnu99 -fdebug-compilation-dir /var/tmp/mips.mips64/home/sbruno/bsd/clang360-import/lib/libcompiler_rt -ferror-limit 19 -fmessage-length 0 -fvisibility hidden -mstackrealign -fobjc-runtime=gnustep -fdiagnostics-show-option -vectorize-loops -vectorize-slp -o fixdfti.o -x c /home/sbruno/bsd/clang360-import/lib/libcompiler_rt/../../contrib/compiler-rt/lib/builtins/fixdfti.c clang -cc1 version 3.6.0 based upon LLVM 3.6.0 default target mips64-unknown-freebsd11.0 #include "..." search starts here: #include <...> search starts here: /var/tmp/mips.mips64/home/sbruno/bsd/clang360-import/tmp/usr/bin/../lib/clang/3.6.0/include /var/tmp/mips.mips64/home/sbruno/bsd/clang360-import/tmp/usr/include End of search list. fatal error: error in backend: Cannot select: 0x8032c7660: i64,i64 = srl_parts 0x8032c6770, 0x8032c6110, 0x8032c7220 [ORD=5] [ID=12] 0x8032c6770: i64,ch = CopyFromReg 0x80326fcb0, 0x8032c7440 [ORD=2] [ID=8] 0x8032c7440: i64 = Register %vreg3 [ID=1] 0x8032c6110: i64 = Constant<0> [ID=5] 0x8032c7220: i32 = sub 0x8032c7ee0, 0x8032c7000 [ORD=3] [ID=11] 0x8032c7ee0: i32 = Constant<1075> [ID=2] 0x8032c7000: i32 = AssertSext 0x8032c7110, 0x8032c6660 [ORD=3] [ID=10] 0x8032c7110: i32,ch = CopyFromReg 0x80326fcb0, 0x8032c7dd0 [ORD=3] [ID=9] 0x8032c7dd0: i32 = Register %vreg1 [ID=3] In function: __fixdfti cc: error: clang frontend command failed with exit code 70 (use -v to see invocation) FreeBSD clang version 3.6.0 (tags/RELEASE_360/rc2 227651) 20150131 Target: mips64-unknown-freebsd11.0 Thread model: posix 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: ******************** PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT: Preprocessed source(s) and associated run script(s) are located at: cc: note: diagnostic msg: /tmp/fixdfti-1cabaf.c cc: note: diagnostic msg: /tmp/fixdfti-1cabaf.sh cc: note: diagnostic msg: ******************** *** Error code 70 Stop. make[4]: stopped in /home/sbruno/bsd/clang360-import/lib/libcompiler_rt *** Error code 1
Created attachment 152489 [details] c source file from clang36 crash #2
Created attachment 152490 [details] shell script for assembler file #2
Created attachment 152502 [details] Import llvm r227089 on top of clang 3.6.0 The fixdfti crash is fixed by: http://llvm.org/viewvc/llvm-project?view=revision&revision=227089 That revision is a re-commit with additions of r227003, which was later reverted in r227082. Please undo your previous patch, apply this new patch instead, and try both test cases again.
Created attachment 152522 [details] This is the baseline patch to enable mips64 clang compiles, ias use with clang and 32bit lib support for mips64 This is the starting diff against the clan36 project branch. Use this to start working through failures.
confirmed that this is also required: http://reviews.llvm.org/D6267 builds still grinding.
Ok, much further along now. We appear to be breaking down handling crt: ------------------------------------------------------------- >>> stage 4.2: building libraries -------------------------------------------------------------- cd /home/sbruno/bsd/clang360-import; MAKEOBJDIRPREFIX=/var/tmp/mips.mips64 MACHINE_ARCH=mips64 MACHINE=mips CPUTYPE= GROFF_BIN_PATH=/var/tmp/mips.mips64/home/sbruno/bsd/clang360-import/tmp/legacy/usr/bin GROFF_FONT_PATH=/var/tmp/mip s.mips64/home/sbruno/bsd/clang360-import/tmp/legacy/usr/share/groff_font GROFF_TMAC_PATH=/var/tmp/mips.mips64/home/sbruno/bsd/clang360-import/tmp/legacy/usr/share/tmac _SHLIBDIRPREFIX=/var/tmp/mips.mips64/home/sbruno/bsd/clang360-impor t/tmp _LDSCRIPTROOT= VERSION="FreeBSD 11.0-CURRENT mips64 1100058" INSTALL="sh /home/sbruno/bsd/clang360-import/tools/install.sh" PATH=/var/tmp/mips.mips64/home/sbruno/bsd/clang360-import/tmp/legacy/usr/sbin:/var/tmp/mips.mips64/home /sbruno/bsd/clang360-import/tmp/legacy/usr/bin:/var/tmp/mips.mips64/home/sbruno/bsd/clang360-import/tmp/legacy/usr/games:/var/tmp/mips.mips64/home/sbruno/bsd/clang360-import/tmp/legacy/bin:/var/tmp/mips.mips64/home/sbruno/bsd/clang360-im port/tmp/usr/sbin:/var/tmp/mips.mips64/home/sbruno/bsd/clang360-import/tmp/usr/bin:/var/tmp/mips.mips64/home/sbruno/bsd/clang360-import/tmp/usr/games:/sbin:/bin:/usr/sbin:/usr/bin CC="cc " CXX="c++ " DEPFLAGS="" CPP="cpp " AS="as" AR ="ar" LD="ld" NM=nm OBJDUMP=objdump OBJCOPY="objcopy" RANLIB=ranlib STRINGS= SIZE="size" make -f Makefile.inc1 DESTDIR=/var/tmp/mips.mips64/home/sbruno/bsd/clang360-import/tmp -DNO_FSCHG MK_HTML=no -DNO_LINT MK_MAN=no MK_PROFILE=no MK_TESTS=no MK_TESTS_SUPPORT=yes libraries cd /home/sbruno/bsd/clang360-import && make -f Makefile.inc1 _prereq_libs && make -f Makefile.inc1 _startup_libs && make -f Makefile.inc1 _prebuild_libs && make -f Makefile.inc1 _generic_libs ===> gnu/lib/libssp/libssp_nonshared (obj,depend,all,install) sh /home/sbruno/bsd/clang360-import/tools/install.sh -C -o root -g wheel -m 444 libssp_nonshared.a /var/tmp/mips.mips64/home/sbruno/bsd/clang360-import/tmp/usr/lib ===> gnu/lib/libgcc (obj,depend,all,install) sh /home/sbruno/bsd/clang360-import/tools/install.sh -C -o root -g wheel -m 444 libgcc_eh.a /var/tmp/mips.mips64/home/sbruno/bsd/clang360-import/tmp/usr/lib ===> lib/libcompiler_rt (obj,depend,all,install) sh /home/sbruno/bsd/clang360-import/tools/install.sh -C -o root -g wheel -m 444 libcompiler_rt.a /var/tmp/mips.mips64/home/sbruno/bsd/clang360-import/tmp/usr/lib /var/tmp/mips.mips64/home/sbruno/bsd/clang360-import/tmp/usr/lib/libgcc.a -> libcompiler_rt.a ===> gnu/lib/csu (obj,depend,all,install) cc -O -pipe -v -G0 -DIN_GCC -DHAVE_LD_EH_FRAME_HDR -DDT_CONFIG -D__GLIBC__=3 -fno-inline-functions -fno-exceptions -fno-zero-initialized-in-bss -fno-asynchronous-unwind-tables -fno-omit-frame-pointer -I/home/sbruno/bsd/clang360-impo rt/gnu/lib/csu/../../../contrib/gcclibs/include -I/home/sbruno/bsd/clang360-import/gnu/lib/csu/../../../contrib/gcc/config -I/home/sbruno/bsd/clang360-import/gnu/lib/csu/../../../contrib/gcc -I. -I/home/sbruno/bsd/clang360-import/gnu/li b/csu/../../usr.bin/cc/cc_tools -std=gnu89 -Qunused-arguments -g0 -DCRT_BEGIN -c -o crtbegin.o /home/sbruno/bsd/clang360-import/gnu/lib/csu/../../../contrib/gcc/crtstuff.c FreeBSD clang version 3.6.0 (tags/RELEASE_360/rc2 227651) 20150131 Target: mips64-unknown-freebsd11.0 Thread model: posix "/var/tmp/mips.mips64/home/sbruno/bsd/clang360-import/tmp/usr/bin/cc" -cc1 -triple mips64-unknown-freebsd11.0 -emit-obj -disable-free -main-file-name crtstuff.c -mrelocation-model static -mthread-model posix -mdisable-fp-elim -mno-zero- initialized-in-bss -masm-verbose -mconstructor-aliases -target-cpu mips64r2 -target-feature -o32 -target-feature +n64 -target-abi n64 -mfloat-abi hard -mllvm -mips-ssection-threshold=0 -v -dwarf-column-info -coverage-file /var/tmp/mips.m ips64/home/sbruno/bsd/clang360-import/gnu/lib/csu/crtbegin.o -resource-dir /var/tmp/mips.mips64/home/sbruno/bsd/clang360-import/tmp/usr/bin/../lib/clang/3.6.0 -D IN_GCC -D HAVE_LD_EH_FRAME_HDR -D DT_CONFIG -D __GLIBC__=3 -D CRT_BEGIN -I /home/sbruno/bsd/clang360-import/gnu/lib/csu/../../../contrib/gcclibs/include -I /home/sbruno/bsd/clang360-import/gnu/lib/csu/../../../contrib/gcc/config -I /home/sbruno/bsd/clang360-import/gnu/lib/csu/../../../contrib/gcc -I . -I /home/ sbruno/bsd/clang360-import/gnu/lib/csu/../../usr.bin/cc/cc_tools -isysroot /var/tmp/mips.mips64/home/sbruno/bsd/clang360-import/tmp -O2 -std=gnu89 -fdebug-compilation-dir /var/tmp/mips.mips64/home/sbruno/bsd/clang360-import/gnu/lib/csu -ferror-limit 19 -fmessage-length 0 -mstackrealign -fno-inline-functions -fobjc-runtime=gnustep -fdiagnostics-show-option -vectorize-loops -vectorize-slp -o crtbegin.o -x c /home/sbruno/bsd/clang360-import/gnu/lib/csu/../../../contrib/gcc/crtstuff.c clang -cc1 version 3.6.0 based upon LLVM 3.6.0 default target mips64-unknown-freebsd11.0 #include "..." search starts here: #include <...> search starts here: /home/sbruno/bsd/clang360-import/gnu/lib/csu/../../../contrib/gcclibs/include /home/sbruno/bsd/clang360-import/gnu/lib/csu/../../../contrib/gcc/config /home/sbruno/bsd/clang360-import/gnu/lib/csu/../../../contrib/gcc . /home/sbruno/bsd/clang360-import/gnu/lib/csu/../../usr.bin/cc/cc_tools /var/tmp/mips.mips64/home/sbruno/bsd/clang360-import/tmp/usr/bin/../lib/clang/3.6.0/include /var/tmp/mips.mips64/home/sbruno/bsd/clang360-import/tmp/usr/include End of search list. <inline asm>:6:20: error: expected identifier .cpsetup $31, $2, 1b ^ Assertion failed: (!Name.empty() && "Normal symbols cannot be unnamed!"), function GetOrCreateSymbol, file /home/sbruno/bsd/clang360-import/lib/clang/libllvmmc/../../../contrib/llvm/lib/MC/MCContext.cpp, line 101. Stack dump: Stack dump: 0. Program arguments: /var/tmp/mips.mips64/home/sbruno/bsd/clang360-import/tmp/usr/bin/cc -cc1 -triple mips64-unknown-freebsd11.0 -emit-obj -disable-free -main-file-name crtstuff.c -mrelocation-model static -mthread-model posix -mdisable-fp-elim -mno-zero-initialized-in-bss -masm-verbose -mconstructor-aliases -target-cpu mips64r2 -target-feature -o32 -target-feature +n64 -target-abi n64 -mfloat-abi hard -mllvm -mips-ssection-threshold=0 -v -dwarf-column-info -coverage-file /var/tmp/mips.mips64/home/sbruno/bsd/clang360-import/gnu/lib/csu/crtbegin.o -resource-dir /var/tmp/mips.mips64/home/sbruno/bsd/clang360-import/tmp/usr/bin/../lib/clang/3.6.0 -D IN_GCC -D HAVE_LD_EH_FRAME_HDR -D DT_CONFIG -D __GLIBC__=3 -D CRT_BEGIN -I /home/sbruno/bsd/clang360-import/gnu/lib/csu/../../../contrib/gcclibs/include -I /home/sbruno/bsd/clang360-import/gnu/lib/csu/../../../contrib/gcc/config -I /home/sbruno/bsd/clang360-import/gnu/lib/csu/../../../contrib/gcc -I . -I /home/sbruno/bsd/clang360-import/gnu/lib/csu/../../usr.bin/cc/cc_tools -isysroot /var/tmp/mips.mips64/home/sbruno/bsd/clang360-import/tmp -O2 -std=gnu89 -fdebug-compilation-dir /var/tmp/mips.mips64/home/sbruno/bsd/clang360-import/gnu/lib/csu -ferror-limit 19 -fmessage-length 0 -mstackrealign -fno-inline-functions -fobjc-runtime=gnustep -fdiagnostics-show-option -vectorize-loops -vectorize-slp -o crtbegin.o -x c /home/sbruno/bsd/clang360-import/gnu/lib/csu/../../../contrib/gcc/crtstuff.c 1. <eof> parser at end of file 2. Code generation cc: error: unable to execute command: Abort trap (core dumped) cc: error: clang frontend command failed due to signal (use -v to see invocation) FreeBSD clang version 3.6.0 (tags/RELEASE_360/rc2 227651) 20150131 Target: mips64-unknown-freebsd11.0 Thread model: posix 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: ******************** PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT: Preprocessed source(s) and associated run script(s) are located at: cc: note: diagnostic msg: /tmp/crtstuff-ce8c9e.c cc: note: diagnostic msg: /tmp/crtstuff-ce8c9e.sh cc: note: diagnostic msg: ******************** *** Error code 254 Stop. make[4]: stopped in /home/sbruno/bsd/clang360-import/gnu/lib/csu *** Error code 1
Created attachment 152527 [details] c source file from clang36 crash #3
Created attachment 152528 [details] shell script for assembler file #3
right, we're back to this now. http://reviews.llvm.org/D6267
(In reply to Sean Bruno from comment #14) No change in compiler error after applying the four diffs from this review. I still see the compiler error from comment #11
A commit references this bug: Author: dim Date: Sat Feb 7 23:25:58 UTC 2015 New revision: 278367 URL: https://svnweb.freebsd.org/changeset/base/278367 Log: Pull in r227089 from upstream llvm trunk (by Vasileios Kalintiris): [mips] Enable arithmetic and binary operations for the i128 data type. Summary: This patch adds support for some operations that were missing from 128-bit integer types (add/sub/mul/sdiv/udiv... etc.). With these changes we can support the __int128_t and __uint128_t data types from C/C++. Depends on D7125 Reviewers: dsanders Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D7143 This fixes "error in backend" messages, when compiling parts of compiler-rt using 128-bit integer types for mips64. Reported by: sbruno PR: 197259 Changes: projects/clang360-import/contrib/llvm/lib/Target/Mips/Mips64InstrInfo.td projects/clang360-import/contrib/llvm/lib/Target/Mips/MipsISelLowering.cpp projects/clang360-import/contrib/llvm/lib/Target/Mips/MipsSEISelDAGToDAG.cpp projects/clang360-import/contrib/llvm/lib/Target/Mips/MipsSEISelLowering.cpp
Currently discussing the .cpsetup issues here. http://lists.cs.uiuc.edu/pipermail/llvmdev/2015-February/081795.html
(In reply to Sean Bruno from comment #11) Toma has posted a review http://reviews.llvm.org/D7697 for .cpsetup. My testing shows that it does work and is helping the move forward for mips64.
clang/llvm doesn't appear to support the dla instruction. I will open an upstream bug. -------------------------------------------------------------- >>> stage 4.2: building libraries -------------------------------------------------------------- cd /home/sbruno/bsd/clang360-import; MAKEOBJDIRPREFIX=/var/tmp/mips.mips64 MACHINE_ARCH=mips64 MACHINE=mips CPUTYPE= GROFF_BIN_PATH=/var/tmp/mips.mips64/home/sbruno/bsd/clang360-import/tmp/legacy/usr/bin GROFF_FONT_PATH=/var/tmp/mips.mips64/home/sbruno/bsd/clang360-import/tmp/legacy/usr/share/groff_font GROFF_TMAC_PATH=/var/tmp/mips.mips64/home/sbruno/bsd/clang360-import/tmp/legacy/usr/share/tmac _SHLIBDIRPREFIX=/var/tmp/mips.mips64/home/sbruno/bsd/clang360-import/tmp _LDSCRIPTROOT= VERSION="FreeBSD 11.0-CURRENT mips64 1100059" INSTALL="sh /home/sbruno/bsd/clang360-import/tools/install.sh" PATH=/var/tmp/mips.mips64/home/sbruno/bsd/clang360-import/tmp/legacy/usr/sbin:/var/tmp/mips.mips64/home/sbruno/bsd/clang360-import/tmp/legacy/usr/bin:/var/tmp/mips.mips64/home/sbruno/bsd/clang360-import/tmp/legacy/bin:/var/tmp/mips.mips64/home/sbruno/bsd/clang360-import/tmp/usr/sbin:/var/tmp/mips.mips64/home/sbruno/bsd/clang360-import/tmp/usr/bin:/sbin:/bin:/usr/sbin:/usr/bin CC="cc " CXX="c++ " DEPFLAGS="" CPP="cpp " AS="as" AR="ar" LD="ld" NM=nm OBJDUMP=objdump OBJCOPY="objcopy" RANLIB=ranlib STRINGS= SIZE="size" make -f Makefile.inc1 DESTDIR=/var/tmp/mips.mips64/home/sbruno/bsd/clang360-import/tmp -DNO_FSCHG MK_HTML=no -DNO_LINT MK_MAN=no MK_PROFILE=no MK_TESTS=no MK_TESTS_SUPPORT=yes libraries cd /home/sbruno/bsd/clang360-import && make -f Makefile.inc1 _prereq_libs && make -f Makefile.inc1 _startup_libs && make -f Makefile.inc1 _prebuild_libs && make -f Makefile.inc1 _generic_libs ===> gnu/lib/libssp/libssp_nonshared (obj,depend,all,install) sh /home/sbruno/bsd/clang360-import/tools/install.sh -C -o root -g wheel -m 444 libssp_nonshared.a /var/tmp/mips.mips64/home/sbruno/bsd/clang360-import/tmp/usr/lib ===> gnu/lib/libgcc (obj,depend,all,install) sh /home/sbruno/bsd/clang360-import/tools/install.sh -C -o root -g wheel -m 444 libgcc_eh.a /var/tmp/mips.mips64/home/sbruno/bsd/clang360-import/tmp/usr/lib ===> lib/libcompiler_rt (obj,depend,all,install) sh /home/sbruno/bsd/clang360-import/tools/install.sh -C -o root -g wheel -m 444 libcompiler_rt.a /var/tmp/mips.mips64/home/sbruno/bsd/clang360-import/tmp/usr/lib /var/tmp/mips.mips64/home/sbruno/bsd/clang360-import/tmp/usr/lib/libgcc.a -> libcompiler_rt.a ===> gnu/lib/csu (obj,depend,all,install) sh /home/sbruno/bsd/clang360-import/tools/install.sh -o root -g wheel -m 444 crtbegin.o /var/tmp/mips.mips64/home/sbruno/bsd/clang360-import/tmp/usr/lib/crtbegin.o sh /home/sbruno/bsd/clang360-import/tools/install.sh -o root -g wheel -m 444 crtend.o /var/tmp/mips.mips64/home/sbruno/bsd/clang360-import/tmp/usr/lib/crtend.o sh /home/sbruno/bsd/clang360-import/tools/install.sh -o root -g wheel -m 444 crtbeginT.o /var/tmp/mips.mips64/home/sbruno/bsd/clang360-import/tmp/usr/lib/crtbeginT.o sh /home/sbruno/bsd/clang360-import/tools/install.sh -o root -g wheel -m 444 crtbeginS.o /var/tmp/mips.mips64/home/sbruno/bsd/clang360-import/tmp/usr/lib/crtbeginS.o sh /home/sbruno/bsd/clang360-import/tools/install.sh -o root -g wheel -m 444 crtendS.o /var/tmp/mips.mips64/home/sbruno/bsd/clang360-import/tmp/usr/lib/crtendS.o ===> lib/csu/mips (obj,depend,all,install) sh /home/sbruno/bsd/clang360-import/tools/install.sh -o root -g wheel -m 444 crt1.o crti.o crtn.o Scrt1.o gcrt1.o /var/tmp/mips.mips64/home/sbruno/bsd/clang360-import/tmp/usr/lib ===> lib/libc (obj,depend,all,install) cc -O -pipe -G0 -I/home/sbruno/bsd/clang360-import/lib/libc/include -I/home/sbruno/bsd/clang360-import/lib/libc/../../include -I/home/sbruno/bsd/clang360-import/lib/libc/mips -DNLS -DSOFTFLOAT -D__DBINTERFACE_PRIVATE -I/home/sbruno/bsd/clang360-import/lib/libc/../../contrib/gdtoa -I/home/sbruno/bsd/clang360-import/lib/libc/../../contrib/libc-vis -DINET6 -I/var/tmp/mips.mips64/home/sbruno/bsd/clang360-import/lib/libc -I/home/sbruno/bsd/clang360-import/lib/libc/resolv -D_ACL_PRIVATE -DPOSIX_MISTAKE -I/home/sbruno/bsd/clang360-import/lib/libc/../libmd -I/home/sbruno/bsd/clang360-import/lib/libc/../../contrib/jemalloc/include -DMALLOC_PRODUCTION -I/home/sbruno/bsd/clang360-import/lib/libc/../../contrib/tzcode/stdtime -I/home/sbruno/bsd/clang360-import/lib/libc/stdtime -I/home/sbruno/bsd/clang360-import/lib/libc/locale -DBROKEN_DES -DPORTMAP -DDES_BUILTIN -I/home/sbruno/bsd/clang360-import/lib/libc/rpc -I/home/sbruno/bsd/clang360-import/lib/libc/mips/softfloat -I/home/sbruno/bsd/clang360-import/lib/libc/softfloat -DSOFTFLOAT_FOR_GCC -DYP -DNS_CACHING -DSYMBOL_VERSIONING -DSYSCALL_COMPAT -std=gnu99 -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter -Qunused-arguments -c /home/sbruno/bsd/clang360-import/lib/libc/mips/gen/_ctx_start.S /home/sbruno/bsd/clang360-import/lib/libc/mips/gen/_ctx_start.S:37:2: error: unknown instruction dla $25, _ctx_done ^ *** Error code 1 Stop. make[4]: stopped in /home/sbruno/bsd/clang360-import/lib/libc *** Error code 1 Stop. make[3]: stopped in /home/sbruno/bsd/clang360-import *** Error code 1 Stop. make[2]: stopped in /home/sbruno/bsd/clang360-import *** Error code 1 Stop. make[1]: stopped in /home/sbruno/bsd/clang360-import *** Error code 1 Stop. make: stopped in /home/sbruno/bsd/clang360-import
(In reply to Sean Bruno from comment #19) http://llvm.org/bugs/show_bug.cgi?id=22618 has been created for this issue.
(In reply to Sean Bruno from comment #18) http://reviews.llvm.org/D7697 has been committed to the llvm repo: http://llvm.org/viewvc/llvm-project?view=revision&revision=229671
After configuring clang from head and freebsd from head, errors are seen for this target with its handling of .cpsetup still /home/sbruno/clang/build/bin/clang -target mips64-unknown-freebsd11.0 --sysroot=/var/tmp/mips.mips64/usr/home/sbruno/freebsd/tmp -B/var/tmp/mips.mips64/usr/home/sbruno/freebsd/tmp/usr/bin -O -pipe -G0 -I/usr/home/sbruno/freebsd/lib/libc/include -I/usr/home/sbruno/freebsd/lib/libc/../../include -I/usr/home/sbruno/freebsd/lib/libc/mips -DNLS -DSOFTFLOAT -D__DBINTERFACE_PRIVATE -I/usr/home/sbruno/freebsd/lib/libc/../../contrib/gdtoa -I/usr/home/sbruno/freebsd/lib/libc/../../contrib/libc-vis -DINET6 -I/var/tmp/mips.mips64/usr/home/sbruno/freebsd/lib/libc -I/usr/home/sbruno/freebsd/lib/libc/resolv -D_ACL_PRIVATE -DPOSIX_MISTAKE -I/usr/home/sbruno/freebsd/lib/libc/../libmd -I/usr/home/sbruno/freebsd/lib/libc/../../contrib/jemalloc/include -DMALLOC_PRODUCTION -I/usr/home/sbruno/freebsd/lib/libc/../../contrib/tzcode/stdtime -I/usr/home/sbruno/freebsd/lib/libc/stdtime -I/usr/home/sbruno/freebsd/lib/libc/locale -DBROKEN_DES -DPORTMAP -DDES_BUILTIN -I/usr/home/sbruno/freebsd/lib/libc/rpc -I/usr/home/sbruno/freebsd/lib/libc/mips/softfloat -I/usr/home/sbruno/freebsd/lib/libc/softfloat -DSOFTFLOAT_FOR_GCC -DYP -DNS_CACHING -DSYMBOL_VERSIONING -std=gnu99 -Wsystem-headers -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter -Qunused-arguments -c /usr/home/sbruno/freebsd/lib/libc/mips/gen/setjmp.S -o setjmp.o /usr/home/sbruno/freebsd/lib/libc/mips/gen/setjmp.S:69:16: error: expected save register or stack offset .cpsetup $25, ((8 * 4) - 3 * 8), setjmp ^ /usr/home/sbruno/freebsd/lib/libc/mips/gen/setjmp.S:81:2: error: unknown directive .cpreturn ^ *** Error code 1 Stop. make[4]: stopped in /usr/home/sbruno/freebsd/lib/libc *** Error code 1
batch change: For bugs that match the following - Status Is In progress AND - Untouched since 2018-01-01. AND - Affects Base System OR Documentation DO: Reset to open status. Note: I did a quick pass but if you are getting this email it might be worthwhile to double check to see if this bug ought to be closed.