[ECOS] SH2 Build Problems

James Yates j.yates@quartzuk.com
Fri Oct 17 09:37:00 GMT 2003


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



More information about the Ecos-discuss mailing list