To simplify integration of tboot into build systems such as OpenEmbeddded, use softer assignments and appends to define the build tool and flag variables.
Signed-off-by: Christopher Clark <christopher.w.cl...@gmail.com> This patch is based on an OpenXT patch by Eric Chanudet: https://github.com/OpenXT/xenclient-oe/blob/fc13893594f684baea65b7ee09066a8ddb840b4d/recipes-security/tboot/tboot-1.9.9/0001-config-Allow-build-system-integration.patch diff -r 0db8feeba423 -r dcec96ce7d2c Config.mk --- a/Config.mk Thu Dec 12 12:09:20 2019 +0100 +++ b/Config.mk Fri Jan 24 10:03:42 2020 -0800 @@ -45,22 +45,22 @@ $(call cc-option,$(CC),-Wlogical-op,) \ -Wno-missing-field-initializers -AS = as -LD = ld -CC = gcc -CPP = cpp -AR = ar -RANLIB = ranlib -NM = nm -STRIP = strip -OBJCOPY = objcopy -OBJDUMP = objdump +AS ?= as +LD ?= ld +CC ?= gcc +CPP ?= cpp +AR ?= ar +RANLIB ?= ranlib +NM ?= nm +STRIP ?= strip +OBJCOPY ?= objcopy +OBJDUMP ?= objdump ifeq ($(debug),n) -INSTALL_STRIP = -s +INSTALL_STRIP ?= -s endif -INSTALL = install +INSTALL ?= install INSTALL_DIR = $(INSTALL) -d -m0755 -p INSTALL_DATA = $(INSTALL) -m0644 -p INSTALL_PROG = $(INSTALL) $(INSTALL_STRIP) -m0755 -p diff -r 0db8feeba423 -r dcec96ce7d2c safestringlib/makefile --- a/safestringlib/makefile Thu Dec 12 12:09:20 2019 +0100 +++ b/safestringlib/makefile Fri Jan 24 10:03:42 2020 -0800 @@ -1,7 +1,7 @@ IDIR = include -CC=gcc -CFLAGS=-I$(IDIR) -fstack-protector-strong -fPIE -fPIC -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -DSTDC_HEADERS -LDFLAGS=-z noexecstack -z relo -z now +CC ?= gcc +CFLAGS += -I$(IDIR) -fstack-protector-strong -fPIE -fPIC -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -DSTDC_HEADERS +LDFLAGS += -z noexecstack -z relo -z now ODIR=obj OTDIR=objtest _______________________________________________ tboot-devel mailing list tboot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tboot-devel