Patchwork BUILD PATCH: Support source file with .cc extension

login
register
mail settings
Submitter Gabriel Dos Reis
Date March 26, 2013, 8:48 p.m.
Message ID <87li99lwf3.fsf@gauss.cs.tamu.edu>
Download mbox | patch
Permalink /patch/231531/
State New
Headers show

Comments

Gabriel Dos Reis - March 26, 2013, 8:48 p.m.
Hi Paolo,

The patchlet below allows uses of source file with .cc extension.

This comes out of work being done on the C++ front-end and has merit of
its own.  OK to apply?

Thanks,

-- Gaby

2013-03-26  Gabriel Dos Reis  <gdr@integrable-solutions.net>

	* Makefile.in (.SUFFIXES): Add .cc.
	(.c.o): Apply same recipe for implicit rule .cc.o.
Paolo Bonzini - March 27, 2013, 8:57 a.m.
Il 26/03/2013 21:48, Gabriel Dos Reis ha scritto:
> 
> Hi Paolo,
> 
> The patchlet below allows uses of source file with .cc extension.
> 
> This comes out of work being done on the C++ front-end and has merit of
> its own.  OK to apply?
> 
> Thanks,
> 
> -- Gaby
> 
> 2013-03-26  Gabriel Dos Reis  <gdr@integrable-solutions.net>
> 
> 	* Makefile.in (.SUFFIXES): Add .cc.
> 	(.c.o): Apply same recipe for implicit rule .cc.o.
> 
> Index: Makefile.in
> ===================================================================
> --- Makefile.in	(revision 196984)
> +++ Makefile.in	(working copy)
> @@ -48,7 +48,7 @@
>  # This must come before the language makefile fragments to allow them to
>  # add suffixes and rules of their own.
>  .SUFFIXES:
> -.SUFFIXES: .c .o .po .pox .gmo
> +.SUFFIXES: .c .cc .o .po .pox .gmo
>  
>  # -------------------------------
>  # Standard autoconf-set variables
> @@ -1054,7 +1054,7 @@
>  	   $(CPPINC) $(GMPINC) $(DECNUMINC) $(BACKTRACEINC) \
>  	   $(CLOOGINC) $(ISLINC)
>  
> -.c.o:
> +.cc.o .c.o:
>  	$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $< $(OUTPUT_OPTION)
>  
>  #
> 

Ok.

Paolo

Patch

Index: Makefile.in
===================================================================
--- Makefile.in	(revision 196984)
+++ Makefile.in	(working copy)
@@ -48,7 +48,7 @@ 
 # This must come before the language makefile fragments to allow them to
 # add suffixes and rules of their own.
 .SUFFIXES:
-.SUFFIXES: .c .o .po .pox .gmo
+.SUFFIXES: .c .cc .o .po .pox .gmo
 
 # -------------------------------
 # Standard autoconf-set variables
@@ -1054,7 +1054,7 @@ 
 	   $(CPPINC) $(GMPINC) $(DECNUMINC) $(BACKTRACEINC) \
 	   $(CLOOGINC) $(ISLINC)
 
-.c.o:
+.cc.o .c.o:
 	$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $< $(OUTPUT_OPTION)
 
 #