Large patch to merge in changes for gcc 4.3

Jonathan Larmour jifl@eCosCentric.com
Tue Nov 11 04:01:00 GMT 2008


The attached patch is a merge of changes from eCosCentric's internal tree
to anoncvs, in order to support updated tools based on GCC 4.3.2. We have
these updated tools stable, and this patch is the precursor to announcing
the availability of the tools for wider testing.

Many of the changes here are required. Many are included for incidental
reasons such as warning cleanups. Quite a few more are included for no
better reason than that picking them apart would increase future merge
headache. That's also why you may see some bits that aren't (yet) relevant
for anoncvs. But leave them in as they'll become relevant eventually :-).

I've tried to marry the changes with ChangeLog entries - apologies for any
discrepancies - something like SVN would make taking individual changesets
much easier!

There are bound to be problems. The thing to bear in mind is that
eCosCentric have it all working, so if there are problems, mail me first
rather than spending time investigating. It will almost certainly already
have been fixed, and so it probably means I just need to pull a few more
patches from eCosCentric's tree. (FAOD this isn't all the
changes/fixes/improvements in eCosCentric's tree by a long shot which is
why some may well have been missed).

Changes to RedBoot's flash.c are omitted for the moment since that is to be
updated wholesale by me in a few days to merge flash v2 to the trunk. (Yes
it's finally happening).

There are further things I intend to do down the road before eCos 3.0 to
fully roll-out the the support:

1) Remove -Winline. It's now mostly distracting noise. And the use of
.gnu.linkonce sections means that I believe there is now very little chance
of harm in things not being inlined which had been marked as inlined. Put
it like this, I know from eCosCentric's libstdc++ support, -Winline
triggers a lot of stuff in libstdc++'s own headers - part of the toolchain
- so it's really not expected to be that well used.

2) Add -Wno-write-strings as a stopgap to remove nasty warning noise during
build. It will silence all the warnings when a constant string literal is
being assigned to a plain char *, whether in C or C++.

Now making this change (and the change in (1)) is something I only want to
do once. However I think the warning should only be silenced in the release
branch when that is taken. I think the trunk should retain this warning in
order to assist with correcting the code, rather than sweeping it under the
carpet.

Therefore if we're going to be touching all HAL's CYGBLD_GLOBAL_CFLAGS,
it's an opportunity to centralise these warning flags, which are entirely
generic and are distributed identically across all HALs. I propose adding a
CYGBLD_GLOBAL_WARNFLAGS CDL option in hal/common. And I will remove all the
standard warning flags[1] from all HALs, and replace it with a reference to
that option. More specifically I suggest that CYGBLD_GLOBAL_WARNFLAGS is an
option which consists of a concatenation of CYGBLD_GLOBAL_WARNFLAGS_C,
CYGBLD_GLOBAL_WARNFLAGS_CXX and CYGBLD_GLOBAL_WARNFLAGS_COMMON. Each of
these takes their default_value from an identically named option with a
_DEFAULT suffix. This allows package CDL to control the default, as well as
letting users override it. It also starts to give us a route to avoid the
horrible hackery in pkgconf/rules.mak to eliminate language-specific flags
by replacing it with something properly controlled. If anyone has a better
proposal, I'd like to hear it, although be warned that if it is more
effort, then they can consider themselves automatically volunteered to do it!

I would like to also do this with other generic options, but for now won't
bite off more than I can chew.

3) Change all the ARM targets to use the arm-eabi tools prefix in place of
arm-elf

4) Possibly change the MIPS targets to remove -G0. The mipsisa32-elf
multilibs have been built with -mno-extern-sdata which should avoid the
requirement for building all of eCos and the application with -G0. However
I haven't tested this very well - in particular it would need to be
verified that it works with RedBoot virtual vector calls.

Jifl

[1] -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef
-Woverloaded-virtual
-- 
eCosCentric Limited      http://www.eCosCentric.com/     The eCos experts
Barnwell House, Barnwell Drive, Cambridge, UK.       Tel: +44 1223 245571
Registered in England and Wales: Reg No 4422071.
------["Si fractum non sit, noli id reficere"]------       Opinions==mine
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: gcc-4.3.ecos.changes
URL: <http://sourceware.org/pipermail/ecos-patches/attachments/20081111/5a6b26fc/attachment.ksh>


More information about the Ecos-patches mailing list