public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* RE: [ECOS] SH2 Build Problems
@ 2003-10-17 10:48 James Yates
  0 siblings, 0 replies; 3+ messages in thread
From: James Yates @ 2003-10-17 10:48 UTC (permalink / raw)
  To: Andrew Lunn; +Cc: ecos-discuss

Many Thanks Andrew. I have finally sorted it out although i think my eyes are giving up on my after careful comparing lots of files. It turns out that line 2 of my custom build step had the -S missing from it so gcc was trying to assemble and link the file rather than just compile it. 
Many thanks, no I can proceed.

   James Yates

-----Original Message-----
From: Andrew Lunn [mailto:andrew@lunn.ch]
Sent: 17 October 2003 11:05
To: James Yates
Cc: ecos-discuss@sources.redhat.com
Subject: Re: [ECOS] SH2 Build Problems


> The fgrep command is specified in the architecture cdl script:
> 
> make -priority 1 {
>         <PREFIX>/include/cyg/hal/sh2_offsets.inc : <PACKAGE>/src/var_mk_defs.c
>         $(CC) $(CFLAGS) $(INCLUDE_PATH) -Wp,-MD,sh2_offsets.tmp -o var_mk_defs.tmp -S $<
>         fgrep .equ var_mk_defs.tmp | sed s/#// > $@
>         @echo $@ ": \\" > $(notdir $@).deps
>         @tail +2 sh2_offsets.tmp >> $(notdir $@).deps
>         @echo >> $(notdir $@).deps
>         @rm sh2_offsets.tmp var_mk_defs.tmp
>     }
> 

> The scripts in both the working and non-working trees are
> identical. Can anyone tell me where this fgrep command is called
> from in the build process or why in one build this doesn't happen
> the second time.

The "-priority 1" controls when this section of make script is
executed. See:

http://ecos.sourceware.org/ecos/docs-latest/cdl-guide/build.make.html#BUILD.CUSTOM

One guess as to why it does not do it is because the dependencies are
wrong somehow. It thinks the target is up to date so there is no need
to rebuilt it. Deleting the file should force it to rebuild it.

   Andrew

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

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

* Re: [ECOS] SH2 Build Problems
  2003-10-17  9:37 James Yates
@ 2003-10-17 10:04 ` Andrew Lunn
  0 siblings, 0 replies; 3+ messages in thread
From: Andrew Lunn @ 2003-10-17 10:04 UTC (permalink / raw)
  To: James Yates; +Cc: ecos-discuss

> The fgrep command is specified in the architecture cdl script:
> 
> make -priority 1 {
>         <PREFIX>/include/cyg/hal/sh2_offsets.inc : <PACKAGE>/src/var_mk_defs.c
>         $(CC) $(CFLAGS) $(INCLUDE_PATH) -Wp,-MD,sh2_offsets.tmp -o var_mk_defs.tmp -S $<
>         fgrep .equ var_mk_defs.tmp | sed s/#// > $@
>         @echo $@ ": \\" > $(notdir $@).deps
>         @tail +2 sh2_offsets.tmp >> $(notdir $@).deps
>         @echo >> $(notdir $@).deps
>         @rm sh2_offsets.tmp var_mk_defs.tmp
>     }
> 

> The scripts in both the working and non-working trees are
> identical. Can anyone tell me where this fgrep command is called
> from in the build process or why in one build this doesn't happen
> the second time.

The "-priority 1" controls when this section of make script is
executed. See:

http://ecos.sourceware.org/ecos/docs-latest/cdl-guide/build.make.html#BUILD.CUSTOM

One guess as to why it does not do it is because the dependencies are
wrong somehow. It thinks the target is up to date so there is no need
to rebuilt it. Deleting the file should force it to rebuild it.

   Andrew

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

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

* [ECOS] SH2 Build Problems
@ 2003-10-17  9:37 James Yates
  2003-10-17 10:04 ` Andrew Lunn
  0 siblings, 1 reply; 3+ messages in thread
From: James Yates @ 2003-10-17  9:37 UTC (permalink / raw)
  To: ecos-discuss

I have a working V2 source tree of eCos with which I can build a library for an SH2. I also have the latest source tree with which I get a build problem.

During the start of the build process, 2 files, hal_mk_defs.c and var_mk_defs.c are processed. The source file is compiled to a tmp file and an 'fgrep' command is then run on it outputted to a file sh_offsets.inc, this is then compiled.

On my working tree both these files go through this fgrep process. On my non-working but up-to-date tree, only the first file has fgrep run on it and so the second one fails to build:

Working build:

sh-elf-gcc -mb -m2 -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -ggdb -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvtable-gc -finit-priority  -I/ecos-d/Dev/eCos/builds/unnamed3_install/include -I/ecos-d/ecos/Working/packages/hal/sh/sh2/v2_0 -I/ecos-d/ecos/Working/packages/hal/sh/sh2/v2_0/src -I/ecos-d/ecos/Working/packages/hal/sh/sh2/v2_0/tests -I. -Wp,-MD,sh2_offsets.tmp -o var_mk_defs.tmp -S /ecos-d/ecos/Working/packages/hal/sh/sh2/v2_0/src/var_mk_defs.c
fgrep .equ var_mk_defs.tmp | sed s/#// > /ecos-d/Dev/eCos/builds/unnamed3_install/include/cyg/hal/sh2_offsets.inc
make[1]: Leaving directory `/ecos-d/Dev/eCos/builds/unnamed3_build/hal/sh/sh2/v2_0'
make -r -C hal/sh/arch/v2_0 build
make[1]: Entering directory `/ecos-d/Dev/eCos/builds/unnamed3_build/hal/sh/arch/v2_0'

Non-working build:

sh-elf-gcc -mb -m2 -Wall -Wpointer-arith -Wstrict-prototypes -Winline -Wundef -Woverloaded-virtual -g -O2 -ffunction-sections -fdata-sections -fno-rtti -fno-exceptions -fvtable-gc -finit-priority  -I/ecos-d/Dev/eCos/builds/unnamed2_install/include -I/ecos-d/ecos/ecos_latest_modded/packages/hal/sh/sh2/current -I/ecos-d/ecos/ecos_latest_modded/packages/hal/sh/sh2/current/src -I/ecos-d/ecos/ecos_latest_modded/packages/hal/sh/sh2/current/tests -I. -Wp,-MD,sh2_offsets.tmp -o var_mk_defs.tmp /ecos-d/ecos/ecos_latest_modded/packages/hal/sh/sh2/current/src/var_mk_defs.c
make[1]: Leaving directory `/ecos-d/Dev/eCos/builds/unnamed2_build/hal/sh/sh2/current'
/ecos-c/temp/ccVwfqpP.s: Assembler messages:
make: Leaving directory `/ecos-d/Dev/eCos/builds/unnamed2_build'
/ecos-c/temp/ccVwfqpP.s:26: Error: bad expression
/ecos-c/temp/ccVwfqpP.s:26: Warning: rest of line ignored; first ignored character is `0'
/ecos-c/temp/ccVwfqpP.s:29: Error: bad expression
/ecos-c/temp/ccVwfqpP.s:29: Warning: rest of line ignored; first ignored character is `0'
/ecos-c/temp/ccVwfqpP.s:32: Error: bad expression
/ecos-c/temp/ccVwfqpP.s:32: Warning: rest of line ignored; first ignored character is `0'
/ecos-c/temp/ccVwfqpP.s:35: Error: bad expression


The fgrep command is specified in the architecture cdl script:

make -priority 1 {
        <PREFIX>/include/cyg/hal/sh2_offsets.inc : <PACKAGE>/src/var_mk_defs.c
        $(CC) $(CFLAGS) $(INCLUDE_PATH) -Wp,-MD,sh2_offsets.tmp -o var_mk_defs.tmp -S $<
        fgrep .equ var_mk_defs.tmp | sed s/#// > $@
        @echo $@ ": \\" > $(notdir $@).deps
        @tail +2 sh2_offsets.tmp >> $(notdir $@).deps
        @echo >> $(notdir $@).deps
        @rm sh2_offsets.tmp var_mk_defs.tmp
    }

The scripts in both the working and non-working trees are identical. Can anyone tell me where this fgrep command is called from in the build process or why in one build this doesn't happen the second time.

I am really scratching my head as I can't use the latest source until I sort out this problem.

	Many Thanks in advance.


		James Yates

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

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

end of thread, other threads:[~2003-10-17 10:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-17 10:48 [ECOS] SH2 Build Problems James Yates
  -- strict thread matches above, loose matches on Subject: below --
2003-10-17  9:37 James Yates
2003-10-17 10:04 ` Andrew Lunn

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