11) Allow recipe to overide optimization.
2
3fixes:
4
5397 | #  warning _FORTIFY_SOURCE requires compiling with optimization (-O)
6|       |    ^~~~~~~
7| cc1: all warnings being treated as errors
8
92) Allow recipe to override OE related compile-/link-flags
10
11fixes:
12
13ERROR: QA Issue: File /usr/bin/tpm_server in package ibmswtpm2 doesn't have GNU_HASH (didn't pass LDFLAGS?) [ldflags]
14
15Upstream-Status: Inappropriate [OE specific]
16
17Signed-off-by: Jens Rehsack <sno@NetBSD.org>
18
19Index: src/makefile
20===================================================================
21--- src.orig/makefile
22+++ src/makefile
23@@ -38,13 +38,11 @@
24 #################################################################################
25
26
27-CC = /usr/bin/gcc
28-
29 CCFLAGS = -Wall  			\
30 	-Wmissing-declarations -Wmissing-prototypes -Wnested-externs \
31 	-Werror -Wsign-compare \
32 	-Wno-deprecated-declarations	\
33-	 -c -ggdb -O0 			\
34+	 -c -ggdb -O 			\
35 	-DTPM_POSIX			\
36 	-D_POSIX_			\
37 	-DTPM_NUVOTON
38@@ -80,11 +78,11 @@ TcpServerPosix.o	: $(HEADERS)
39 .PRECIOUS:	%.o
40
41 tpm_server:	$(OBJFILES)
42-		$(CC) $(OBJFILES) $(LNFLAGS) -o tpm_server
43+		$(CCLD) $(OBJFILES) $(LDFLAGS) $(LNFLAGS) -o tpm_server
44
45 clean:
46 		rm -f *.o tpm_server *~
47
48 %.o:		%.c
49-		$(CC) $(CCFLAGS) $< -o $@
50+		$(CC) $(CCFLAGS) $(CFLAGS) $< -o $@
51
52