[ACTIVITY] WW49

2011-12-11 Thread Zhenqiang Chen
Summary
* "make check-gcc" for linux gcc, cygwin gcc and native windows gcc.

Details:
1. "make check-gcc" on linux.
 * One more failed case (gcc.dg/visibility-d) for the toolchain
generated from crosstool-ng based on embedded toolchain code base. But
logs show the .s files are the same.

2. "make check-gcc" on windows.
 * Dir format issue:
  Native windows programs require the disk symbol format as c:, d:,
etc. But in cygwin, it is changed to /cygdrive/c, /cygdrive/d. Need
wrapper to convert it.
 * qemu output in cygwin (Qemu-0.15.1-windows-Medium.zip from
http://lassauge.free.fr/qemu/)
  qemu can not output the result like "*** EXIT 0" on screen. Need
wrapper to handle it.
 * "make check-gcc" for cygwin toolchain (build from scratch in cygwin).
  You can run make check like it on linux.
 * "make check-gcc" for pre-installed binary toolchain (installed as
native windows programs)
  a. configure gcc from the source package. (Only need the config*,
Makefile to make sure "make check" work)
  b. reset the TEST_GCC_EXEC_PREFIX (site.exp) to the correct dir
(INSTALL DIR) with the right format.
  c. wrap gcc/xgcc to use the pre-installed gcc and change the dir format.
  d. handle /usr/share/dejagnu/testglue.c (cp it to current test dir
or convert it to windows path)

Plan:
* Handle g++ test on windows.
* Work out a formal document or wiki page on how to "make check-gcc" on windows.
* Test and analyze the failed cases.

Best regards!
-Zhenqiang

PS:
1) qemu-system-arm.exe sample
#!/bin/sh
dir=`dirname $0`
run ()
{
  # Change /cygdrive/e to e:
  para=`echo $* | sed -e 's/\/cygdrive\/e/e\:/'`

  # arm.exe is the real qemu-system-arm.exe
  # output to stdout.txt or stderror.txt.
  $dir/arm.exe $para | tee

  # output to screen
  cat $dir/stdout.txt
}
run $*

2) xgcc.exe sample
#!/bin/sh
run ()
{
  # Change /cygdrive/e to e:
  para=`echo $* | sed -e 's/\/cygdrive\/e/e\:/'`

  # Use a local copy of testglue.c rather than /usr/share/dejagnu/testglue.c
  para=`echo $para | sed -e 's/\/usr\/share\/dejagnu\/testglue.c/testglue.c/g'`

  # run the test with preinstalled binary toolchain
  #TBD: handle g++
  arm-none-eabi-gcc.exe $para
}
run $*

3) TEST_GCC_EXEC_PREFIX in site.exp sample
# Toolchain is installed at e:/Dec/RC3.
TEST_GCC_EXEC_PREFIX "e:/Dec/RC3/lib/gcc/"

___
linaro-toolchain mailing list
linaro-toolchain@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-toolchain


Re: [ACTIVITY] WW49

2011-12-11 Thread Michael Hope
On Mon, Dec 12, 2011 at 3:33 PM, Zhenqiang Chen
 wrote:
> Summary
> * "make check-gcc" for linux gcc, cygwin gcc and native windows gcc.
>
> Details:
> 1. "make check-gcc" on linux.
>  * One more failed case (gcc.dg/visibility-d) for the toolchain
> generated from crosstool-ng based on embedded toolchain code base. But
> logs show the .s files are the same.

visibility-d.c seems to cover symbol visibility.  Are you using
different versions of binutils?

> 2. "make check-gcc" on windows.
>  * Dir format issue:
>  Native windows programs require the disk symbol format as c:, d:,
> etc. But in cygwin, it is changed to /cygdrive/c, /cygdrive/d. Need
> wrapper to convert it.

Have a look at cygpath.

>  * qemu output in cygwin (Qemu-0.15.1-windows-Medium.zip from
> http://lassauge.free.fr/qemu/)
>  qemu can not output the result like "*** EXIT 0" on screen. Need
> wrapper to handle it.

Unfortunately qemu doesn't pass through the exit code to the host
shell.  The good news is DejaGnu includes a wrapper that does this for
you.

See:
 https://wiki.linaro.org/WorkingGroups/ToolChain/CrossTestingQemu

for how we cross test on Linux.

-- Michael

___
linaro-toolchain mailing list
linaro-toolchain@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-toolchain


Re: [ACTIVITY] WW49

2011-12-11 Thread Zhenqiang Chen
>> Details:
>> 1. "make check-gcc" on linux.
>>  * One more failed case (gcc.dg/visibility-d) for the toolchain
>> generated from crosstool-ng based on embedded toolchain code base. But
>> logs show the .s files are the same.
>
> visibility-d.c seems to cover symbol visibility.  Are you using
> different versions of binutils?

It passes after adding the binutils built from crosstool-ng to PATH.

>> 2. "make check-gcc" on windows.
>>  * Dir format issue:
>>  Native windows programs require the disk symbol format as c:, d:,
>> etc. But in cygwin, it is changed to /cygdrive/c, /cygdrive/d. Need
>> wrapper to convert it.
>
> Have a look at cygpath.

Thank you. I will use cygpath rather than script by myself.

>>  * qemu output in cygwin (Qemu-0.15.1-windows-Medium.zip from
>> http://lassauge.free.fr/qemu/)
>>  qemu can not output the result like "*** EXIT 0" on screen. Need
>> wrapper to handle it.
>
> Unfortunately qemu doesn't pass through the exit code to the host
> shell.  The good news is DejaGnu includes a wrapper that does this for
> you.
>
> See:
>  https://wiki.linaro.org/WorkingGroups/ToolChain/CrossTestingQemu

I reuse the embedded toolchain qemu wrapper. It works.

By now, all gcc tests work although there are several new fails
compared to linux test.

But still have PATH format issues for g++ tests.

Thanks!
-Zhenqiang

___
linaro-toolchain mailing list
linaro-toolchain@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/linaro-toolchain