On Wed, Oct 21, 2009 at 7:25 AM, Zach Welch <[email protected]> wrote:
> On Tue, 2009-10-20 at 08:58 +0200, Øyvind Harboe wrote:
>> On Tue, Oct 20, 2009 at 2:30 AM, David Brownell <[email protected]> wrote:
>> > On Monday 19 October 2009, Øyvind Harboe wrote:
> [snip]
>> >> - there can be hard to track errors such as bin2char being
>> >> left in src/helper and subsequently trying to use build !=
>> >> src dir will fail.
>> >
>> > You mean build/src/helper or source/src/helper??
>>
>> if you have a file in source/src/helper/bin2char, then
>> a subsequent build w/build_dir != src_dir will fail.
>
> Does this patch fix this particular problem for you?

No, it's worse in several ways:

1. build & distclean in src dir is slightly broken. A "make distclean" no
longer cleans out the souirce/src/helper/bin2char binary.

sh bootstrap
./configure --enable-maintainer-mode --enable-dummy
make
make distclean

2. host != build (linux cross compile) && build != src dir => broken.  Here
bin2char is of the host type(i.e. arm-elf in my case):

../../src/helper/bin2char <
/home/oyvind/workspace/zy1000/build/../openocd/src/target/xscale/debug_handler.bin
xscale_debug_handler > xscale_debug.h
/bin/sh: ../../src/helper/bin2char: cannot execute binary file
make[3]: *** [xscale_debug.h] Error 126
make[3]: Leaving directory `/tmp/ecosboard/build/src/target'


See bin2char being built w/host compiler instead of build compiler:

arm-elf-gcc -std=gnu99 -I/tmp/ecosboard/build
-I/tmp/ecosboard/ecos/install/include/ -mcpu=arm7tdmi -Wall
-Wpointer-arith -Winline -Wundef -g -O3 -ffunction-sections
-fdata-sections -fno-exceptions -mlong-calls -D__ECOS=1
-I/tmp/ecosboard/ecos/install/include -Wall -Wstrict-prototypes
-Wformat-security -Wextra -Wno-unused-parameter -Wbad-function-cast
-Wcast-align -Wredundant-decls -I/tmp/ecosboard/build
-I/tmp/ecosboard/ecos/install/include/ -mcpu=arm7tdmi -Wall
-Wpointer-arith -Winline -Wundef -g -O3 -ffunction-sections
-fdata-sections -fno-exceptions -mlong-calls -D__ECOS=1 -mcpu=arm7tdmi
-Wl,--gc-sections -Wl,-static -g -nostdlib -nostartfiles
-Wl,--undefined=pthread_mutex_lock -L/tmp/ecosboard/ecos/install/lib
-Ttarget.ld -Wl,-Map,/tmp/ecosboard/build/openocd.map
-L/tmp/ecosboard/ocdinstall/lib
/home/oyvind/workspace/zy1000/build/../openocd/src/target/../../src/helper/bin2char.c
  -o ../../src/helper/bin2char

-- 
Øyvind Harboe
http://www.zylin.com/zy1000.html
ARM7 ARM9 ARM11 XScale Cortex
JTAG debugger and flash programmer
_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to