When building some of the boot loaders with clang, and DEBUG_FLAGS or
CFLAGS having '-g' in it, clang outputs several assembly directives that are too new for our version of binutils. Therefore, assemble the resulting .s files with clang instead. A more general solution can be implemented when a GNU as-compatible driver for clang's integrated assembler appears. Reported by: dougb
This commit is contained in:
parent
30ee9e615d
commit
ce3fb79719
@ -11,6 +11,7 @@ LDFLAGS+= -nostdlib
|
||||
|
||||
.if ${MACHINE_CPUARCH} == "amd64"
|
||||
CFLAGS+= -m32 -march=i386
|
||||
ACFLAGS+= -m32
|
||||
LDFLAGS+= -m elf_i386_fbsd
|
||||
AFLAGS+= --32
|
||||
.endif
|
||||
|
@ -89,6 +89,9 @@ boot2.out: ${BTXCRT} boot2.o sio.o
|
||||
${LD} ${LDFLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC}
|
||||
|
||||
boot2.o: boot2.s
|
||||
.if ${CC:T:Mclang} == "clang"
|
||||
${CC} ${ACFLAGS} -c boot2.s
|
||||
.endif
|
||||
|
||||
SRCS= boot2.c boot2.h
|
||||
|
||||
|
@ -86,6 +86,9 @@ zfsboot.out: ${BTXCRT} zfsboot.o sio.o drv.o cons.o util.o
|
||||
${LD} ${LDFLAGS} -Ttext ${ORG2} -o ${.TARGET} ${.ALLSRC} ${LIBSTAND}
|
||||
|
||||
zfsboot.o: zfsboot.s
|
||||
.if ${CC:T:Mclang} == "clang"
|
||||
${CC} ${ACFLAGS} -c zfsboot.s
|
||||
.endif
|
||||
|
||||
SRCS= zfsboot.c
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user