Re: [PATCH 2/3] buildsys: fix handling of CFLAGS-OMIT from global CFLAGS

2013-09-17 Thread Florian Fainelli
Hello,

2013/9/13 Filippo ARCIDIACONO filippo.arcidiac...@st.com:
 Currently the Makefile rules are not removing from the global CFLAGS
 any of the OMIT cflags declared at file level. This patch fixes it.

Do we really need to have two different ways of achieving the same
thing? It seems to me that doing:

CFLAGS_foo.c += -fno-bar

is equivalent to:

CFLAGS-OMIT_foo.c += -fbar

I prefer the first one because we do not need to introduce another
infrastructure than the one already existing.


 Signed-off-by: Carmelo Amoroso carmelo.amor...@st.com
 Signed-off-by: Filippo Arcidiacono filippo.arcidiac...@st.com
 ---
  Makerules |3 ++-
  1 files changed, 2 insertions(+), 1 deletions(-)

 diff --git a/Makerules b/Makerules
 index 367daa5..54344c5 100644
 --- a/Makerules
 +++ b/Makerules
 @@ -230,7 +230,8 @@ collect_multi_flags = $(CFLAGS-$(notdir $(patsubst 
 %/,%,$(dir $(d)

  CFLAGS_gen.dep = -MT $@ -MD -MP -MF $(dir $@).$(notdir $@).dep

 -cmd_compile.c = $(CC) -c $ -o $@ $(CFLAGS) \
 +cmd_compile.c = $(CC) -c $ -o $@ \
 +   $(filter-out $(CFLAGS-OMIT-$(notdir $)),$(CFLAGS)) \
 $(CFLAGS-$(suffix $@)) \
 $(filter-out $(CFLAGS-OMIT-$(notdir $)),$(CFLAGS-$(notdir $(D \
 $(CFLAGS-$(subst $(top_srcdir),,$(dir $))) \
 --
 1.7.7.6

 ___
 uClibc mailing list
 uClibc@uclibc.org
 http://lists.busybox.net/mailman/listinfo/uclibc



-- 
Florian
___
uClibc mailing list
uClibc@uclibc.org
http://lists.busybox.net/mailman/listinfo/uclibc


Re: [PATCH 2/3] buildsys: fix handling of CFLAGS-OMIT from global CFLAGS

2013-09-17 Thread Carmelo Amoroso

Hi Florian

Il 17 settembre 2013 17:57:00 Florian Fainelli f.faine...@gmail.com ha 
scritto:

Hello,

2013/9/13 Filippo ARCIDIACONO filippo.arcidiac...@st.com:
 Currently the Makefile rules are not removing from the global CFLAGS
 any of the OMIT cflags declared at file level. This patch fixes it.

Do we really need to have two different ways of achieving the same
thing? It seems to me that doing:

CFLAGS_foo.c += -fno-bar

is equivalent to:

CFLAGS-OMIT_foo.c += -fbar



Is this always true ?


I prefer the first one because we do not need to introduce another
infrastructure than the one already existing.



CFLAGS-OMIT is a construct already used in several other places in uclibc 
but only applicable at directory level. This patch just extend it to file.




 Signed-off-by: Carmelo Amoroso carmelo.amor...@st.com
 Signed-off-by: Filippo Arcidiacono filippo.arcidiac...@st.com
 ---
  Makerules |3 ++-
  1 files changed, 2 insertions(+), 1 deletions(-)

 diff --git a/Makerules b/Makerules
 index 367daa5..54344c5 100644
 --- a/Makerules
 +++ b/Makerules
 @@ -230,7 +230,8 @@ collect_multi_flags = $(CFLAGS-$(notdir $(patsubst 
%/,%,$(dir $(d)


  CFLAGS_gen.dep = -MT $@ -MD -MP -MF $(dir $@).$(notdir $@).dep

 -cmd_compile.c = $(CC) -c $ -o $@ $(CFLAGS) \
 +cmd_compile.c = $(CC) -c $ -o $@ \
 +   $(filter-out $(CFLAGS-OMIT-$(notdir $)),$(CFLAGS)) \
 $(CFLAGS-$(suffix $@)) \
 $(filter-out $(CFLAGS-OMIT-$(notdir $)),$(CFLAGS-$(notdir $(D \
 $(CFLAGS-$(subst $(top_srcdir),,$(dir $))) \
 --
 1.7.7.6

 ___
 uClibc mailing list
 uClibc@uclibc.org
 http://lists.busybox.net/mailman/listinfo/uclibc



--
Florian


Carmelo

_

__

uClibc mailing list
uClibc@uclibc.org
http://lists.busybox.net/mailman/listinfo/uclibc



Inviato con AquaMail per Android
http://www.aqua-mail.com


___
uClibc mailing list
uClibc@uclibc.org
http://lists.busybox.net/mailman/listinfo/uclibc


[PATCH 2/3] buildsys: fix handling of CFLAGS-OMIT from global CFLAGS

2013-09-13 Thread Filippo ARCIDIACONO
Currently the Makefile rules are not removing from the global CFLAGS
any of the OMIT cflags declared at file level. This patch fixes it.

Signed-off-by: Carmelo Amoroso carmelo.amor...@st.com
Signed-off-by: Filippo Arcidiacono filippo.arcidiac...@st.com
---
 Makerules |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/Makerules b/Makerules
index 367daa5..54344c5 100644
--- a/Makerules
+++ b/Makerules
@@ -230,7 +230,8 @@ collect_multi_flags = $(CFLAGS-$(notdir $(patsubst 
%/,%,$(dir $(d)
 
 CFLAGS_gen.dep = -MT $@ -MD -MP -MF $(dir $@).$(notdir $@).dep
 
-cmd_compile.c = $(CC) -c $ -o $@ $(CFLAGS) \
+cmd_compile.c = $(CC) -c $ -o $@ \
+   $(filter-out $(CFLAGS-OMIT-$(notdir $)),$(CFLAGS)) \
$(CFLAGS-$(suffix $@)) \
$(filter-out $(CFLAGS-OMIT-$(notdir $)),$(CFLAGS-$(notdir $(D \
$(CFLAGS-$(subst $(top_srcdir),,$(dir $))) \
-- 
1.7.7.6

___
uClibc mailing list
uClibc@uclibc.org
http://lists.busybox.net/mailman/listinfo/uclibc