All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mk: use extra cflags when linking libs with a compiler
@ 2017-07-25 15:03 Gage Eads
  2017-07-31 21:44 ` Thomas Monjalon
  2017-07-31 21:49 ` [PATCH v2] " Gage Eads
  0 siblings, 2 replies; 5+ messages in thread
From: Gage Eads @ 2017-07-25 15:03 UTC (permalink / raw)
  To: dev; +Cc: thomas

When using the compiler to link libraries, include EXTRA_CFLAGS. This is
needed when cross-compiling to pass --sysroot, for example. GCC
cross-compilers built with Yocto don't use the --with-sysroot option,
making it necessary to pass the --sysroot command-line option.

This is the same solution as in commit e8fbb6d9cfd9 ("mk: use extra cflags
when linking with compiler"), but applied to libs instead of apps.
---
 mk/rte.lib.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mk/rte.lib.mk b/mk/rte.lib.mk
index bc2f2fb..13115d1 100644
--- a/mk/rte.lib.mk
+++ b/mk/rte.lib.mk
@@ -77,7 +77,7 @@ exe2cmd = $(strip $(call dotfile,$(patsubst %,%.cmd,$(1))))
 
 ifeq ($(LINK_USING_CC),1)
 # Override the definition of LD here, since we're linking with CC
-LD := $(CC) $(CPU_CFLAGS)
+LD := $(CC) $(CPU_CFLAGS) $(EXTRA_CFLAGS)
 _CPU_LDFLAGS := $(call linkerprefix,$(CPU_LDFLAGS))
 override EXTRA_LDFLAGS := $(call linkerprefix,$(EXTRA_LDFLAGS))
 else
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] mk: use extra cflags when linking libs with a compiler
  2017-07-25 15:03 [PATCH] mk: use extra cflags when linking libs with a compiler Gage Eads
@ 2017-07-31 21:44 ` Thomas Monjalon
  2017-07-31 21:46   ` Eads, Gage
  2017-07-31 21:49 ` [PATCH v2] " Gage Eads
  1 sibling, 1 reply; 5+ messages in thread
From: Thomas Monjalon @ 2017-07-31 21:44 UTC (permalink / raw)
  To: Gage Eads; +Cc: dev

25/07/2017 17:03, Gage Eads:
> When using the compiler to link libraries, include EXTRA_CFLAGS. This is
> needed when cross-compiling to pass --sysroot, for example. GCC
> cross-compilers built with Yocto don't use the --with-sysroot option,
> making it necessary to pass the --sysroot command-line option.
> 
> This is the same solution as in commit e8fbb6d9cfd9 ("mk: use extra cflags
> when linking with compiler"), but applied to libs instead of apps.
> ---
>  mk/rte.lib.mk | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

You forgot the Signed-off-by line.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] mk: use extra cflags when linking libs with a compiler
  2017-07-31 21:44 ` Thomas Monjalon
@ 2017-07-31 21:46   ` Eads, Gage
  0 siblings, 0 replies; 5+ messages in thread
From: Eads, Gage @ 2017-07-31 21:46 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev

Sure, will fix that now. I was just waiting for any other feedback to include in a v2.

> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas@monjalon.net]
> Sent: Monday, July 31, 2017 4:44 PM
> To: Eads, Gage <gage.eads@intel.com>
> Cc: dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH] mk: use extra cflags when linking libs with a
> compiler
> 
> 25/07/2017 17:03, Gage Eads:
> > When using the compiler to link libraries, include EXTRA_CFLAGS. This
> > is needed when cross-compiling to pass --sysroot, for example. GCC
> > cross-compilers built with Yocto don't use the --with-sysroot option,
> > making it necessary to pass the --sysroot command-line option.
> >
> > This is the same solution as in commit e8fbb6d9cfd9 ("mk: use extra
> > cflags when linking with compiler"), but applied to libs instead of apps.
> > ---
> >  mk/rte.lib.mk | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> You forgot the Signed-off-by line.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH v2] mk: use extra cflags when linking libs with a compiler
  2017-07-25 15:03 [PATCH] mk: use extra cflags when linking libs with a compiler Gage Eads
  2017-07-31 21:44 ` Thomas Monjalon
@ 2017-07-31 21:49 ` Gage Eads
  2017-07-31 21:56   ` Thomas Monjalon
  1 sibling, 1 reply; 5+ messages in thread
From: Gage Eads @ 2017-07-31 21:49 UTC (permalink / raw)
  To: dev; +Cc: thomas

When using the compiler to link libraries, include EXTRA_CFLAGS. This is
needed when cross-compiling to pass --sysroot, for example. GCC
cross-compilers built with Yocto don't use the --with-sysroot option,
making it necessary to pass the --sysroot command-line option.

This is the same solution as in commit e8fbb6d9cfd9 ("mk: use extra cflags
when linking with compiler"), but applied to libs instead of apps.

Signed-off-by: Gage Eads <gage.eads@intel.com>
---
v2: Added missing Signed-off-by field

 mk/rte.lib.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mk/rte.lib.mk b/mk/rte.lib.mk
index bc2f2fb..13115d1 100644
--- a/mk/rte.lib.mk
+++ b/mk/rte.lib.mk
@@ -77,7 +77,7 @@ exe2cmd = $(strip $(call dotfile,$(patsubst %,%.cmd,$(1))))
 
 ifeq ($(LINK_USING_CC),1)
 # Override the definition of LD here, since we're linking with CC
-LD := $(CC) $(CPU_CFLAGS)
+LD := $(CC) $(CPU_CFLAGS) $(EXTRA_CFLAGS)
 _CPU_LDFLAGS := $(call linkerprefix,$(CPU_LDFLAGS))
 override EXTRA_LDFLAGS := $(call linkerprefix,$(EXTRA_LDFLAGS))
 else
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH v2] mk: use extra cflags when linking libs with a compiler
  2017-07-31 21:49 ` [PATCH v2] " Gage Eads
@ 2017-07-31 21:56   ` Thomas Monjalon
  0 siblings, 0 replies; 5+ messages in thread
From: Thomas Monjalon @ 2017-07-31 21:56 UTC (permalink / raw)
  To: Gage Eads; +Cc: dev

31/07/2017 23:49, Gage Eads:
> When using the compiler to link libraries, include EXTRA_CFLAGS. This is
> needed when cross-compiling to pass --sysroot, for example. GCC
> cross-compilers built with Yocto don't use the --with-sysroot option,
> making it necessary to pass the --sysroot command-line option.
> 
> This is the same solution as in commit e8fbb6d9cfd9 ("mk: use extra cflags
> when linking with compiler"), but applied to libs instead of apps.
> 
> Signed-off-by: Gage Eads <gage.eads@intel.com>

Applied, thanks

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-07-31 21:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-25 15:03 [PATCH] mk: use extra cflags when linking libs with a compiler Gage Eads
2017-07-31 21:44 ` Thomas Monjalon
2017-07-31 21:46   ` Eads, Gage
2017-07-31 21:49 ` [PATCH v2] " Gage Eads
2017-07-31 21:56   ` Thomas Monjalon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.