File: upstream_changeset_664.patch

package info (click to toggle)
tboot 1.10.5-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 6,020 kB
  • sloc: ansic: 56,029; python: 6,595; perl: 2,303; sh: 455; asm: 442; makefile: 377
file content (61 lines) | stat: -rw-r--r-- 2,318 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# HG changeset patch
# User Timo Lindfors <timo.lindfors@iki.fi>
# Date 1655455151 -10800
#      Fri Jun 17 11:39:11 2022 +0300
# Node ID 2bd7c7a33d49ffeb01edd0306b581b9f320316e6
# Parent  206a47f3e9d2c18c8a3db082216ee6fc3c5d475c
Use CPPFLAGS supplied by the environment during the build

This makes it possible to use distribution-wide security hardening
options automatically with tboot builds. This commit only adds
CPPFLAGS to userland utilities as there is a risk of regressions if
such hardening options are set for the tboot binary itself.

diff -r 206a47f3e9d2 -r 2bd7c7a33d49 lcptools-v2/Makefile
--- a/lcptools-v2/Makefile	Thu Mar 17 23:58:50 2022 +0200
+++ b/lcptools-v2/Makefile	Fri Jun 17 11:39:11 2022 +0300
@@ -93,4 +93,4 @@
 BUILD_DEPS := $(ROOTDIR)/Config.mk $(CURDIR)/Makefile
 
 %.o : %.c $(HDRS) $(BUILD_DEPS)
-	$(CC) $(CFLAGS) -DNO_TBOOT_LOGLVL -c $< -o $@
+	$(CC) $(CFLAGS) $(CPPFLAGS) -DNO_TBOOT_LOGLVL -c $< -o $@
diff -r 206a47f3e9d2 -r 2bd7c7a33d49 safestringlib/makefile
--- a/safestringlib/makefile	Thu Mar 17 23:58:50 2022 +0200
+++ b/safestringlib/makefile	Fri Jun 17 11:39:11 2022 +0300
@@ -26,7 +26,7 @@
 
 $(ODIR)/%.o: $(SRCDIR)/%.c $(DEPS) $(ODEPS)
 	mkdir -p $(ODIR)
-	$(CC) $(LDFLAGS) -c -o $@ $< $(CFLAGS)
+	$(CC) $(LDFLAGS) -c -o $@ $< $(CFLAGS) $(CPPFLAGS)
 
 libsafestring.a: $(OBJ)
 	ar rcs $@ $^ 
@@ -41,7 +41,7 @@
 
 $(OTDIR)/%.o: $(TESTDIR)/%.c $(TESTDIR)/test_private.h
 	mkdir -p $(OTDIR)
-	$(CC) -c -o $@ $< $(CFLAGS)
+	$(CC) -c -o $@ $< $(CFLAGS) $(CPPFLAGS)
 
 
 safestringtest: libsafestring.a $(TOBJ)
diff -r 206a47f3e9d2 -r 2bd7c7a33d49 tb_polgen/Makefile
--- a/tb_polgen/Makefile	Thu Mar 17 23:58:50 2022 +0200
+++ b/tb_polgen/Makefile	Fri Jun 17 11:39:11 2022 +0300
@@ -62,4 +62,4 @@
 BUILD_DEPS := $(ROOTDIR)/Config.mk $(CURDIR)/Makefile
 
 %.o : %.c $(HDRS) $(BUILD_DEPS)
-	$(CC) $(CFLAGS) -DNO_TBOOT_LOGLVL -c $< -o $@
+	$(CC) $(CFLAGS) $(CPPFLAGS) -DNO_TBOOT_LOGLVL -c $< -o $@
diff -r 206a47f3e9d2 -r 2bd7c7a33d49 utils/Makefile
--- a/utils/Makefile	Thu Mar 17 23:58:50 2022 +0200
+++ b/utils/Makefile	Fri Jun 17 11:39:11 2022 +0300
@@ -61,4 +61,4 @@
 txt-acminfo : txt-acminfo.o
 	$(CC) $(CFLAGS) $(LDFLAGS) $^ $(LIBS) -o $@
 %.o : %.c $(BUILD_DEPS)
-	$(CC) $(CFLAGS) -DNO_TBOOT_LOGLVL -c $< -o $@
+	$(CC) $(CFLAGS) $(CPPFLAGS) -DNO_TBOOT_LOGLVL -c $< -o $@