File: 0006-add-CPPFLAGS-LDFLAGS.patch

package info (click to toggle)
vboot-utils 0~R106-15054.B%2Bdfsg-0.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 28,592 kB
  • sloc: ansic: 48,956; sh: 9,637; makefile: 1,006; pascal: 77; python: 61
file content (36 lines) | stat: -rw-r--r-- 1,264 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
From: Marcin Juszkiewicz <marcin@juszkiewicz.com.pl>
Date: Mon, 10 Feb 2020 16:21:52 +0100
Subject: Add missing CPPFLAGS and LDFLAGS

Origin: Debian
Last-Update: 2020-10-27
---
 Makefile | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 95f2e5a..787fcf9 100644
--- a/Makefile
+++ b/Makefile
@@ -142,6 +142,7 @@ COMMON_FLAGS := -pipe ${WERROR} -Wall -Wstrict-prototypes -Wtype-limits \
 
 # 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
@@ -1150,11 +1151,11 @@ ${BUILD}/%: ${BUILD}/%.o ${OBJS} ${LIBS}
 
 ${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.