freebsd-dev/lib/csu
Dimitry Andric d2cc835cb5 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
MFC after:	1 week
2012-04-20 21:00:39 +00:00
..
amd64 After r217375, some startup objects under lib/csu are built in a special 2012-04-20 21:00:39 +00:00
arm After r217375, some startup objects under lib/csu are built in a special 2012-04-20 21:00:39 +00:00
common Stop calling _init/_fini methods from crt1 for dynamic binaries. Do 2012-03-11 20:04:09 +00:00
i386-elf After r217375, some startup objects under lib/csu are built in a special 2012-04-20 21:00:39 +00:00
ia64 After r217375, some startup objects under lib/csu are built in a special 2012-04-20 21:00:39 +00:00
mips After r217375, some startup objects under lib/csu are built in a special 2012-04-20 21:00:39 +00:00
powerpc After r217375, some startup objects under lib/csu are built in a special 2012-04-20 21:00:39 +00:00
powerpc64 After r217375, some startup objects under lib/csu are built in a special 2012-04-20 21:00:39 +00:00
sparc64 Stop calling _init/_fini methods from crt1 for dynamic binaries. Do 2012-03-11 20:04:09 +00:00
Makefile.inc Stop calling _init/_fini methods from crt1 for dynamic binaries. Do 2012-03-11 20:04:09 +00:00