diff options
Diffstat (limited to '0005-Makefile-Allow-setting-custom-compiler-flags.patch')
-rw-r--r-- | 0005-Makefile-Allow-setting-custom-compiler-flags.patch | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/0005-Makefile-Allow-setting-custom-compiler-flags.patch b/0005-Makefile-Allow-setting-custom-compiler-flags.patch new file mode 100644 index 0000000..5ba0536 --- /dev/null +++ b/0005-Makefile-Allow-setting-custom-compiler-flags.patch @@ -0,0 +1,49 @@ +From 910e5ec42b7d04e4d7e650f8bd20afd06f418ae5 Mon Sep 17 00:00:00 2001 +From: Phil Sutter <psutter@redhat.com> +Date: Fri, 25 Nov 2016 12:22:13 +0100 +Subject: [PATCH] Makefile: Allow setting custom compiler flags + +This allows to override CC variable and to extend CFLAGS, LDFLAGS and +LDLIBS variables. + +Signed-off-by: Phil Sutter <psutter@redhat.com> +--- + src/Makefile | 8 ++++---- + test/Makefile | 2 +- + 2 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/src/Makefile b/src/Makefile +index b8b0188502189..19e3785665a86 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -7,10 +7,10 @@ + # + # (C) Fabio Busatto <fabio.busatto@gmail.com> + +-CC=gcc +-CFLAGS=-fPIC -ansi -pedantic -Wall +-LDFLAGS=-shared -Wl,-soname,libkeepalive.so +-LDLIBS=-ldl ++CC := gcc ++CFLAGS += -fPIC -ansi -pedantic -Wall ++LDFLAGS += -shared -Wl,-soname,libkeepalive.so ++LDLIBS += -ldl + + default: libkeepalive.so + +diff --git a/test/Makefile b/test/Makefile +index 6baf822c2338d..6a279a0ac6b94 100644 +--- a/test/Makefile ++++ b/test/Makefile +@@ -7,7 +7,7 @@ + # + # (C) Fabio Busatto <fabio.busatto@gmail.com> + +-CC=gcc ++CC := gcc + + default: test + +-- +2.10.0 + |