Re: SH2aeb support

2008-10-06 Thread Kieran Bingham
Hi Carmelo.
Thanks for the hint, Yes SVN:Trunk does solve the memcpy build issue it
would seem.

I have another issue I've not been able to figure out correctly.

With Support global constructors and destructors turned off, uClibc
doesn't seem to build crti.o and crtn.o, yet the linker still looks for
them.
These files get built if i turn on CTOR_DTOR but should they be built when
this is switched off ? or should there be stub files created ?

sh2aeb-linux-uclibc-gcc  -Wl,-EB -Wl,-elf2flt=-s65536 test.c -o test
/opt/sh/2a/toolchain/lib/gcc/sh2aeb-linux-uclibc/4.2.4/../../../../sh2aeb-linux-uclibc/bin/ld.real:
crti.o: No such file: No such file or directory
collect2: ld returned 1 exit status
make[1]: *** [test] Error 1
make[1]: Leaving directory `/opt/sh/2a/build/src/test-apps-0.1'
make: *** [build] Error 2


If I build with Support global constructors and destructors turned on,
then I get linker errors as follows:


test.elf2flt: In function `__uClibc_fini':
(.text+0x908): undefined reference to `__fini_array_start'
test.elf2flt: In function `__uClibc_fini':
(.text+0x90c): undefined reference to `__fini_array_end'
test.elf2flt: In function `__uClibc_main':
(.text+0xa54): undefined reference to `__preinit_array_end'
test.elf2flt: In function `__uClibc_main':
(.text+0xa60): undefined reference to `__preinit_array_start'
test.elf2flt: In function `__uClibc_main':
(.text+0xa64): undefined reference to `__init_array_start'
test.elf2flt: In function `__uClibc_main':
(.text+0xa68): undefined reference to `__init_array_end'

I've got round this so far by turning it on to build the files, then off to
create something that links successfully, but I can't figure out how to get
the crt[ni].o to build otherwise :(

--
Cheers
Kieran



2008/10/6 Carmelo Amoroso [EMAIL PROTECTED]

 Kieran Bingham wrote:

 Hi Guys,

 I'm currently trying to build uClibc-0.9.30-rc1 for SH2aeb and found an
 issue when building which I fixed with the attached patches.

 make[2]: Entering directory `/opt/sh/2a/build/src/test-apps-0.1'
 sh2aeb-linux-uclibc-gcc  -Wl,-EB test.c -o test
 test.c: In function 'main':
 test.c:5: warning: return type of 'main' is not 'int'
 /opt/sh/2a/toolchain/usr/lib/libc.a(memcpy.o): In function `memcpy':
 memcpy.c:(.text+0x60): undefined reference to `WORD_COPY_FWD'
 collect2: ld returned 1 exit status
 make[2]: *** [test] Error 1

 I think its the right thing to do - i.e. follow the SH4, and define
 ARCH_HAS_BWD, but then I had to copy the include from memmove to memcpy
 which I don't think is a particularly nice way to do this. Why is it
 currently including a .c file in this way?

 --
 Cheers
  Kieran Bingham


  i,
 it should be already fized in rev 23572.
 Please try with this and let us know.

 Carmelo

 

 ___
 uClibc mailing list
 uClibc@uclibc.org
 http://busybox.net/cgi-bin/mailman/listinfo/uclibc



___
uClibc mailing list
uClibc@uclibc.org
http://busybox.net/cgi-bin/mailman/listinfo/uclibc

Re: SH2aeb support

2008-10-06 Thread Carmelo AMOROSO
Kieran Bingham wrote:
 Hi Carmelo.
 Thanks for the hint, Yes SVN:Trunk does solve the memcpy build issue it 
 would seem.
 
fine.
 I have another issue I've not been able to figure out correctly.
 
 With Support global constructors and destructors turned off, uClibc 
 doesn't seem to build crti.o and crtn.o, yet the linker still looks for 
 them.
 These files get built if i turn on CTOR_DTOR but should they be built 
 when this is switched off ? or should there be stub files created ?
 
 sh2aeb-linux-uclibc-gcc  -Wl,-EB -Wl,-elf2flt=-s65536 test.c -o test
 /opt/sh/2a/toolchain/lib/gcc/sh2aeb-linux-uclibc/4.2.4/../../../../sh2aeb-linux-uclibc/bin/ld.real:
  
 crti.o: No such file: No such file or directory
 collect2: ld returned 1 exit status
 make[1]: *** [test] Error 1
 make[1]: Leaving directory `/opt/sh/2a/build/src/test-apps-0.1'
 make: *** [build] Error 2
 
Which is the target file format used to build uclibc.
I'm not so aware of not elf format... if I guess correctly sh2a doesn't 
use elf format (as from -Wl,-elf2flt).

 
 If I build with Support global constructors and destructors turned on, 
 then I get linker errors as follows:
 
 
 test.elf2flt: In function `__uClibc_fini':
 (.text+0x908): undefined reference to `__fini_array_start'
 test.elf2flt: In function `__uClibc_fini':
 (.text+0x90c): undefined reference to `__fini_array_end'
 test.elf2flt: In function `__uClibc_main':
 (.text+0xa54): undefined reference to `__preinit_array_end'
 test.elf2flt: In function `__uClibc_main':
 (.text+0xa60): undefined reference to `__preinit_array_start'
 test.elf2flt: In function `__uClibc_main':
 (.text+0xa64): undefined reference to `__init_array_start'
 test.elf2flt: In function `__uClibc_main':
 (.text+0xa68): undefined reference to `__init_array_end'
 
If __UCLIBC_FORMAT_SHARED_FLAT__ is not defined, these symbols
should not be referenced from __uClibc_fini.
Are you sure uclibc has been properly configured ?

Sorry if cannot help more on this.

Cheers,
Carmelo


 I've got round this so far by turning it on to build the files, then off 
 to create something that links successfully, but I can't figure out how 
 to get the crt[ni].o to build otherwise :(
 
 --
 Cheers
 Kieran
 
 
 
 2008/10/6 Carmelo Amoroso [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
 
 Kieran Bingham wrote:
 
 Hi Guys,
 
 I'm currently trying to build uClibc-0.9.30-rc1 for SH2aeb and
 found an issue when building which I fixed with the attached
 patches.
 
 make[2]: Entering directory `/opt/sh/2a/build/src/test-apps-0.1'
 sh2aeb-linux-uclibc-gcc  -Wl,-EB test.c -o test
 test.c: In function 'main':
 test.c:5: warning: return type of 'main' is not 'int'
 /opt/sh/2a/toolchain/usr/lib/libc.a(memcpy.o): In function `memcpy':
 memcpy.c:(.text+0x60): undefined reference to `WORD_COPY_FWD'
 collect2: ld returned 1 exit status
 make[2]: *** [test] Error 1
 
 I think its the right thing to do - i.e. follow the SH4, and
 define ARCH_HAS_BWD, but then I had to copy the include from
 memmove to memcpy which I don't think is a particularly nice way
 to do this. Why is it currently including a .c file in this way?
 
 --
 Cheers
  Kieran Bingham
 
 
 i,
 it should be already fized in rev 23572.
 Please try with this and let us know.
 
 Carmelo
 
 
 
 
 ___
 uClibc mailing list
 uClibc@uclibc.org mailto:uClibc@uclibc.org
 http://busybox.net/cgi-bin/mailman/listinfo/uclibc
 
 
 
 
 
 
 ___
 uClibc mailing list
 uClibc@uclibc.org
 http://busybox.net/cgi-bin/mailman/listinfo/uclibc

___
uClibc mailing list
uClibc@uclibc.org
http://busybox.net/cgi-bin/mailman/listinfo/uclibc


Re: SH2aeb support

2008-10-06 Thread Bernhard Reutner-Fischer
On Mon, Oct 06, 2008 at 03:01:15PM +0200, Carmelo AMOROSO wrote:

I'm not so aware of not elf format... if I guess correctly sh2a doesn't 
use elf format (as from -Wl,-elf2flt).

sh-elf would build fine, not sure why you are ( or trying to) use
elf2flat?

If __UCLIBC_FORMAT_SHARED_FLAT__ is not defined, these symbols
should not be referenced from __uClibc_fini.
Are you sure uclibc has been properly configured ?

To me this sounds alot like it is not properly configured.
___
uClibc mailing list
uClibc@uclibc.org
http://busybox.net/cgi-bin/mailman/listinfo/uclibc


Re: SH2aeb support

2008-10-06 Thread Kieran Bingham
2008/10/6 Carmelo AMOROSO [EMAIL PROTECTED]


 Which is the target file format used to build uclibc.
 I'm not so aware of not elf format... if I guess correctly sh2a doesn't use
 elf format (as from -Wl,-elf2flt).

indeed
UCLIBC_FORMAT_FLAT=y 



 If I build with Support global constructors and destructors turned on,
 then I get linker errors as follows:


 test.elf2flt: In function `__uClibc_fini':
 (.text+0x908): undefined reference to `__fini_array_start'



 If __UCLIBC_FORMAT_SHARED_FLAT__ is not defined, these symbols
 should not be referenced from __uClibc_fini.
 Are you sure uclibc has been properly configured ?

 Sorry if cannot help more on this.

No Worries - thanks for your help already :)

Hmmm looks like this is the relevant source in
libc/misc/internals/__uClibc_main.c

 #if defined (__UCLIBC_CTOR_DTOR__)  !defined
(__UCLIBC_FORMAT_SHARED_FLAT__)
extern void _dl_app_init_array(void);
extern void _dl_app_fini_array(void);
# ifndef SHARED
/* These magic symbols are provided by the linker.  */
extern void (*__preinit_array_start []) (void) attribute_hidden;
...

I think my correct action is to look at getting the crt[ni].o to build
without (__UCLIBC_CTOR_DTOR__) defined. I got stuck at the weekend on this,
but I'll have another go at following the make rules tonight after work.

Cheers,
 Carmelo


Thanks Again

--
Kieran
___
uClibc mailing list
uClibc@uclibc.org
http://busybox.net/cgi-bin/mailman/listinfo/uclibc

Re: SH2aeb support

2008-10-06 Thread Kieran Bingham
Hi Bernhard,

2008/10/6 Bernhard Reutner-Fischer [EMAIL PROTECTED]

 On Mon, Oct 06, 2008 at 03:01:15PM +0200, Carmelo AMOROSO wrote:

 I'm not so aware of not elf format... if I guess correctly sh2a doesn't
 use elf format (as from -Wl,-elf2flt).

 sh-elf would build fine, not sure why you are ( or trying to) use
 elf2flat?


SH2a is MMU-Less, and on previous  toolchains using uCilbc-0.9.27-sh2
(provided by renesas), this is what I have used before, so its what I
believe to be correct.


 If __UCLIBC_FORMAT_SHARED_FLAT__ is not defined, these symbols
 should not be referenced from __uClibc_fini.
 Are you sure uclibc has been properly configured ?


 To me this sounds alot like it is not properly configured.


Ok, I'll play around more tonight.

--
Cheers
 Kieran
___
uClibc mailing list
uClibc@uclibc.org
http://busybox.net/cgi-bin/mailman/listinfo/uclibc

Re: SH2aeb support

2008-10-06 Thread Bernhard Reutner-Fischer
On Mon, Oct 06, 2008 at 02:26:24PM +0100, Kieran Bingham wrote:
Hi Bernhard,

2008/10/6 Bernhard Reutner-Fischer [EMAIL PROTECTED]

 On Mon, Oct 06, 2008 at 03:01:15PM +0200, Carmelo AMOROSO wrote:

 I'm not so aware of not elf format... if I guess correctly sh2a doesn't
 use elf format (as from -Wl,-elf2flt).

 sh-elf would build fine, not sure why you are ( or trying to) use
 elf2flat?


SH2a is MMU-Less, and on previous  toolchains using uCilbc-0.9.27-sh2
(provided by renesas), this is what I have used before, so its what I
believe to be correct.

If you explicitely want elf2flt then it's ok, sorry.
___
uClibc mailing list
uClibc@uclibc.org
http://busybox.net/cgi-bin/mailman/listinfo/uclibc


Re: SH2aeb support

2008-10-05 Thread Carmelo Amoroso
Kieran Bingham wrote:
 Hi Guys,
 
 I'm currently trying to build uClibc-0.9.30-rc1 for SH2aeb and found an 
 issue when building which I fixed with the attached patches.
 
 make[2]: Entering directory `/opt/sh/2a/build/src/test-apps-0.1'
 sh2aeb-linux-uclibc-gcc  -Wl,-EB test.c -o test
 test.c: In function 'main':
 test.c:5: warning: return type of 'main' is not 'int'
 /opt/sh/2a/toolchain/usr/lib/libc.a(memcpy.o): In function `memcpy':
 memcpy.c:(.text+0x60): undefined reference to `WORD_COPY_FWD'
 collect2: ld returned 1 exit status
 make[2]: *** [test] Error 1
 
 I think its the right thing to do - i.e. follow the SH4, and define 
 ARCH_HAS_BWD, but then I had to copy the include from memmove to memcpy 
 which I don't think is a particularly nice way to do this. Why is it 
 currently including a .c file in this way?
 
 --
 Cheers
  Kieran Bingham
 
 
i,
it should be already fized in rev 23572.
Please try with this and let us know.

Carmelo
 
 
 ___
 uClibc mailing list
 uClibc@uclibc.org
 http://busybox.net/cgi-bin/mailman/listinfo/uclibc

___
uClibc mailing list
uClibc@uclibc.org
http://busybox.net/cgi-bin/mailman/listinfo/uclibc