public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [google] Install additional gcov files (issue4442052)
@ 2011-04-16 20:25 Diego Novillo
  2011-04-17  7:32 ` Ralf Wildenhues
  0 siblings, 1 reply; 2+ messages in thread
From: Diego Novillo @ 2011-04-16 20:25 UTC (permalink / raw)
  To: reply, xur, gcc-patches

I'm committing this patch from Rong Xu.  These added files are used
for FDO kernel builds.

Rong, could you please provide more details?  Will you be submitting
this patch to trunk?

Tested on x86_64.  Committed to google/main branch.

Thanks.  Diego.

2011-04-15  Rong Xu  <xur@google.com>
    
    	* Makefile.in (install-leaf): Install gcov-io.h, gcov-iov.h
    	gcov-io.c and libgcov.c to $DESTDIR/$inst_libdir/gcov-src.

diff --git a/libgcc/Makefile.in b/libgcc/Makefile.in
index 7e2ab93..3a3c936 100644
--- a/libgcc/Makefile.in
+++ b/libgcc/Makefile.in
@@ -978,6 +978,18 @@ install-leaf: $(install-shared) $(install-libunwind)
 	  esac;							\
 	done
 
+	if [ "$(MULTIDIR)" == "." ]; then                       \
+	  gcov_src_dest="$(DESTDIR)$(inst_libdir)/gcov-src";    \
+	  $(mkinstalldirs) $$gcov_src_dest;                     \
+	  cp ../../gcc/gcov-iov.h $$gcov_src_dest;              \
+	  cp $(srcdir)/../gcc/gcov-io.h $$gcov_src_dest;        \
+	  cp $(srcdir)/../gcc/gcov-io.c $$gcov_src_dest;        \
+	  cp $(srcdir)/../gcc/libgcov.c $$gcov_src_dest;        \
+	  chmod 644 $$gcov_src_dest/gcov-iov.h                  \
+	    $$gcov_src_dest/gcov-io.h $$gcov_src_dest/gcov-io.c \
+	    $$gcov_src_dest/libgcov.c;                          \
+	fi
+
 install: install-leaf
 	@: $(MAKE) ; $(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install
 


--
This patch is available for review at http://codereview.appspot.com/4442052

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

* Re: [google] Install additional gcov files (issue4442052)
  2011-04-16 20:25 [google] Install additional gcov files (issue4442052) Diego Novillo
@ 2011-04-17  7:32 ` Ralf Wildenhues
  0 siblings, 0 replies; 2+ messages in thread
From: Ralf Wildenhues @ 2011-04-17  7:32 UTC (permalink / raw)
  To: Diego Novillo; +Cc: reply, xur, gcc-patches

Hello,

* Diego Novillo wrote on Sat, Apr 16, 2011 at 10:14:32PM CEST:
> 2011-04-15  Rong Xu  <xur@google.com>
>     
>     	* Makefile.in (install-leaf): Install gcov-io.h, gcov-iov.h
>     	gcov-io.c and libgcov.c to $DESTDIR/$inst_libdir/gcov-src.

> --- a/libgcc/Makefile.in
> +++ b/libgcc/Makefile.in
> @@ -978,6 +978,18 @@ install-leaf: $(install-shared) $(install-libunwind)
>  	  esac;							\
>  	done
>  
> +	if [ "$(MULTIDIR)" == "." ]; then                       \

With '[' aka. test, '==' is a bashism while '=' is portable and Posix.
Please use that instead.

> +	  gcov_src_dest="$(DESTDIR)$(inst_libdir)/gcov-src";    \
> +	  $(mkinstalldirs) $$gcov_src_dest;                     \
> +	  cp ../../gcc/gcov-iov.h $$gcov_src_dest;              \

Is it relevant whether any of the commands fail?  If so, '&&' should be
preferred over ';' (we cannot assume that make obeys Posix 2008 rules of
invoking all shell commands with errexit set; GNU make does not do it).
Esp. a mkinstalldirs failure would lead to undesirable results.

I'm aware that there are prior issues in this area in the GCC build
system.

> +	  cp $(srcdir)/../gcc/gcov-io.h $$gcov_src_dest;        \
> +	  cp $(srcdir)/../gcc/gcov-io.c $$gcov_src_dest;        \
> +	  cp $(srcdir)/../gcc/libgcov.c $$gcov_src_dest;        \
> +	  chmod 644 $$gcov_src_dest/gcov-iov.h                  \
> +	    $$gcov_src_dest/gcov-io.h $$gcov_src_dest/gcov-io.c \
> +	    $$gcov_src_dest/libgcov.c;                          \
> +	fi
> +
>  install: install-leaf
>  	@: $(MAKE) ; $(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install

Thanks,
Ralf

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

end of thread, other threads:[~2011-04-17  7:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-16 20:25 [google] Install additional gcov files (issue4442052) Diego Novillo
2011-04-17  7:32 ` Ralf Wildenhues

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 read-only IMAP folder(s) and NNTP newsgroup(s).