This is the mail archive of the
ecos-patches@sourceware.org
mailing list for the eCos project.
Re: Suppress -fprofile-arcs in extras.o rule
- From: Bart Veer <bartv at ecoscentric dot com>
- To: John Dallaway <john at dallaway dot org dot uk>
- Cc: ecos-patches at ecos dot sourceware dot org
- Date: Sat, 20 Nov 2010 21:58:02 +0000
- Subject: Re: Suppress -fprofile-arcs in extras.o rule
- References: <4CE833F4.2040601@dallaway.org.uk>
>>>>> "John" == John Dallaway <john@dallaway.org.uk> writes:
John> This patch eliminates the possibility of passing
John> -fprofile-arcs from the global CFLAGS to the linker when
John> generating extras.o. -fprofile-arcs would imply -lgcov and
John> interfere with subsequent application linking.
John> Checked-in.
This makes no sense to me. AFAIK gcc -Wl,--whole-archive should only
invoke the linker, not the compiler, and the option -fprofile-arcs
only affects the compiler (a grep through a binutils checkout for
profile-arcs shows no hits). The presence or absence of
-fprofile-arcs/-fno-profile-arcs in this custom build step should have
no effect whatsoever on the build.
If any of eCos is built with -profile-arcs in the global CFLAGS then
the compiler will generate extra code which will have a dependency,
either on a gcov support library or on some other profiling library
interested in run-time behaviour at the arc level. The linker is not
going to eliminate that extra code just because you add
-fno-profile-arcs to the linker command line, so the dependency
remains.
Hence all this patch achieves is to add some unnecessary and confusing
noise to the build process.
Bart
--
Bart Veer eCos Configuration Architect
eCosCentric Limited The eCos experts http://www.ecoscentric.com/
Barnwell House, Barnwell Drive, Cambridge, UK. Tel: +44 1223 245571
Registered in England and Wales: Reg No 4422071.