linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] build: allow easy override of GCC_BASE
@ 2011-04-13 11:06 Diego Elio Pettenò
  2011-04-13 11:06 ` [PATCH 2/3] build: add an all-installable target that builds the targets to install Diego Elio Pettenò
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Diego Elio Pettenò @ 2011-04-13 11:06 UTC (permalink / raw)
  To: Linux-Sparse; +Cc: Diego Elio Pettenò

Sometimes gcc reports the wrong path for its own base (for instance when
ICC is present in the same system); by allowing an override of GCC_BASE in
Makefile, it's easier for packages to fix this up.
---
 Makefile |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/Makefile b/Makefile
index cc6176f..e08143a 100644
--- a/Makefile
+++ b/Makefile
@@ -21,7 +21,8 @@ HAVE_GCC_DEP:=$(shell touch .gcc-test.c && 				\
 		echo 'yes'; rm -f .gcc-test.d .gcc-test.o .gcc-test.c)
 HAVE_GTK2:=$(shell pkg-config --exists gtk+-2.0 2>/dev/null && echo 'yes')
 
-CFLAGS += -DGCC_BASE=\"$(shell $(CC) --print-file-name=)\"
+GCC_BASE = $(shell $(CC) --print-file-name=)
+CFLAGS += -DGCC_BASE=\"$(GCC_BASE)\"
 
 ifeq ($(HAVE_GCC_DEP),yes)
 CFLAGS += -Wp,-MD,$(@D)/.$(@F).d
-- 
1.7.5.rc1


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

* [PATCH 2/3] build: add an all-installable target that builds the targets to install.
  2011-04-13 11:06 [PATCH 1/3] build: allow easy override of GCC_BASE Diego Elio Pettenò
@ 2011-04-13 11:06 ` Diego Elio Pettenò
  2011-04-13 18:34   ` Josh Triplett
  2011-04-13 11:06 ` [PATCH 3/3] Fix build with GCC 4.6 series Diego Elio Pettenò
  2011-04-14  9:59 ` [PATCH 1/3] build: allow easy override of GCC_BASE Christopher Li
  2 siblings, 1 reply; 7+ messages in thread
From: Diego Elio Pettenò @ 2011-04-13 11:06 UTC (permalink / raw)
  To: Linux-Sparse; +Cc: Diego Elio Pettenò

This is useful for distributions that don't want to build content that
won't be installed.
---
 Makefile |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/Makefile b/Makefile
index e08143a..ffb513f 100644
--- a/Makefile
+++ b/Makefile
@@ -118,7 +118,9 @@ SED_PC_CMD = 's|@version@|$(VERSION)|g;		\
 
 all: $(PROGRAMS) sparse.pc
 
-install: $(INST_PROGRAMS) $(LIBS) $(LIB_H) sparse.pc
+all-installable: $(INST_PROGRAMS) $(LIBS) $(LIB_H) sparse.pc
+
+install: all-installable
 	$(Q)install -d $(DESTDIR)$(BINDIR)
 	$(Q)install -d $(DESTDIR)$(LIBDIR)
 	$(Q)install -d $(DESTDIR)$(MAN1DIR)
-- 
1.7.5.rc1


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

* [PATCH 3/3] Fix build with GCC 4.6 series.
  2011-04-13 11:06 [PATCH 1/3] build: allow easy override of GCC_BASE Diego Elio Pettenò
  2011-04-13 11:06 ` [PATCH 2/3] build: add an all-installable target that builds the targets to install Diego Elio Pettenò
@ 2011-04-13 11:06 ` Diego Elio Pettenò
  2011-04-14  9:58   ` Christopher Li
  2011-04-14  9:59 ` [PATCH 1/3] build: allow easy override of GCC_BASE Christopher Li
  2 siblings, 1 reply; 7+ messages in thread
From: Diego Elio Pettenò @ 2011-04-13 11:06 UTC (permalink / raw)
  To: Linux-Sparse; +Cc: Diego Elio Pettenò

The label_statement attribute in the anonymous structures' union was
duplicated for label_arg and labeled_struct alises, which were
identical. Since the former is never used, delete it and leave the other as
the only copy.
---
 parse.h |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/parse.h b/parse.h
index 6b21e23..b26bd03 100644
--- a/parse.h
+++ b/parse.h
@@ -35,10 +35,6 @@ struct statement {
 		struct /* declaration */ {
 			struct symbol_list *declaration;
 		};
-		struct /* label_arg */ {
-			struct symbol *label;
-			struct statement *label_statement;
-		};
 		struct {
 			struct expression *expression;
 			struct expression *context;
-- 
1.7.5.rc1


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

* Re: [PATCH 2/3] build: add an all-installable target that builds the targets to install.
  2011-04-13 11:06 ` [PATCH 2/3] build: add an all-installable target that builds the targets to install Diego Elio Pettenò
@ 2011-04-13 18:34   ` Josh Triplett
  2011-04-13 18:35     ` Diego Elio Pettenò
  0 siblings, 1 reply; 7+ messages in thread
From: Josh Triplett @ 2011-04-13 18:34 UTC (permalink / raw)
  To: Diego Elio Pettenò; +Cc: Linux-Sparse

On Wed, Apr 13, 2011 at 01:06:05PM +0200, Diego Elio Pettenò wrote:
> This is useful for distributions that don't want to build content that
> won't be installed.
> ---
>  Makefile |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
> 
> diff --git a/Makefile b/Makefile
> index e08143a..ffb513f 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -118,7 +118,9 @@ SED_PC_CMD = 's|@version@|$(VERSION)|g;		\
>  
>  all: $(PROGRAMS) sparse.pc
>  
> -install: $(INST_PROGRAMS) $(LIBS) $(LIB_H) sparse.pc
> +all-installable: $(INST_PROGRAMS) $(LIBS) $(LIB_H) sparse.pc
> +
> +install: all-installable
>  	$(Q)install -d $(DESTDIR)$(BINDIR)
>  	$(Q)install -d $(DESTDIR)$(LIBDIR)
>  	$(Q)install -d $(DESTDIR)$(MAN1DIR)

Why not just "make install" instead?  You don't have to separately make
and make install; make install will build all the installed programs and
then install them.

- Josh Triplett
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 2/3] build: add an all-installable target that builds the targets to install.
  2011-04-13 18:34   ` Josh Triplett
@ 2011-04-13 18:35     ` Diego Elio Pettenò
  0 siblings, 0 replies; 7+ messages in thread
From: Diego Elio Pettenò @ 2011-04-13 18:35 UTC (permalink / raw)
  To: Josh Triplett; +Cc: Linux-Sparse

Il giorno mer, 13/04/2011 alle 11.34 -0700, Josh Triplett ha scritto:
> 
> Why not just "make install" instead?  You don't have to separately
> make
> and make install; make install will build all the installed programs
> and
> then install them. 

Most distributions – including Gentoo – prefer running the steps
separately, adding safety checks between one step and the other.

-- 
Diego Elio Pettenò — Flameeyes
http://blog.flameeyes.eu/

--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 3/3] Fix build with GCC 4.6 series.
  2011-04-13 11:06 ` [PATCH 3/3] Fix build with GCC 4.6 series Diego Elio Pettenò
@ 2011-04-14  9:58   ` Christopher Li
  0 siblings, 0 replies; 7+ messages in thread
From: Christopher Li @ 2011-04-14  9:58 UTC (permalink / raw)
  To: Diego Elio Pettenò; +Cc: Linux-Sparse

Will apply.

Chris

On Wed, Apr 13, 2011 at 4:06 AM, Diego Elio Pettenò <flameeyes@gmail.com> wrote:
> The label_statement attribute in the anonymous structures' union was
> duplicated for label_arg and labeled_struct alises, which were
> identical. Since the former is never used, delete it and leave the other as
> the only copy.
> ---
>  parse.h |    4 ----
>  1 files changed, 0 insertions(+), 4 deletions(-)
>
> diff --git a/parse.h b/parse.h
> index 6b21e23..b26bd03 100644
> --- a/parse.h
> +++ b/parse.h
> @@ -35,10 +35,6 @@ struct statement {
>                struct /* declaration */ {
>                        struct symbol_list *declaration;
>                };
> -               struct /* label_arg */ {
> -                       struct symbol *label;
> -                       struct statement *label_statement;
> -               };
>                struct {
>                        struct expression *expression;
>                        struct expression *context;
> --
> 1.7.5.rc1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 1/3] build: allow easy override of GCC_BASE
  2011-04-13 11:06 [PATCH 1/3] build: allow easy override of GCC_BASE Diego Elio Pettenò
  2011-04-13 11:06 ` [PATCH 2/3] build: add an all-installable target that builds the targets to install Diego Elio Pettenò
  2011-04-13 11:06 ` [PATCH 3/3] Fix build with GCC 4.6 series Diego Elio Pettenò
@ 2011-04-14  9:59 ` Christopher Li
  2 siblings, 0 replies; 7+ messages in thread
From: Christopher Li @ 2011-04-14  9:59 UTC (permalink / raw)
  To: Diego Elio Pettenò; +Cc: Linux-Sparse

Will apply.

Chris

On Wed, Apr 13, 2011 at 4:06 AM, Diego Elio Pettenò <flameeyes@gmail.com> wrote:
> Sometimes gcc reports the wrong path for its own base (for instance when
> ICC is present in the same system); by allowing an override of GCC_BASE in
> Makefile, it's easier for packages to fix this up.
> ---
>  Makefile |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index cc6176f..e08143a 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -21,7 +21,8 @@ HAVE_GCC_DEP:=$(shell touch .gcc-test.c &&                            \
>                echo 'yes'; rm -f .gcc-test.d .gcc-test.o .gcc-test.c)
>  HAVE_GTK2:=$(shell pkg-config --exists gtk+-2.0 2>/dev/null && echo 'yes')
>
> -CFLAGS += -DGCC_BASE=\"$(shell $(CC) --print-file-name=)\"
> +GCC_BASE = $(shell $(CC) --print-file-name=)
> +CFLAGS += -DGCC_BASE=\"$(GCC_BASE)\"
>
>  ifeq ($(HAVE_GCC_DEP),yes)
>  CFLAGS += -Wp,-MD,$(@D)/.$(@F).d
> --
> 1.7.5.rc1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2011-04-14  9:59 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-13 11:06 [PATCH 1/3] build: allow easy override of GCC_BASE Diego Elio Pettenò
2011-04-13 11:06 ` [PATCH 2/3] build: add an all-installable target that builds the targets to install Diego Elio Pettenò
2011-04-13 18:34   ` Josh Triplett
2011-04-13 18:35     ` Diego Elio Pettenò
2011-04-13 11:06 ` [PATCH 3/3] Fix build with GCC 4.6 series Diego Elio Pettenò
2011-04-14  9:58   ` Christopher Li
2011-04-14  9:59 ` [PATCH 1/3] build: allow easy override of GCC_BASE Christopher Li

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).