diff mbox

[v2,2/5] config/StdGNU.mk: Allows users to pass in EXTRA_CFLAGS

Message ID 1482263220-3233-3-git-send-email-alistair.francis@xilinx.com (mailing list archive)
State New, archived
Headers show

Commit Message

Alistair Francis Dec. 20, 2016, 7:46 p.m. UTC
Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>
---
 config/StdGNU.mk | 3 +++
 1 file changed, 3 insertions(+)

Comments

Douglas Goldstein Dec. 20, 2016, 7:51 p.m. UTC | #1
On 12/20/16 1:46 PM, Alistair Francis wrote:
> Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>
> ---
>  config/StdGNU.mk | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/config/StdGNU.mk b/config/StdGNU.mk
> index 6be8233..a6cdd82 100644
> --- a/config/StdGNU.mk
> +++ b/config/StdGNU.mk
> @@ -35,6 +35,9 @@ UTIL_LIBS = -lutil
>  SONAME_LDFLAG = -soname
>  SHLIB_LDFLAGS = -shared
>  
> +# Allow users to add extra CFLAGS
> +CFLAGS += $(EXTRA_CFLAGS)
> +
>  ifeq ($(lto),y)
>  CFLAGS += -flto
>  LDFLAGS-$(clang) += -plugin LLVMgold.so
> 

Reviewed-by: Doug Goldstein <cardoe@cardoe.com>
Wei Liu Dec. 21, 2016, 12:05 p.m. UTC | #2
On Tue, Dec 20, 2016 at 11:46:57AM -0800, Alistair Francis wrote:
> Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>
> ---
>  config/StdGNU.mk | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/config/StdGNU.mk b/config/StdGNU.mk
> index 6be8233..a6cdd82 100644
> --- a/config/StdGNU.mk
> +++ b/config/StdGNU.mk
> @@ -35,6 +35,9 @@ UTIL_LIBS = -lutil
>  SONAME_LDFLAG = -soname
>  SHLIB_LDFLAGS = -shared
>  
> +# Allow users to add extra CFLAGS
> +CFLAGS += $(EXTRA_CFLAGS)
> +

Assuming you mostly want to eliminate tools build flag(s) -- there are
already two things for similar tasks: APPEND_CFLAGS and
EXTRA_CFLAGS_XEN_TOOLS. Do they not fit for your purpose?

>  ifeq ($(lto),y)
>  CFLAGS += -flto
>  LDFLAGS-$(clang) += -plugin LLVMgold.so
> -- 
> 2.7.4
>
Jan Beulich Dec. 22, 2016, 8:43 a.m. UTC | #3
>>> On 20.12.16 at 20:46, <alistair.francis@xilinx.com> wrote:
> --- a/config/StdGNU.mk
> +++ b/config/StdGNU.mk
> @@ -35,6 +35,9 @@ UTIL_LIBS = -lutil
>  SONAME_LDFLAG = -soname
>  SHLIB_LDFLAGS = -shared
>  
> +# Allow users to add extra CFLAGS
> +CFLAGS += $(EXTRA_CFLAGS)

Along the lines of Wei's reply - please remember that this controls
both tools and hypervisor builds, yet it seems quite possible that
intended overrides may only be for one of the two.

Jan
diff mbox

Patch

diff --git a/config/StdGNU.mk b/config/StdGNU.mk
index 6be8233..a6cdd82 100644
--- a/config/StdGNU.mk
+++ b/config/StdGNU.mk
@@ -35,6 +35,9 @@  UTIL_LIBS = -lutil
 SONAME_LDFLAG = -soname
 SHLIB_LDFLAGS = -shared
 
+# Allow users to add extra CFLAGS
+CFLAGS += $(EXTRA_CFLAGS)
+
 ifeq ($(lto),y)
 CFLAGS += -flto
 LDFLAGS-$(clang) += -plugin LLVMgold.so