public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* Re: [ECOS] Can I also generate other outputs of gcc when build?
@ 2006-09-24 23:31 Simon
  0 siblings, 0 replies; 5+ messages in thread
From: Simon @ 2006-09-24 23:31 UTC (permalink / raw)
  To: ecos-discuss

On 22/09/2006, at 7:47 PM, Gary Thomas gary-at-mlbassoc.com |ecos| wrote:

> > 
> > So I am asking can I do something to let eCos Configuration Tool 
> > generate NOT ONLY ".o", BUT ALSO other outputs(.i, .s, etc.)?
> 
> Just add "-save-outputs" to your global > GCC options.

Actually, I think the option to do this in gcc is "-save-temps".

Regards,

Simon

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [ECOS] Can I also generate other outputs of gcc when build?
  2006-09-25  4:03     ` wang cui
@ 2006-09-26  1:51       ` wang cui
  0 siblings, 0 replies; 5+ messages in thread
From: wang cui @ 2006-09-26  1:51 UTC (permalink / raw)
  To: ecos-discuss

However, I have done it by add make steps to the 
"\packages\pkgconf\rules.mak". Such as:

%.o.d : %.c
ifeq ($(HOST),CYGWIN)
	@mkdir -p `cygpath -w "$(dir $@)" | sed "s@\\\\\\\\@/@g"`
else
	@mkdir -p $(dir $@)
endif
	$(CC) -c $(INCLUDE_PATH) -I$(dir $<) $(ACTUAL_CFLAGS) 
-Wp,-MD,$(@:.o.d=.tmp) -E -o $(dir $@)$(OBJECT_PREFIX)_$(notdir 
$(@:.o.d=.i)) $<
	$(CC) -c $(INCLUDE_PATH) -I$(dir $<) $(ACTUAL_CFLAGS) 
-Wp,-MD,$(@:.o.d=.tmp) -o $(dir $@)$(OBJECT_PREFIX)_$(notdir $(@:.o.d=.o)) 
$<
	@sed -e '/^ *\\/d' -e "s#.*: #$@: #" $(@:.o.d=.tmp) > $@
	@rm $(@:.o.d=.tmp)

So it can generate ".i" file for every ".c".

Thanks!

>From: "wang cui" <iucgnaw@msn.com>
>To: gary@mlbassoc.com
>CC: ecos-discuss@ecos.sourceware.org
>Subject: Re: [ECOS] Can I also generate other outputs of gcc when build?
>Date: Mon, 25 Sep 2006 04:02:55 +0000
>
>Thanks, but "-save-outputs" seems unrecognized when invoke 
>arm-elf-gcc.
>For example:
>arm-elf-gcc -c  
>-I/ecos-c/cygwin/opt/development/project/cpu_4c_lib/lib_install/include 
>-I/opt/development/ecos/packages/language/c/libc/string/current 
>-I/opt/development/ecos/packages/language/c/libc/string/current/src 
>-I/opt/development/ecos/packages/language/c/libc/string/current/tests 
>-I. 
>-I/opt/development/ecos/packages/language/c/libc/string/current/src/ 
>-finline-limit=7000 -mcpu=arm7tdmi -mno-short-load-words -Wall 
>-Wpointer-arith  -Winline -Wundef -Woverloaded-virtual -g -O0 
>-ffunction-sections -fdata-sections -fno-rtti -fno-exceptions   
>-save-outputs -Wp,-MD,src/strcoll.tmp -o 
>src/language_c_libc_string_strcoll.o 
>/opt/development/ecos/packages/language/c/libc/string/current/src/strcoll.cxx

>
>arm-elf-gcc: unrecognized option `-save-outputs'
>
>I am using the prebuilt arm-elf-gcc from eCosCentric, the version is 
>3.2.1
>
>
>
>>From: Gary Thomas <gary@mlbassoc.com>
>>To: wang cui <iucgnaw@msn.com>
>>CC: ecos-discuss@ecos.sourceware.org
>>Subject: Re: [ECOS] Can I also generate other outputs of gcc when 
>>build?
>>Date: Fri, 22 Sep 2006 03:47:42 -0600
>>
>>wang cui wrote:
>> > As eCos Configuration Tool generate ".o" file for each source 
>>file
>> > defaultly. Manytimes I need to check the preprocessed 
>>output(sometimes
>> > compiled assembly output) of source file.
>> >
>> > By now, I have to manually call gcc, in a bash shell, with a 
>>additional
>> > "-E -o xxx.i" option to generate the preprocessed output for 
>>check.
>> >
>> > For example:
>> > arm-elf-gcc -c
>> > 
>>-I/ecos-c/cygwin/opt/development/project/cpu_4c_lib/lib_install/include
>> > 
>>-I/opt/development/ecos/packages/devs/serial/generic/16x5x/current
>> > 
>>-I/opt/development/ecos/packages/devs/serial/generic/16x5x/current/src
>> >
>-I/opt/development/ecos/packages/devs/serial/generic/16x5x/current/tests
>> > -I.
>> > 
>>-I/opt/development/ecos/packages/devs/serial/generic/16x5x/current/src/
>> > -finline-limit=7000 -mcpu=arm7tdmi -mno-short-load-words -Wall
>> > -Wpointer-arith -Wstrict-prototypes -Winline -Wundef  -g -O0
>> > -ffunction-sections -fdata-sections  -fno-exceptions
>> > -Wp,-MD,src/ser_16x5x.tmp -E -o
>> > src/devs_serial_generic_16x5x_ser_16x5x.i
>> >
>/opt/development/ecos/packages/devs/serial/generic/16x5x/current/src/ser_16x5x.c

>
>> >
>> >
>> >
>> > So I am asking can I do something to let eCos Configuration Tool
>> > generate NOT ONLY ".o", BUT ALSO other outputs(.i, .s, etc.)?
>>
>>Just add "-save-outputs" to your global GCC options.
>>
>>Note: I normally do this by hand for the file(s) I'm interested in 
>>as
>>turning it on in a build tree will create tons of files, some of 
>>which
>>can be quite large...
>>
>>--
>>------------------------------------------------------------
>>Gary Thomas                 |  Consulting for the
>>MLB Associates              |    Embedded world
>>------------------------------------------------------------
>
>
>
>--
>Before posting, please read the FAQ: 
>http://ecos.sourceware.org/fom/ecos
>and search the list archive: 
>http://ecos.sourceware.org/ml/ecos-discuss
>



-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [ECOS] Can I also generate other outputs of gcc when build?
  2006-09-22  9:47   ` Gary Thomas
@ 2006-09-25  4:03     ` wang cui
  2006-09-26  1:51       ` wang cui
  0 siblings, 1 reply; 5+ messages in thread
From: wang cui @ 2006-09-25  4:03 UTC (permalink / raw)
  To: gary; +Cc: ecos-discuss

Thanks, but "-save-outputs" seems unrecognized when invoke arm-elf-gcc.
For example:
arm-elf-gcc -c  
-I/ecos-c/cygwin/opt/development/project/cpu_4c_lib/lib_install/include 
-I/opt/development/ecos/packages/language/c/libc/string/current 
-I/opt/development/ecos/packages/language/c/libc/string/current/src 
-I/opt/development/ecos/packages/language/c/libc/string/current/tests -I. 
-I/opt/development/ecos/packages/language/c/libc/string/current/src/ 
-finline-limit=7000 -mcpu=arm7tdmi -mno-short-load-words -Wall 
-Wpointer-arith  -Winline -Wundef -Woverloaded-virtual -g -O0 
-ffunction-sections -fdata-sections -fno-rtti -fno-exceptions   
-save-outputs -Wp,-MD,src/strcoll.tmp -o 
src/language_c_libc_string_strcoll.o 
/opt/development/ecos/packages/language/c/libc/string/current/src/strcoll.cxx

arm-elf-gcc: unrecognized option `-save-outputs'

I am using the prebuilt arm-elf-gcc from eCosCentric, the version is 3.2.1



>From: Gary Thomas <gary@mlbassoc.com>
>To: wang cui <iucgnaw@msn.com>
>CC: ecos-discuss@ecos.sourceware.org
>Subject: Re: [ECOS] Can I also generate other outputs of gcc when build?
>Date: Fri, 22 Sep 2006 03:47:42 -0600
>
>wang cui wrote:
> > As eCos Configuration Tool generate ".o" file for each source file
> > defaultly. Manytimes I need to check the preprocessed output(sometimes
> > compiled assembly output) of source file.
> >
> > By now, I have to manually call gcc, in a bash shell, with a additional
> > "-E -o xxx.i" option to generate the preprocessed output for check.
> >
> > For example:
> > arm-elf-gcc -c
> > -I/ecos-c/cygwin/opt/development/project/cpu_4c_lib/lib_install/include
> > -I/opt/development/ecos/packages/devs/serial/generic/16x5x/current
> > -I/opt/development/ecos/packages/devs/serial/generic/16x5x/current/src
> > 
-I/opt/development/ecos/packages/devs/serial/generic/16x5x/current/tests
> > -I.
> > -I/opt/development/ecos/packages/devs/serial/generic/16x5x/current/src/
> > -finline-limit=7000 -mcpu=arm7tdmi -mno-short-load-words -Wall
> > -Wpointer-arith -Wstrict-prototypes -Winline -Wundef  -g -O0
> > -ffunction-sections -fdata-sections  -fno-exceptions
> > -Wp,-MD,src/ser_16x5x.tmp -E -o
> > src/devs_serial_generic_16x5x_ser_16x5x.i
> > 
/opt/development/ecos/packages/devs/serial/generic/16x5x/current/src/ser_16x5x.c

> >
> >
> >
> > So I am asking can I do something to let eCos Configuration Tool
> > generate NOT ONLY ".o", BUT ALSO other outputs(.i, .s, etc.)?
>
>Just add "-save-outputs" to your global GCC options.
>
>Note: I normally do this by hand for the file(s) I'm interested in as
>turning it on in a build tree will create tons of files, some of which
>can be quite large...
>
>--
>------------------------------------------------------------
>Gary Thomas                 |  Consulting for the
>MLB Associates              |    Embedded world
>------------------------------------------------------------



-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [ECOS] Can I also generate other outputs of gcc when build?
  2006-09-22  5:04 ` [ECOS] Can I also generate other outputs of gcc when build? wang cui
@ 2006-09-22  9:47   ` Gary Thomas
  2006-09-25  4:03     ` wang cui
  0 siblings, 1 reply; 5+ messages in thread
From: Gary Thomas @ 2006-09-22  9:47 UTC (permalink / raw)
  To: wang cui; +Cc: ecos-discuss

wang cui wrote:
> As eCos Configuration Tool generate ".o" file for each source file 
> defaultly. Manytimes I need to check the preprocessed output(sometimes 
> compiled assembly output) of source file.
> 
> By now, I have to manually call gcc, in a bash shell, with a additional 
> "-E -o xxx.i" option to generate the preprocessed output for check.
> 
> For example:
> arm-elf-gcc -c  
> -I/ecos-c/cygwin/opt/development/project/cpu_4c_lib/lib_install/include 
> -I/opt/development/ecos/packages/devs/serial/generic/16x5x/current 
> -I/opt/development/ecos/packages/devs/serial/generic/16x5x/current/src 
> -I/opt/development/ecos/packages/devs/serial/generic/16x5x/current/tests 
> -I. 
> -I/opt/development/ecos/packages/devs/serial/generic/16x5x/current/src/ 
> -finline-limit=7000 -mcpu=arm7tdmi -mno-short-load-words -Wall 
> -Wpointer-arith -Wstrict-prototypes -Winline -Wundef  -g -O0 
> -ffunction-sections -fdata-sections  -fno-exceptions   
> -Wp,-MD,src/ser_16x5x.tmp -E -o 
> src/devs_serial_generic_16x5x_ser_16x5x.i 
> /opt/development/ecos/packages/devs/serial/generic/16x5x/current/src/ser_16x5x.c 
> 
> 
> 
> So I am asking can I do something to let eCos Configuration Tool 
> generate NOT ONLY ".o", BUT ALSO other outputs(.i, .s, etc.)?

Just add "-save-outputs" to your global GCC options.

Note: I normally do this by hand for the file(s) I'm interested in as
turning it on in a build tree will create tons of files, some of which
can be quite large...

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [ECOS] Can I also generate other outputs of gcc when build?
  2006-09-22  2:18 [ECOS] "RedBoot" configuration appears in "default" template? wang cui
@ 2006-09-22  5:04 ` wang cui
  2006-09-22  9:47   ` Gary Thomas
  0 siblings, 1 reply; 5+ messages in thread
From: wang cui @ 2006-09-22  5:04 UTC (permalink / raw)
  To: ecos-discuss

As eCos Configuration Tool generate ".o" file for each source file 
defaultly. 
Manytimes I need to check the preprocessed output(sometimes compiled 
assembly output) of source file.

By now, I have to manually call gcc, in a bash shell, with a additional "-E 
-o xxx.i" option to generate the preprocessed output for check.

For example:
arm-elf-gcc -c  
-I/ecos-c/cygwin/opt/development/project/cpu_4c_lib/lib_install/include 
-I/opt/development/ecos/packages/devs/serial/generic/16x5x/current 
-I/opt/development/ecos/packages/devs/serial/generic/16x5x/current/src 
-I/opt/development/ecos/packages/devs/serial/generic/16x5x/current/tests 
-I. -I/opt/development/ecos/packages/devs/serial/generic/16x5x/current/src/ 
-finline-limit=7000 -mcpu=arm7tdmi -mno-short-load-words -Wall 
-Wpointer-arith -Wstrict-prototypes -Winline -Wundef  -g -O0 
-ffunction-sections -fdata-sections  -fno-exceptions   
-Wp,-MD,src/ser_16x5x.tmp -E -o src/devs_serial_generic_16x5x_ser_16x5x.i 
/opt/development/ecos/packages/devs/serial/generic/16x5x/current/src/ser_16x5x.c


So I am asking can I do something to let eCos Configuration Tool generate 
NOT ONLY ".o", BUT ALSO other outputs(.i, .s, etc.)?



-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-09-26  1:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-09-24 23:31 [ECOS] Can I also generate other outputs of gcc when build? Simon
  -- strict thread matches above, loose matches on Subject: below --
2006-09-22  2:18 [ECOS] "RedBoot" configuration appears in "default" template? wang cui
2006-09-22  5:04 ` [ECOS] Can I also generate other outputs of gcc when build? wang cui
2006-09-22  9:47   ` Gary Thomas
2006-09-25  4:03     ` wang cui
2006-09-26  1:51       ` wang cui

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).