* Suppress -fprofile-arcs in extras.o rule
@ 2010-11-20 20:48 John Dallaway
2010-11-20 21:58 ` Bart Veer
0 siblings, 1 reply; 2+ messages in thread
From: John Dallaway @ 2010-11-20 20:48 UTC (permalink / raw)
To: eCos Patches List
[-- Attachment #1: Type: text/plain, Size: 240 bytes --]
This patch eliminates the possibility of passing -fprofile-arcs from the
global CFLAGS to the linker when generating extras.o. -fprofile-arcs
would imply -lgcov and interfere with subsequent application linking.
Checked-in.
John Dallaway
[-- Attachment #2: extras-101120.patch --]
[-- Type: text/x-patch, Size: 2201 bytes --]
Index: ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos/packages/hal/common/current/ChangeLog,v
retrieving revision 1.120
diff -U5 -r1.120 ChangeLog
--- ChangeLog 9 Oct 2010 12:53:34 -0000 1.120
+++ ChangeLog 20 Nov 2010 20:06:40 -0000
@@ -1,5 +1,10 @@
+2010-11-20 John Dallaway <john@dallaway.org.uk>
+
+ * cdl/hal.cdl: Suppress -fprofile-arcs (which implies -lgcov) when
+ generating extras.o.
+
2010-10-09 John Dallaway <john@dallaway.org.uk>
* doc/porting.sgml: Delete references to the memory layout editor.
2009-02-02 Bart Veer <bartv@ecoscentric.com>
Index: cdl/hal.cdl
===================================================================
RCS file: /cvs/ecos/ecos/packages/hal/common/current/cdl/hal.cdl,v
retrieving revision 1.25
diff -U5 -r1.25 hal.cdl
--- cdl/hal.cdl 2 Feb 2009 13:46:07 -0000 1.25
+++ cdl/hal.cdl 20 Nov 2010 20:06:40 -0000
@@ -6,11 +6,11 @@
#
# ====================================================================
## ####ECOSGPLCOPYRIGHTBEGIN####
## -------------------------------------------
## This file is part of eCos, the Embedded Configurable Operating System.
-## Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+## Copyright (C) 1998, 1999, 2000, 2001, 2002, 2010 Free Software Foundation, Inc.
##
## eCos is free software; you can redistribute it and/or modify it under
## the terms of the GNU General Public License as published by the Free
## Software Foundation; either version 2 or (at your option) any later
## version.
@@ -67,11 +67,11 @@
requires CYGPKG_INFRA
make -priority 250 {
<PREFIX>/lib/extras.o: <PREFIX>/lib/libextras.a
- $(CC) $(CFLAGS) -nostdlib -Wl,-r -T /dev/null -Wl,--whole-archive -o $@ $<
+ $(CC) $(CFLAGS) -fno-profile-arcs -nostdlib -Wl,-r -T /dev/null -Wl,--whole-archive -o $@ $<
}
cdl_option CYGBLD_GLOBAL_WARNFLAGS {
display "Standard compiler warning flags"
parent CYGBLD_GLOBAL_OPTIONS
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Suppress -fprofile-arcs in extras.o rule
2010-11-20 20:48 Suppress -fprofile-arcs in extras.o rule John Dallaway
@ 2010-11-20 21:58 ` Bart Veer
0 siblings, 0 replies; 2+ messages in thread
From: Bart Veer @ 2010-11-20 21:58 UTC (permalink / raw)
To: John Dallaway; +Cc: ecos-patches
>>>>> "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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-11-20 21:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-20 20:48 Suppress -fprofile-arcs in extras.o rule John Dallaway
2010-11-20 21:58 ` Bart Veer
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).