Andrew Geissler | cc58928 | 2020-09-18 13:34:40 -0500 | [diff] [blame] | 1 | 1) Allow recipe to overide optimization. |
| 2 | |
| 3 | fixes: |
| 4 | |
| 5 | 397 | # warning _FORTIFY_SOURCE requires compiling with optimization (-O) |
| 6 | | | ^~~~~~~ |
| 7 | | cc1: all warnings being treated as errors |
| 8 | |
| 9 | 2) Allow recipe to override OE related compile-/link-flags |
| 10 | |
| 11 | fixes: |
| 12 | |
| 13 | ERROR: QA Issue: File /usr/bin/tpm_server in package ibmswtpm2 doesn't have GNU_HASH (didn't pass LDFLAGS?) [ldflags] |
| 14 | |
| 15 | Upstream-Status: OE specific |
| 16 | |
| 17 | Signed-off-by: Jens Rehsack <sno@NetBSD.org> |
| 18 | |
| 19 | Index: src/makefile |
| 20 | =================================================================== |
| 21 | --- src.orig/makefile |
| 22 | +++ src/makefile |
Patrick Williams | db4c27e | 2022-08-05 08:10:29 -0500 | [diff] [blame] | 23 | @@ -38,13 +38,11 @@ |
Andrew Geissler | cc58928 | 2020-09-18 13:34:40 -0500 | [diff] [blame] | 24 | ################################################################################# |
| 25 | |
| 26 | |
| 27 | -CC = /usr/bin/gcc |
| 28 | - |
| 29 | CCFLAGS = -Wall \ |
| 30 | -Wmissing-declarations -Wmissing-prototypes -Wnested-externs \ |
| 31 | -Werror -Wsign-compare \ |
Patrick Williams | db4c27e | 2022-08-05 08:10:29 -0500 | [diff] [blame] | 32 | -Wno-deprecated-declarations \ |
Andrew Geissler | cc58928 | 2020-09-18 13:34:40 -0500 | [diff] [blame] | 33 | - -c -ggdb -O0 \ |
| 34 | + -c -ggdb -O \ |
| 35 | -DTPM_POSIX \ |
| 36 | -D_POSIX_ \ |
| 37 | -DTPM_NUVOTON |
Patrick Williams | db4c27e | 2022-08-05 08:10:29 -0500 | [diff] [blame] | 38 | @@ -80,11 +78,11 @@ TcpServerPosix.o : $(HEADERS) |
Andrew Geissler | cc58928 | 2020-09-18 13:34:40 -0500 | [diff] [blame] | 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 | |