]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/commit
MFC r234502:
authordim <dim@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 27 Apr 2012 06:49:35 +0000 (06:49 +0000)
committerdim <dim@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 27 Apr 2012 06:49:35 +0000 (06:49 +0000)
commit42e994f666b2a4676f1843f8f5e38d8416cb7592
treeb257b43638a636ab084ae2879ef6d18d77901155
parent1ed04e874203f59a7955e0153b3d48ea07b6ec25
MFC r234502:

After r217375, some startup objects under lib/csu are built in a special
way: first they are compiled to assembly, then some sed'ing is done on
the assembly, and lastly the assembly is compiled to an object file.

This last step is done using ${CC}, and not ${AS}, because when the
compiler is clang, it outputs directives that are too advanced for our
old gas.  So we use clang's integrated assembler instead.  (When the
compiler is gcc, it just calls gas, and nothing is different, except one
extra fork.)

However, in the .s to .o rules in lib/csu/$ARCH/Makefile, I still passed
CFLAGS to the compiler, instead of ACFLAGS, which are specifically for
compiling .s files.

In case you are using '-g' for debug info anywhere in your CFLAGS, it
causes the .s files to already contain debug information in the assembly
itself.  In the next step, the .s files are also compiled using '-g',
and if the compiler is clang, it complains: "error: input can't have
.file dwarf directives when -g is used to generate dwarf debug info for
assembly code".

Fix this by using ${ACFLAGS} for compiling the .s files instead.

Reported by: jasone

git-svn-id: svn://svn.freebsd.org/base/stable/9@234726 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
lib/csu/amd64/Makefile
lib/csu/arm/Makefile
lib/csu/i386-elf/Makefile
lib/csu/ia64/Makefile
lib/csu/mips/Makefile
lib/csu/powerpc/Makefile
lib/csu/powerpc64/Makefile