libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: libtool filters gcc coverage flags breaking linking step


From: Ralf Wildenhues
Subject: Re: libtool filters gcc coverage flags breaking linking step
Date: Sun, 28 Jan 2007 15:19:06 +0100
User-agent: Mutt/1.5.13 (2006-08-11)

Hi Mike, all,

Apologies for the delay.

* Mike Frysinger wrote on Sat, Dec 30, 2006 at 04:40:12PM CET:
> the attached tarball illustrates a small package that breaks because libtool 
> does not allow -fprofile-arcs or -fprofile-generate ... looking through 
> latest cvs, i see that --coverage was added, but not these other flags
> 
> the builtin gcc spec allows for any of these flags to be used:
>     %{fprofile-arcs|fprofile-generate|coverage:-lgcov}\
> 
> also, it would seem that -p is filtered but -pg is let through ...
> 
> the attached patch against CVS head should do the trick i think

Thanks.  I think if we go this route, then -fprofile-* should all be let
through.  I'm applying the patches below.

Cheers,
Ralf

HEAD:
2007-01-28  Mike Frysinger  <address@hidden>

        * libltdl/config/ltmain.m4sh (func_mode_link): Pass through
        `-p' and `-fprofile-*' for GCC.

Index: libltdl/config/ltmain.m4sh
===================================================================
RCS file: /cvsroot/libtool/libtool/libltdl/config/ltmain.m4sh,v
retrieving revision 1.57
diff -u -r1.57 ltmain.m4sh
--- libltdl/config/ltmain.m4sh  21 Jan 2007 14:57:58 -0000      1.57
+++ libltdl/config/ltmain.m4sh  28 Jan 2007 14:18:09 -0000
@@ -2901,10 +2901,10 @@
       # -m*, -t[45]*, -txscale* pass through architecture-specific
       # compiler args for GCC
       # -F/path gives path to uninstalled frameworks, gcc on darwin
-      # -pg, --coverage pass through profiling flag for GCC
+      # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
       # @file GCC response files
       
-64|-mips[[0-9]]|-r[[0-9]][[0-9]]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
-      -t[[45]]*|-txscale*|-pg|--coverage|-F*|@*)
+      -t[[45]]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
         func_quote_for_eval "$arg"
        arg="$func_quote_for_eval_result"
         func_append compile_command " $arg"


branch-1-5:
2007-01-28  Mike Frysinger  <address@hidden>

        * ltmain.in (link mode): Pass through `-p' and `-fprofile-*' for
        GCC.
Index: ltmain.in
===================================================================
RCS file: /cvsroot/libtool/libtool/Attic/ltmain.in,v
retrieving revision 1.334.2.137
diff -u -r1.334.2.137 ltmain.in
--- ltmain.in   21 Jan 2007 14:58:24 -0000      1.334.2.137
+++ ltmain.in   28 Jan 2007 14:18:30 -0000
@@ -1659,11 +1659,11 @@
       # -m* pass through architecture-specific compiler args for GCC
       # -m*, -t[45]*, -txscale* pass through architecture-specific
       # compiler args for GCC
-      # -pg, --coverage pass through profiling flag for GCC
+      # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
       # -F/path gives path to uninstalled frameworks, gcc on darwin
       # @file GCC response files
       -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
-      -t[45]*|-txscale*|-pg|--coverage|-F*|@*)
+      -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
 
        # Unknown arguments in both finalize_command and compile_command need
        # to be aesthetically quoted because they are evaled later.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]