[U-Boot-Users] KPIT GNUSH compiler not sufficient to compile U-Boot under Cygwin

Jonas Mark (ST/EPP1) * Mark.Jonas at de.bosch.com
Tue May 31 15:24:23 CEST 2005


Hello,

because I am not allowed to use Linux but forced to use Windows 2000
instead I am currently trying to port U-Boot to a Renesas SH7720 (SH-3
core) based platform using Cygwin and a precompiled, freely downloadable
gcc 3.4 from KPIT Cummins (http://www.kpitgnutools.com/). Although this
is definitely an issue of KPIT and not of U-Boot I am posting here with
the hope that someone may have an idea how to fix or work around this
problem. I sent the following text to KPIT's support team:

##########

Dear KPIT support team,

I use GNUSHv0501 installed to C:\KPIT_Cummins\GNUSHv0501-ELF from
Cygwin.
I decided to not install it to its default directory to avoid known Unix
trouble when there are white spaces in paths or file names.

While trying to port U-Boot to SH-3 I noticed that /cygdrive/c based
paths
or mounted paths do not work with the GNUSH tools. c:/ like paths work.
This is not problem for GCC tools that come with Cygwin. To reproduce
the
problem please do the following.

 1.) Extract the attached test.tar.bz2 to C:\Playground\test.

 2.) Open a Cygwin Bash command line.

 3.) Make sure the GNUSH tools are in the path.
	$ which sh-elf-gcc
	/cygdrive/c/KPIT_Cummins/GNUSHv0403-ELF/sh-elf/bin/sh-elf-gcc

 4.) mkdir /test && mount c:/Playground/test /test && cd /test/src

 5.) Compile the program using Cygwin's gcc.
	$ gcc -I/test/inc -o hello hello.c
	$ ./hello
	Hello, world!

 6.) Compile the program using GNUSH's gcc.
	$ sh-elf-gcc -I/test/inc -o hello hello.c
	hello.c:2:19: hello.h: No such file or directory
     Fails!

 7.) Try a /cygdrive/ path instead.
	$ sh-elf-gcc -I/cygdrive/c/Playground/test/inc -o hello hello.c
	hello.c:2:19: hello.h: No such file or directory
     Fails!

 8.) Ty a c:/ path instead.
	$ sh-elf-gcc -Ic:/Playground/test/inc -o hello hello.c
	$ sh-elf-objdump -a hello

	hello:     file format elf32-sh
	hello
     Succeeds.

This behavior is very problematic because most Cygwin tools do not
return
c:/ paths but mounted or /cygdrive/ paths. IMHO there is something
severly
wrong with GNUSH. How do I get this working with all kinds of legal
paths?

To make things worse continue on and try the following:

 9.) Compile the program using a different include directory where one
     header file includes another one.
	$ gcc -Ic:/Playground/test/inc2 -o hello hello.c
     Succeeds with Cygwin's gcc.

10.) Now try GNUSH's gcc.
	$ sh-elf-gcc -Ic:/Playground/test/inc2 -o hello hello.c
     Succeeds as well (as anticipated).

11.) Convert inc2/universe from directory to symbolic link.
	$ mv ../inc2/universe ../inc2/parallel && ln -s ../inc2/parallel
../inc2/universe
	$ ls -la ../inc2 
	total 2
	drwxr-xr-x+ 3 jom2ot         mkgroup-l-d  0 May 31 14:43 .
	drwxrwxrwx+ 5 Administrators ????????     0 May 31 14:22 ..
	-rw-r--r--  1 jom2ot         mkgroup-l-d 28 May 31 14:40 hello.h
	drwxr-xr-x+ 2 jom2ot         mkgroup-l-d  0 May 31 14:25
parallel
	lrwxrwxrwx  1 jom2ot         mkgroup-l-d 16 May 31 14:43
universe -> ../inc2/parallel

12.) Try Cygwin's gcc.
	$ gcc -Ic:/Playground/test/inc2 -o hello hello.c
     Succeeds.

13.) Try GNUSH's gcc.
	$ sh-elf-gcc -Ic:/Playground/test/inc2 -o hello hello.c
	In file included from hello.c:2:
	c:/Playground/test/inc2/hello.h:1:28: universe/world.h: No such
file or directory
     Fails!

That means, even if only using c:/ paths would be an acceptable
workaround
this technique fails once there are symbolic links involved. IMHO even
more proof that there is something severly wrong with GNUSH.

The problem is reproducible with GNUSH v0501 as well as v0403.

Sadly, I am not allowed to use Linux.

Thank you for giving away the KPIT GNU tools and support for free.

Best Regards
Mark Jonas

##########

$ uname -a
CYGWIN_NT-5.0 OT02490 1.5.16(0.128/4/2) 2005-04-25 20:26 i686 unknown
unknown Cygwin

$ cygcheck -s

Cygwin Configuration Diagnostics
Current System Time: Tue May 31 13:53:14 2005

Windows 2000 Professional Ver 5.0 Build 2195 Service Pack 4

Path:   C:\cygwin\usr\local\bin
        C:\cygwin\bin
        C:\cygwin\bin
        C:\cygwin\usr\X11R6\bin
        c:\orant\bin
        \\ot1esw2\magicpanel\PVCS\vm\win32\bin
        \\ot1esw2\magicpanel\PVCS\vm\common\bin\win32
        c:\WINNT\system32
        c:\WINNT
        c:\WINNT\System32\Wbem
        c:\Program Files\PC-Doctor for Windows\services
        c:\ixos-a~1\bin
        c:\Program Files\it_sec\iT_SEC_Shared
        c:\RPS\Lib
        c:\Program Files\doxygen\bin
        c:\Program Files\Subversion\bin
        c:\PROGRA~1\ATT\Graphviz\bin
        c:\PROGRA~1\ATT\Graphviz\bin\tools
        c:\Program Files\Microsoft Visual Studio\Common\Tools\WinNT
        c:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin
        c:\Program Files\Microsoft Visual Studio\Common\Tools
        c:\Program Files\Microsoft Visual Studio\VC98\bin
        c:\GHS\v800351
        c:\KPIT_Cummins\GNUSHv0403-ELF\sh-elf\bin

Output from C:\cygwin\bin\id.exe (ntsec)
UID: 512267(jom2ot)     GID: 10545(mkgroup-l-d)
0(root)                 544(Administrators)     547(Power Users)
545(Users)              1000(Debugger Users)    10545(mkgroup-l-d)

SysDir: C:\WINNT\system32
WinDir: C:\WINNT

HOME = `c:\Documents and Settings\jom2ot'
MAKE_MODE = `unix'
PWD = `/test/src'
USER = `jom2ot'

Use `-r' to scan registry

a:  fd             N/A    N/A                    
c:  hd  NTFS     38154Mb  38% CP CS UN PA FC     System Volume
d:  cd             N/A    N/A                    
k:  net NTFS    700043Mb  61% CP CS UN PA FC     Data_1
m:  net NTFS    700043Mb  72% CP CS UN PA FC     DATA_1
n:  net NTFS    700043Mb  61% CP CS UN PA FC     Data_1
t:  net NTFS    700043Mb  61% CP CS UN PA FC     Data_1
u:  net NTFS     20002Mb 100% CP CS UN PA FC     Data_U
w:  net NTFS     85564Mb  70% CP CS UN PA FC     DATEN2
x:  net NTFS    700043Mb  79% CP CS UN PA FC     Data_2

C:\cygwin             /          system  binmode
c:\Playground\test    /test      system  binmode
c:\Playground\u-boot  /u-boot    system  binmode
C:\cygwin/bin         /usr/bin   system  binmode
C:\cygwin/lib         /usr/lib   system  binmode
.                     /cygdrive  system  binmode,cygdrive

Found: C:\cygwin\bin\awk.exe
Found: C:\cygwin\bin\bash.exe
Found: C:\cygwin\bin\cat.exe
Found: C:\cygwin\bin\cp.exe
Found: C:\cygwin\bin\cpp.exe
Found: C:\cygwin\bin\find.exe
Found: C:\cygwin\bin\gcc.exe
Not Found: gdb
Found: C:\cygwin\bin\grep.exe
Found: C:\cygwin\bin\ld.exe
Found: C:\cygwin\bin\ls.exe
Found: C:\cygwin\bin\make.exe
Found: C:\cygwin\bin\mv.exe
Found: C:\cygwin\bin\rm.exe
Found: C:\cygwin\bin\sed.exe
Found: C:\cygwin\bin\sh.exe
Found: C:\cygwin\bin\tar.exe

   93k 2005/02/17 C:\cygwin\bin\cygapr-0-0.dll
   68k 2005/02/17 C:\cygwin\bin\cygaprutil-0-0.dll
   55k 2004/09/14 C:\cygwin\bin\cygbz2-1.dll
   18k 2004/07/06 C:\cygwin\bin\cygcharset-1.dll
    7k 2003/10/19 C:\cygwin\bin\cygcrypt-0.dll
  858k 2005/04/11 C:\cygwin\bin\cygcrypto-0.9.7.dll
  895k 2004/04/28 C:\cygwin\bin\cygdb-4.2.dll
 1156k 2004/04/28 C:\cygwin\bin\cygdb_cxx-4.2.dll
  174k 2004/10/14 C:\cygwin\bin\cygexpat-0.dll
   40k 2004/10/10 C:\cygwin\bin\cygform-8.dll
   45k 2001/04/25 C:\cygwin\bin\cygform5.dll
   35k 2002/01/09 C:\cygwin\bin\cygform6.dll
   48k 2003/08/09 C:\cygwin\bin\cygform7.dll
   28k 2003/07/20 C:\cygwin\bin\cyggdbm-3.dll
   30k 2003/08/11 C:\cygwin\bin\cyggdbm-4.dll
   19k 2003/03/22 C:\cygwin\bin\cyggdbm.dll
   15k 2003/07/20 C:\cygwin\bin\cyggdbm_compat-3.dll
   15k 2003/08/11 C:\cygwin\bin\cyggdbm_compat-4.dll
  135k 2004/09/02 C:\cygwin\bin\cygglib-1-2-0.dll
   11k 2004/09/02 C:\cygwin\bin\cyggmodule-1-2-0.dll
   10k 2004/09/02 C:\cygwin\bin\cyggthread-1-2-0.dll
   17k 2001/06/28 C:\cygwin\bin\cyghistory4.dll
   29k 2003/08/10 C:\cygwin\bin\cyghistory5.dll
   25k 2004/10/12 C:\cygwin\bin\cyghistory6.dll
  991k 2004/07/06 C:\cygwin\bin\cygiconv-2.dll
   22k 2001/12/13 C:\cygwin\bin\cygintl-1.dll
   37k 2003/08/10 C:\cygwin\bin\cygintl-2.dll
   54k 2004/07/06 C:\cygwin\bin\cygintl-3.dll
   21k 2001/06/20 C:\cygwin\bin\cygintl.dll
   22k 2004/10/10 C:\cygwin\bin\cygmenu-8.dll
   26k 2001/04/25 C:\cygwin\bin\cygmenu5.dll
   20k 2002/01/09 C:\cygwin\bin\cygmenu6.dll
   29k 2003/08/09 C:\cygwin\bin\cygmenu7.dll
   74k 2004/10/10 C:\cygwin\bin\cygncurses++-8.dll
  156k 2001/04/25 C:\cygwin\bin\cygncurses++5.dll
  175k 2002/01/09 C:\cygwin\bin\cygncurses++6.dll
  216k 2004/10/10 C:\cygwin\bin\cygncurses-8.dll
  226k 2001/04/25 C:\cygwin\bin\cygncurses5.dll
  202k 2002/01/09 C:\cygwin\bin\cygncurses6.dll
  224k 2003/08/09 C:\cygwin\bin\cygncurses7.dll
   92k 2004/07/10 C:\cygwin\bin\cygneon-24.dll
   13k 2004/10/10 C:\cygwin\bin\cygpanel-8.dll
   15k 2001/04/25 C:\cygwin\bin\cygpanel5.dll
   12k 2002/01/09 C:\cygwin\bin\cygpanel6.dll
   19k 2003/08/09 C:\cygwin\bin\cygpanel7.dll
   62k 2003/12/11 C:\cygwin\bin\cygpcre-0.dll
   63k 2003/04/11 C:\cygwin\bin\cygpcre.dll
    9k 2003/12/11 C:\cygwin\bin\cygpcreposix-0.dll
   61k 2003/04/11 C:\cygwin\bin\cygpcreposix.dll
 1252k 2005/01/27 C:\cygwin\bin\cygperl5_8.dll
   22k 2002/06/09 C:\cygwin\bin\cygpopt-0.dll
  108k 2001/06/28 C:\cygwin\bin\cygreadline4.dll
  148k 2003/08/10 C:\cygwin\bin\cygreadline5.dll
  144k 2004/10/12 C:\cygwin\bin\cygreadline6.dll
  171k 2005/04/11 C:\cygwin\bin\cygssl-0.9.7.dll
  125k 2005/04/13 C:\cygwin\bin\cygsvn_client-1-0.dll
   28k 2005/04/13 C:\cygwin\bin\cygsvn_delta-1-0.dll
   23k 2005/04/13 C:\cygwin\bin\cygsvn_diff-1-0.dll
   15k 2005/04/13 C:\cygwin\bin\cygsvn_fs-1-0.dll
  113k 2005/04/13 C:\cygwin\bin\cygsvn_fs_base-1-0.dll
   79k 2005/04/13 C:\cygwin\bin\cygsvn_fs_fs-1-0.dll
    8k 2005/04/13 C:\cygwin\bin\cygsvn_ra-1-0.dll
   72k 2005/04/13 C:\cygwin\bin\cygsvn_ra_dav-1-0.dll
   16k 2005/04/13 C:\cygwin\bin\cygsvn_ra_local-1-0.dll
   53k 2005/04/13 C:\cygwin\bin\cygsvn_ra_svn-1-0.dll
   83k 2005/04/13 C:\cygwin\bin\cygsvn_repos-1-0.dll
  128k 2005/04/13 C:\cygwin\bin\cygsvn_subr-1-0.dll
  136k 2005/04/13 C:\cygwin\bin\cygsvn_wc-1-0.dll
 1242k 2005/01/08 C:\cygwin\bin\cygxml2-2.dll
   62k 2004/10/10 C:\cygwin\bin\cygz.dll
 1163k 2005/04/26 C:\cygwin\bin\cygwin1.dll
    Cygwin DLL version info:
        DLL version: 1.5.16
        DLL epoch: 19
        DLL bad signal mask: 19005
        DLL old termios: 5
        DLL malloc env: 28
        API major: 0
        API minor: 128
        Shared data: 4
        DLL identifier: cygwin1
        Mount registry: 2
        Cygnus registry name: Cygnus Solutions
        Cygwin registry name: Cygwin
        Program options name: Program Options
        Cygwin mount registry name: mounts v2
        Cygdrive flags: cygdrive flags
        Cygdrive prefix: cygdrive prefix
        Cygdrive default prefix: 
        Build date: Mon Apr 25 20:26:35 EDT 2005
        Shared id: cygwin1S4

  958k 2004/08/25
c:\KPIT_Cummins\GNUSHv0403-ELF\sh-elf\bin\cygiconv-2.dll
  224k 2004/08/25
c:\KPIT_Cummins\GNUSHv0403-ELF\sh-elf\bin\cygncurses7.dll
 1100k 2004/08/25 c:\KPIT_Cummins\GNUSHv0403-ELF\sh-elf\bin\cygwin1.dll
    Cygwin DLL version info:
        DLL version: 1.5.9
        DLL epoch: 19
        DLL bad signal mask: 19005
        DLL old termios: 5
        DLL malloc env: 28
        API major: 0
        API minor: 112
        Shared data: 4
        DLL identifier: cygwin1
        Mount registry: 2
        Cygnus registry name: Cygnus Solutions
        Cygwin registry name: Cygwin
        Program options name: Program Options
        Cygwin mount registry name: mounts v2
        Cygdrive flags: cygdrive flags
        Cygdrive prefix: cygdrive prefix
        Cygdrive default prefix: 
        Build date: Thu Mar 18 23:05:18 EST 2004
        Shared id: cygwin1S4

Warning: There are multiple cygwin1.dlls on your path

Cygwin Package Information
Package              Version
_update-info-dir     00232-1
ash                  20040127-1
autoconf             2.59-1
autoconf-devel       2.59-1
autoconf-stable      2.13-5
automake             1.7.9-1
automake-devel       1.9.2-1
automake-stable      1.4p6-2
base-files           3.4-1
base-passwd          2.2-1
bash                 2.05b-17
binutils             20041229-1
bison                20030307-1
bzip2                1.0.2-6
coreutils            5.3.0-5
crypt                1.1-1
cygutils             1.2.8-1
cygwin               1.5.16-1
cygwin-doc           1.4-2
dejagnu              20021217-2
diffstat             1.39-1
diffutils            2.8.7-1
editrights           1.01-1
expat                1.95.8-1
expect               20030128-1
findutils            20041227-1
flex                 2.5.4a-3
gawk                 3.1.4-3
gcc                  3.3.3-3
gcc-core             3.3.3-3
gcc-g++              3.3.3-3
gcc-mingw-core       20040810-1
gcc-mingw-g++        20040810-1
gcc-testsuite        3.3.3-3
gdbm                 1.8.3-7
glib                 1.2.10-2
grep                 2.5.1a-2
groff                1.18.1-2
gzip                 1.3.5-1
inetutils            1.3.2-29
less                 381-1
libapr0              0.9.6-1
libaprutil0          0.9.6-1
libbz2_1             1.0.2-6
libcharset1          1.9.2-1
libdb4.2             4.2.52-1
libgdbm              1.8.0-5
libgdbm-devel        1.8.3-7
libgdbm3             1.8.3-3
libgdbm4             1.8.3-7
libiconv             1.9.2-1
libiconv2            1.9.2-1
libintl              0.10.38-3
libintl1             0.10.40-1
libintl2             0.12.1-3
libintl3             0.14.1-1
libncurses5          5.2-1
libncurses6          5.2-8
libncurses7          5.3-4
libncurses8          5.4-1
libneon24            0.24.7-1
libpcre              4.1-1
libpcre0             4.5-1
libpopt0             1.6.4-4
libreadline4         4.1-2
libreadline5         4.3-5
libreadline6         5.0-1
libxml2              2.6.16-2
login                1.9-7
m4                   1.4.3-1
make                 3.80-1
man                  1.5p-1
mc                   4.6.1-1
mingw-runtime        3.7-1
mktemp               1.5-3
more                 2.11o-1
nano                 1.2.2-1
ncftp                3.1.7-1
ncurses              5.4-1
openssl              0.9.7g-1
patch                2.5.8-8
perl                 5.8.6-4
ping                 1.0-1
readline             5.0-1
rxvt                 2.7.10-6
sed                  4.1.4-1
subversion           1.1.4-1
tar                  1.13.25-5
tcltk                20030901-1
termcap              20050421-1
terminfo             5.4_20041009-1
texinfo              4.8-1
unzip                5.50-5
vim                  6.3-1
w32api               3.2-1
wget                 1.9.1-2
which                1.7-1
zip                  2.3-6
zlib                 1.2.2-1
Use -h to see help about each section

-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.tar.gz
Type: application/x-gzip
Size: 447 bytes
Desc: test.tar.gz
Url : http://lists.denx.de/pipermail/u-boot/attachments/20050531/452d565c/attachment.bin 


More information about the U-Boot mailing list