April 5th, 2007
KPIT Cummins Infosystems Limited is
releasing SHeb-Linux MMU v0701, a cross compiler tool chain for Renesas SuperH series of microcontrollers with Memory Management Unit (MMU).
SALIENT
FEATURES:
| 1. |
SHeb-Linux MMU v0701 is based on
gcc-4.2.0, binutils-2.17 and glibc-2.5 using kernel
headers-2.6.12. |
| 2. |
The latest patches have been
applied to the gcc, binutils and glibc sources. |
| 3. |
The default target for the
toolchain is sh4 Big Endian. |
| 4. |
The toolchain is specifically built for Renesas SuperH devices with MMU. |
| 5. |
The toolchain supports Native POSIX Thread Library (NPTL). |
| 6. |
Latest stable kernel version 2.6.20 compiles
successfully with the toolchain.* |
ABOUT
SHeb-Linux MMU v0701:
| Release version: |
SHeb-Linux MMU v0701 |
| Platforms Supported: |
Red Hat GNU/Linux v6.0 or
later (or compatible distribution) (RedHat9, Fedora Core 2, Fedora
Core 3, Fedora Core 4, Fedora Core 5 and Fedora Core 6) |
| Languages: |
C, C++ |
| SH Series: |
SH-3,
SH-3E,
SH3-DSP, SH-4, SH-4A, SH-4AL-DSP |
| Object File Formats: |
ELF |
Please register at http://www.kpitgnutools.com/ for
free technical support. Please contact http://www.kpitgnutools.com/feedback.php
for any feedback or suggestions. |
CHANGES IN THIS
RELEASE:
| 1. The following test case generated incorrect assembly code when compiled
using optimization '-O2' with 'sh4eb-linux-gcc
-ml -m4 -O2 -fomit-frame-pointer -S testcode.c -o a.s' command. int func
(void)
{
int
error;
if (foo3 ())
{
foo4(0, 1, 2, "abc", 310,
foo1());
return
(990);
}
if ((error = foo2 ()))
{
return
error;
}
foo4(0, 1, 2, "abc", 352,
foo1());
return
(990);
}
This bug has been fixed in 0701
release.
|
| 2. The code which accessed thread libraries generated
incompatible library error at compilation time.
This bug has been fixed in 0701
release.
|
3. Following code caused Internal Compiler Error,
const int i = 1;
void foo ()
{
char a[][i] = {""};
}
This bug has been fixed in 0701
release.
|
4. Following code caused Internal Compiler Error,
int main(int ac, char** av)
{
int
to[6] = (int[6]){-1,-1,-1,-1,-1,-1};
return 0;
}
This bug has been fixed in 0701
release.
|
5. Following code caused Internal Compiler Error
when compiled using optimization option '-O1' and above,
typedef float V2SF __attribute__ ((vector_size (8)));
int test0 (V2SF, V2SF);
int
main (void)
{
V2SF a = (V2SF) {1.0f/0.0f - 1.0f/0.0f, 1.0f/0.0f -
1.0f/0.0f};
V2SF b = (V2SF) {567.345, 1984.0};
int i;
i = test0 (a, b);
return i;
}
This bug has been fixed in 0701
release.
|
6. Following code caused Internal Compiler Error
when compiled using with or without optimization option,
typedef float floatvect2 __attribute__((mode(V2SF)));
typedef union
{
floatvect2 vector;
float f[2];
}resfloatvect2;
void tempf(float *x, float *y)
{
floatvect2 temp={x[0],x[1]};
floatvect2 temp1={y[0],y[1]};
resfloatvect2 temp2;
temp2.vector=temp+temp1;
x[0]=temp2.f[0];
x[1]=temp2.f[1];
}
This bug has been fixed in 0701
release.
|
| 7. Source code using TRAMPOLINES gave error "undefined
reference to `__ic_invalidate' " when compiled for target "m4-nofpu",
E.g.:
#ifndef NO_TRAMPOLINES
int f0(int (*fn)(int *), int *p)
{
return (*fn) (p);
}
int f1(void)
{
int i = 0;
int f2(int *p)
{
i = 1;
return *p + 1;
}
return f0(f2, &i);
}
#endif
int main()
{
#ifndef NO_TRAMPOLINES
if (f1() != 2)
abort ();
#endif
return 0;
}
This bug has been fixed in 0701
release.
|
|
8. Following code caused Internal Compiler Error when compiled using
optimization option '-O2',
#include <limits.h>
int i;
int main()
{
signed int a08;
struct tag1 {
int b01:10;
}tag1;
a08=INT_MAX;
tag1.b01=CHAR_MAX;
i=tag1.b01>>a08;
}
This bug has been fixed in 0701 release.
|
|
9. Following code caused the
compiler to hang when compiled using optimization option '-O2',
main()
{
static int a=1;
a++;
a++;
a++;
・・・・ <- "a++;" is processed 65535 times.
}
This bug has been fixed in 0701 release.
|
KNOWN PROBLEMS*:
We intend to fix the known problems in our future releases. We
may release Maintenance Packs for critical bugs fixed in between releases.
|
1. Including the header file
inside a function block generates compilation errors when compiled using
optimization '-O2'.
Same behaviour is observed when
compiled with 'i686-pc-gnu-linux-gcc' v4.2 with '-O2'
|
| |
|
2. Extern declaration of strcmp
function in the code as shown below,
extern int
strcmp(const char *, const char *);
generates error when compiled
with '-O2' optimization.
Same behaviour is observed when
compiled with 'i686-pc-gnu-linux-gcc' with '-O2'.
|
| |
| 3. The following test case generates compilation
error when compiled using optimization '-O2'.
Same behaviour is observed when
compiled with 'i686-pc-gnu-linux-gcc' v4.2 with '-O2'
struct A {
signed int z : 9;
};
template <class T> int f(T)
{
static int x = 0;
return x;
}
int main(void)
{
A a;
int result;
result=f((short)-2);
result=f(a.z);
}
For workaround, use
switches '-fno-implicit-templates' and '-fno-weak', while compiling the
code. |
| |
| 4. The following test case generates compilation
error of 'Segmentation fault (program cc1)' when compiled using optimization
'-O2'.
Same behaviour is observed when
compiled with 'i686-pc-gnu-linux-gcc' v4.2 with '-O2'
int x4, x5;
main()
{
int i=(int)&x4+(int)&x5+200;
if (i!=0){
i=(int)&x4-(int)&x5;
if (i!=0)
printf("O.K.\n");
}
}
For workaround, use switch
'-fno-gcse', while compiling the code. |
| |
|
5. The following test case
generates compile time error.
Same behaviour is observed when
compiled with 'i686-pc-gnu-linux-gcc' v4.2
int f(int, int);
int main(void)
{
int f(int, int = 23);
int f(int = 2, int);
} |
| |
Observations specific to ABI used for the toolchain:
The following test cases generate compilation error when
compiled using 'sh4eb-linux-gcc'.
This is the expected
behaviour of GNU SH Application Binary
Interface (ABI).
However, using Renesas Calling convention (option: '-mrenesas')
the test cases compile successfully.
| 1.
void f1(int,...);
main()
{
f1(3,11L,22,(char)33);
}
void f1(int
n_ptrs, ...)
{
int reti;
va_list ap;
char *c;
va_start(ap,n_ptrs);
reti=va_arg(ap,int);
c = (char*)ap+1;
c = ap +1 ;
}
|
| |
| 2.
#include<stdio.h>
#include <cstdarg>
static
va_list T;
int main(void)
{
if( T == 0 ) printf("OK\n");
else printf( "Type static va_list not set to zero\n" );
}
|
| |
| 3.
#include <stdarg.h>
extern void
f1(int,...);
double f;
main()
{
f=3.3e1;
f1(2,f,f);
}
void f1(int
n_ptrs,...)
{
va_list ap;
int i;
va_start(ap, n_ptrs);
va_end(ap);
vprintf("%E,%G",(char *)ap);
printf(" %d i\n",i);
}
|
| |
Note*:
Execution testing is not done due to
unavailability of hardware.
|