linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH i2c-tools] tools: allow to preset TOOLS_CFLAGS and TOOLS_LDFLAGS
@ 2020-08-05 22:05 Wolfram Sang
  2020-08-07  9:40 ` Jean Delvare
  0 siblings, 1 reply; 4+ messages in thread
From: Wolfram Sang @ 2020-08-05 22:05 UTC (permalink / raw)
  To: linux-i2c; +Cc: Jean Delvare, Wolfram Sang

Sometimes I need to add some flags (like -static for the linker), so
allow this.

Signed-off-by: Wolfram Sang <wsa@kernel.org>
---

Jean, what do you think?

 tools/Module.mk | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/Module.mk b/tools/Module.mk
index 693102f..f5b133d 100644
--- a/tools/Module.mk
+++ b/tools/Module.mk
@@ -9,13 +9,13 @@
 
 TOOLS_DIR	:= tools
 
-TOOLS_CFLAGS	:= -Wstrict-prototypes -Wshadow -Wpointer-arith -Wcast-qual \
+TOOLS_CFLAGS	+= -Wstrict-prototypes -Wshadow -Wpointer-arith -Wcast-qual \
 		   -Wcast-align -Wwrite-strings -Wnested-externs -Winline \
 		   -W -Wundef -Wmissing-prototypes -Iinclude
 ifeq ($(USE_STATIC_LIB),1)
-TOOLS_LDFLAGS	:= $(LIB_DIR)/$(LIB_STLIBNAME)
+TOOLS_LDFLAGS	+= $(LIB_DIR)/$(LIB_STLIBNAME)
 else
-TOOLS_LDFLAGS	:= -L$(LIB_DIR) -li2c
+TOOLS_LDFLAGS	+= -L$(LIB_DIR) -li2c
 endif
 
 TOOLS_TARGETS	:= i2cdetect i2cdump i2cset i2cget i2ctransfer
-- 
2.27.0


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

* Re: [PATCH i2c-tools] tools: allow to preset TOOLS_CFLAGS and TOOLS_LDFLAGS
  2020-08-05 22:05 [PATCH i2c-tools] tools: allow to preset TOOLS_CFLAGS and TOOLS_LDFLAGS Wolfram Sang
@ 2020-08-07  9:40 ` Jean Delvare
  2020-08-07  9:42   ` Wolfram Sang
  0 siblings, 1 reply; 4+ messages in thread
From: Jean Delvare @ 2020-08-07  9:40 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: linux-i2c

On Thu,  6 Aug 2020 00:05:55 +0200, Wolfram Sang wrote:
> Sometimes I need to add some flags (like -static for the linker), so
> allow this.

Does USE_STATIC_LIB=1 not work for you?

> 
> Signed-off-by: Wolfram Sang <wsa@kernel.org>
> ---
> 
> Jean, what do you think?

Fine with me. However for consistency I think it would make sense to do
the same in eeprog/Module.mk and lib/Module.mk?

-- 
Jean Delvare
SUSE L3 Support

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

* Re: [PATCH i2c-tools] tools: allow to preset TOOLS_CFLAGS and TOOLS_LDFLAGS
  2020-08-07  9:40 ` Jean Delvare
@ 2020-08-07  9:42   ` Wolfram Sang
  2020-08-07 14:55     ` Jean Delvare
  0 siblings, 1 reply; 4+ messages in thread
From: Wolfram Sang @ 2020-08-07  9:42 UTC (permalink / raw)
  To: Jean Delvare; +Cc: linux-i2c

[-- Attachment #1: Type: text/plain, Size: 433 bytes --]


> > Sometimes I need to add some flags (like -static for the linker), so
> > allow this.
> 
> Does USE_STATIC_LIB=1 not work for you?

For some embedded devices, I need full static because they use a libc I
don't have at hand.

> > Jean, what do you think?
> 
> Fine with me. However for consistency I think it would make sense to do
> the same in eeprog/Module.mk and lib/Module.mk?

Sure, will add it.

Thanks!


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH i2c-tools] tools: allow to preset TOOLS_CFLAGS and TOOLS_LDFLAGS
  2020-08-07  9:42   ` Wolfram Sang
@ 2020-08-07 14:55     ` Jean Delvare
  0 siblings, 0 replies; 4+ messages in thread
From: Jean Delvare @ 2020-08-07 14:55 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: linux-i2c

On Fri, 7 Aug 2020 11:42:47 +0200, Wolfram Sang wrote:
> > > Sometimes I need to add some flags (like -static for the linker), so
> > > allow this.  
> > 
> > Does USE_STATIC_LIB=1 not work for you?  
> 
> For some embedded devices, I need full static because they use a libc I
> don't have at hand.

OK, if you think there are more people interested, feel free to
introduce another Makefile variable (STATIC_BUILD=1 for example) and
use that. Whatever makes your life easier really.

-- 
Jean Delvare
SUSE L3 Support

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

end of thread, other threads:[~2020-08-07 14:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-05 22:05 [PATCH i2c-tools] tools: allow to preset TOOLS_CFLAGS and TOOLS_LDFLAGS Wolfram Sang
2020-08-07  9:40 ` Jean Delvare
2020-08-07  9:42   ` Wolfram Sang
2020-08-07 14:55     ` Jean Delvare

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).