public inbox for ecos-patches@sourceware.org
 help / color / mirror / Atom feed
From: Sergei Gavrikov <w3sg@SoftHome.net>
To: eCos patches list <ecos-patches@ecos.sourceware.org>
Subject: Pedantic preprocessor
Date: Sat, 13 Oct 2007 21:49:00 -0000	[thread overview]
Message-ID: <20071013214906.GA9874@ubuntu> (raw)

[-- Attachment #1: Type: text/plain, Size: 1805 bytes --]

Hello list

They spoke what 'untested' GCC3.4.1 (arm-elf) generates more compact
code for float and double math than 'stable' GCC3.2.1 from ecoscentric
ftp. I use 'stable' GCC3.2.1 and build 'new' toolchain to test that.
That is (new code is a bit compact :). But, suddenly I found that the
GCC3.4.1 preprocessor is more pedantic then GCC3.2.1 one. I wonder
about CPP pedantism from other GCC suites (GCC3.4.X and GCC4.X.X). If a
described issue the below is the GCC's 3.4.1, please, forget this. If
other modern CPP cryes by a same way, a patch is attached.

SYNOPSIS

ecosconfig new sam7ex256
ecosconfig tree
make -s
U CYGHWR_HAL_ARM_AT91, new inferred value AT91SAM7S
U CYGHWR_HAL_ARM_AT91_FIQ, new inferred value 1
U CYGHWR_HAL_ARM_AT91SAM7, new inferred value at91sam7x256
headers finished
cc1: warning: command line option "-Woverloaded-virtual" is valid for C++/ObjC++ but not for C
cc1: warning: command line option "-fno-rtti" is valid for C++/ObjC++ but not for C
cc1: warning: command line option "-Woverloaded-virtual" is valid for C++/ObjC++ but not for C
cc1: warning: command line option "-fno-rtti" is valid for C++/ObjC++ but not for C
cc1: warning: command line option "-Woverloaded-virtual" is valid for C++/ObjC++ but not for C
cc1: warning: command line option "-fno-rtti" is valid for C++/ObjC++ but not for C
build finished

MEDICINE

hal_arm.cdl describes 3 make rules to build arm.inc, vectors.o and
target.ld.  CPP 'sees' all $(CFLAGS) options and cryes about the
language specific flags. I found that it's enough to replace $(CFLASG)
by $(ACTUAL_CFLAGS), and all backs as it was with CPP from GCC3.2.1:

headers finished
build finished

I like to see these 2 lines together. And if anybody knows how to fix
this issue in platform CDL, please, enlight me.

Regards,

    Sergei


[-- Attachment #2: hal_arm.cdl.patch --]
[-- Type: text/x-diff, Size: 1305 bytes --]

--- hal/arm/arch/current/cdl/hal_arm.cdl
+++ hal/arm/arch/current/cdl/hal_arm.cdl
@@ -67,7 +67,7 @@
     # n.b. grep does not behave itself under win32
     make -priority 1 {
         arm.inc : <PACKAGE>/src/hal_mk_defs.c
-        $(CC) $(CFLAGS) $(INCLUDE_PATH) -Wp,-MD,arm.tmp -o hal_mk_defs.tmp -S $<
+        $(CC) $(ACTUAL_CFLAGS) $(INCLUDE_PATH) -Wp,-MD,arm.tmp -o hal_mk_defs.tmp -S $<
         fgrep .equ hal_mk_defs.tmp | sed s/#// > $@
         @echo $@ ": \\" > $(notdir $@).deps
         @tail -n +2 arm.tmp >> $(notdir $@).deps
@@ -77,7 +77,7 @@
 
     make {
         <PREFIX>/lib/vectors.o : <PACKAGE>/src/vectors.S
-        $(CC) -Wp,-MD,vectors.tmp $(INCLUDE_PATH) $(CFLAGS) -c -o $@ $<
+        $(CC) -Wp,-MD,vectors.tmp $(INCLUDE_PATH) $(ACTUAL_CFLAGS) -c -o $@ $<
         @echo $@ ": \\" > $(notdir $@).deps
         @tail -n +2 vectors.tmp >> $(notdir $@).deps
         @echo >> $(notdir $@).deps
@@ -86,7 +86,7 @@
 
     make {
         <PREFIX>/lib/target.ld: <PACKAGE>/src/arm.ld
-        $(CC) -E -P -Wp,-MD,target.tmp -xc $(INCLUDE_PATH) $(CFLAGS) -o $@ $<
+        $(CC) -E -P -Wp,-MD,target.tmp -xc $(INCLUDE_PATH) $(ACTUAL_CFLAGS) -o $@ $<
         @echo $@ ": \\" > $(notdir $@).deps
         @tail -n +2 target.tmp >> $(notdir $@).deps
         @echo >> $(notdir $@).deps

             reply	other threads:[~2007-10-13 21:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-13 21:49 Sergei Gavrikov [this message]
2007-10-15 11:29 ` Gary Thomas
2007-10-16  9:18   ` Sergei Organov
2007-10-16 20:59     ` Sergei Gavrikov
2007-10-17 10:58       ` Sergei Organov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071013214906.GA9874@ubuntu \
    --to=w3sg@softhome.net \
    --cc=ecos-patches@ecos.sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).