[Bug 227918] [PATCH] remove exists check for CROSS_BINUTILS_PREFIX for external clang builds on secondary arches

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Fri May 11 22:27:22 UTC 2018


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227918

--- Comment #13 from Mark Millard <marklmi26-fbsd at yahoo.com> ---
(In reply to Mark Millard from comment #12)

Use of -v with the erring command reported in comment 6 shows that it
tries to run the i386 assembler (based on the -triple it uses
to run the assembler and the -target-cpu that it specifies as well):

. . . 
 "/usr/local/llvm60/bin/clang-6.0" -cc1as -triple i386-portbld-freebsd12.0
-filetype obj -main-file-name crtn.S -target-cpu i486 -I
/usr/src/lib/csu/common -I /usr/src/lib/libc/include -fdebug-compilation-dir
/usr/src -dwarf-debug-producer clang version 6.0.0 (tags/RELEASE_600/final) -I
/usr/src/lib/csu/common -I /usr/src/lib/libc/include -debug-info-kind=limited
-dwarf-version=2 -mrelocation-model static -o crtn.o /tmp/crtn-d80df9.s
/usr/src/lib/csu/powerpc/crtn.S:29:2: warning: DWARF2 only supports one section
per compilation unit
 .section .init,"ax", at progbits
 ^
/usr/src/lib/csu/powerpc/crtn.S:30:11: error: unexpected token in memory
operand
 lwz 11,0(1)
          ^
/usr/src/lib/csu/powerpc/crtn.S:31:10: error: unexpected token in memory
operand
 lwz 0,4(11)
         ^
/usr/src/lib/csu/powerpc/crtn.S:32:2: error: invalid instruction mnemonic
'mtlr'
 mtlr 0
. . .


So -mcpu=powerpc -m32 on the clang60 command line was not enough
to cause targeting of powerpc for the assembler. May be a -triple
is required on the command line as well?

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-bugs mailing list