# FIRMWARE_ARCH is defined if compiling for a firmware target
# (coreboot or depthcharge).
+CFLAGS += $(CPPFLAGS)
ifeq (${FIRMWARE_ARCH},arm)
CC ?= armv7a-cros-linux-gnueabihf-gcc
CFLAGS ?= -march=armv5 -fno-common -ffixed-r8 -mfloat-abi=hard -marm
${BUILD}/%.o: %.c
@${PRINTF} " CC $(subst ${BUILD}/,,$@)\n"
- ${Q}${CC} ${CFLAGS} ${INCLUDES} -c -o $@ $<
+ ${Q}${CC} ${CFLAGS} ${LDFLAGS} ${INCLUDES} -c -o $@ $<
${BUILD}/%.o: ${BUILD}/%.c
@${PRINTF} " CC $(subst ${BUILD}/,,$@)\n"
- ${Q}${CC} ${CFLAGS} ${INCLUDES} -c -o $@ $<
+ ${Q}${CC} ${CFLAGS} ${LDFLAGS} ${INCLUDES} -c -o $@ $<
# ----------------------------------------------------------------------------
# Here are the special tweaks to the generic rules.