Date: Sun, 17 Jul 2011 16:03:46 +0200 From: Dimitry Andric <dim@FreeBSD.org> To: Doug Barton <dougb@FreeBSD.org> Cc: FreeBSD Current <freebsd-current@FreeBSD.org> Subject: Re: sys/boot/i386/boot2 build failure with clang Message-ID: <4E22EBC2.4070802@FreeBSD.org> In-Reply-To: <4E22B560.4040401@FreeBSD.org> References: <4E22B560.4040401@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2011-07-17 12:11, Doug Barton wrote: > Trying to build r224125 with clang, and got this (using no -j): ... > as --32 -o boot2.o boot2.s > boot2.s: Assembler messages: > boot2.s:4073: Error: unknown pseudo-op: `.cfi_sections' When using -g, clang outputs directives that are simply too new for our binutils. The way that sys/boot/i386/boot2 and zfsboot are processed is special: 1) The boot2.c code is compiled with -S, to boot2.s.tmp 2) boot2.s.tmp is processed using sed, to remove any alignment directives and filler nops, to reduce the code size 3) The resulting boot2.s is assembled, using plain 'as' In step 3, GNU as chokes on the assembly produced by clang, when you use certain CFLAGS or DEBUG_FLAGS (-g being one of them). When compiling .c to .o files normally, this is never a problem, since clang uses its integrated assembler to output an object file. In any case, I have committed a fix in r224131, let me know how that works out for you.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4E22EBC2.4070802>