Introduce make variable ACFLAGS used to supply additional flags to

cc driver when compiling assembler source file that is preprocessed.
This commit is contained in:
Konstantin Belousov 2011-01-07 14:32:29 +00:00
parent 8863c9c75e
commit 5ada7d99af
2 changed files with 8 additions and 6 deletions

View File

@ -120,26 +120,27 @@ PO_FLAG=-pg
${CTFCONVERT} ${CTFFLAGS} ${.TARGET})
.asm.po:
${CC} -x assembler-with-cpp -DPROF ${PO_CFLAGS} -c ${.IMPSRC} -o ${.TARGET}
${CC} -x assembler-with-cpp -DPROF ${PO_CFLAGS} ${ACFLAGS} \
-c ${.IMPSRC} -o ${.TARGET}
@[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \
(${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \
${CTFCONVERT} ${CTFFLAGS} ${.TARGET})
.asm.So:
${CC} -x assembler-with-cpp ${PICFLAG} -DPIC ${CFLAGS} \
${CC} -x assembler-with-cpp ${PICFLAG} -DPIC ${CFLAGS} ${ACFLAGS} \
-c ${.IMPSRC} -o ${.TARGET}
@[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \
(${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \
${CTFCONVERT} ${CTFFLAGS} ${.TARGET})
.S.po:
${CC} -DPROF ${PO_CFLAGS} -c ${.IMPSRC} -o ${.TARGET}
${CC} -DPROF ${PO_CFLAGS} ${ACFLAGS} -c ${.IMPSRC} -o ${.TARGET}
@[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \
(${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \
${CTFCONVERT} ${CTFFLAGS} ${.TARGET})
.S.So:
${CC} ${PICFLAG} -DPIC ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET}
${CC} ${PICFLAG} -DPIC ${CFLAGS} ${ACFLAGS} -c ${.IMPSRC} -o ${.TARGET}
@[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \
(${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \
${CTFCONVERT} ${CTFFLAGS} ${.TARGET})

View File

@ -41,6 +41,7 @@ RANLIB ?= ranlib
AS ?= as
AFLAGS ?=
ACFLAGS ?=
.if defined(%POSIX)
CC ?= c89
@ -275,13 +276,13 @@ YFLAGS ?= -d
${FC} ${RFLAGS} ${EFLAGS} ${FFLAGS} -c ${.IMPSRC}
.S.o:
${CC} ${CFLAGS} -c ${.IMPSRC}
${CC} ${CFLAGS} ${ACFLAGS} -c ${.IMPSRC}
@[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \
(${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \
${CTFCONVERT} ${CTFFLAGS} ${.TARGET})
.asm.o:
${CC} -x assembler-with-cpp ${CFLAGS} -c ${.IMPSRC}
${CC} -x assembler-with-cpp ${CFLAGS} ${ACFLAGS} -c ${.IMPSRC}
@[ -z "${CTFCONVERT}" -o -n "${NO_CTF}" ] || \
(${ECHO} ${CTFCONVERT} ${CTFFLAGS} ${.TARGET} && \
${CTFCONVERT} ${CTFFLAGS} ${.TARGET})