Hi all,
Committed revision 38636.
Now even pretty advanced stuff works as intended:
root@octane:/usr/embutils# pdksh
# ./ls
allinone
arch
basename
bunzip2
cat
...
# ./echo 123 abc | ./sed s/2/x/
1x3 abc
(for those unimpressed, the advanced stuff is that this is an interactive
shell, being able to spawn sub-processes, ... you do not want to know how many
syscalls have to work for this to succeed, ...)
This (dietlibc) mips64 stuff should be pretty useful by now, next big parts to
be tweaked:
longjmp, setjmp, clone
Have fun (with it),
René
On 04.02.2011, at 13:21, René Rebe wrote:
> Hi again,
>
> dietlibc/mips64 now mostly works on t2/trunk:HEAD:
>
> root@octane:/usr/embutils# ./uname -a
> Linux octane 2.6.36 #1 Thu Dec 30 06:53:35 CST 2010 mips64
> root@octane:/usr/embutils# ./echo 123 abc
> 123 abc
>
> Some syscalls arguments still get mangled, though. However, many to most
> already work. Need to further dive thru the syscall assembly :-)
>
> Regards,
> René
>
> On 03.02.2011, at 19:44, René Rebe wrote:
>
>> With my mips64 dietlibc fixes as of today most stuff links on my side. I'm
>> now porting the assembly glue from 32bit mips o32 to 64bit for real, some
>> "hello world" style stuff even already runs for real, as of:
>>
>> Committed revision 38618.
>>
>> :-) !
>>
>> René
>>
>> On 03.02.2011, at 18:06, Jan Rovins wrote:
>>
>>> On 2/3/2011 7:25 AM, René Rebe wrote:
>>>> Hi,
>>>>
>>>> On 03.02.2011, at 00:04, Jan Rovins wrote:
>>>>
>>>>> On 2/2/2011 4:22 AM, René Rebe wrote:
>>>>>> Hi,
>>>>>>
>>>>>> when I was visiting my parents last weekend I took my Sgi Octane from
>>>>>> the attic, it even still powers up, yay! I hope to find the time to
>>>>>> finalize the dietlibc mips64 port during one of the next weekends, ...
>>>>>>
>>>>> That is good news.
>>>>>
>>>>> I had to pin my Mips64 T2 tree to a snapshot from early January (Jan 4th
>>>>> or something like that) because the stuff using the new dietlibc would
>>>>> not successfully link under mips64. In addition to that, the move to GCC
>>>>> 4.5.2 is giving internal compiler errors when building the stage1 GCC
>>>>> :-(. GCC 4.5.1 is still working fine.
>>>> While most dietlibc stuff was intended to build and link I now fixed the
>>>> trunk:HEAD mips64 dietlibc breakage I could spot.
>>>>
>>>> Will fix the startup / syscall code for the dietlibc mips64 port soon.
>>> Ok, I tried the latest svn HEAD, dietlibc builds OK, but when other
>>> programs are built with it there are link errors:
>>>
>>> Disktype is the first one to fail, there are a few multiple definition
>>> errors, followed by pages of:
>>> warning: linking abicalls files with non-abicalls files.
>>>
>>> Here is a chunk of the ERROR-LOG, are you getting similar results? (My
>>> build host is SLES-11 ).
>>>
>>> mips64-t2-linux-gnu-gcc -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
>>> -DUSE_IOCTL_LINUX -Wall -c udf.c
>>> mips64-t2-linux-gnu-gcc -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
>>> -DUSE_IOCTL_LINUX -Wall -c blank.c
>>> mips64-t2-linux-gnu-gcc -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
>>> -DUSE_IOCTL_LINUX -Wall -c cloop.c
>>> mips64-t2-linux-gnu-gcc -o disktype main.o lib.o buffer.o file.o
>>> cdaccess.o cdimage.o vpc.o compressed.o detect.o apple.o amiga.o atari.o
>>> dos.o cdrom.o linux.o unix.o beos.o archives.o udf.o blank.o cloop.o
>>> /opt/T2/t2-trunk-latest/build/Mips-Octeon-9.0-trunk-generic-mips64-EB-octeon-cross-linux/usr/dietlibc/lib-mips64/start.o:
>>> In function `__start':
>>> (.text+0x0): multiple definition of `__start'
>>> /opt/T2/t2-trunk-latest/build/Mips-Octeon-9.0-trunk-generic-mips64-EB-octeon-cross-linux/usr/dietlibc/lib-mips64/start.o:(.text+0x0):
>>> first defined here
>>> /opt/T2/t2-trunk-latest/build/Mips-Octeon-9.0-trunk-generic-mips64-EB-octeon-cross-linux/usr/dietlibc/lib-mips64/start.o:
>>> In function `__main':
>>> (.text+0x9c): multiple definition of `__main'
>>> /opt/T2/t2-trunk-latest/build/Mips-Octeon-9.0-trunk-generic-mips64-EB-octeon-cross-linux/usr/dietlibc/lib-mips64/start.o:(.text+0x9c):
>>> first defined here
>>> /opt/T2/t2-trunk-latest/build/Mips-Octeon-9.0-trunk-generic-mips64-EB-octeon-cross-linux/usr/dietlibc/lib-mips64/dyn_start.o:
>>> In function `_fini':
>>> dyn_start.c:(.fini+0x0): multiple definition of `_fini'
>>> /opt/T2/t2-trunk-latest/build/Mips-Octeon-9.0-trunk-generic-mips64-EB-octeon-cross-linux/usr/dietlibc/lib-mips64/dyn_start.o:dyn_start.c:(.fini+0x0):
>>> first defined here
>>> /opt/T2/t2-trunk-latest/build/Mips-Octeon-9.0-trunk-generic-mips64-EB-octeon-cross-linux/usr/dietlibc/lib-mips64/dyn_start.o:(.eh_frame+0x0):
>>> multiple definition of `__EH_FRAME_BEGIN__'
>>> /opt/T2/t2-trunk-latest/build/Mips-Octeon-9.0-trunk-generic-mips64-EB-octeon-cross-linux/usr/dietlibc/lib-mips64/dyn_start.o:(.eh_frame+0x0):
>>> first defined here
>>> /opt/T2/t2-trunk-latest/build/Mips-Octeon-9.0-trunk-generic-mips64-EB-octeon-cross-linux/usr/dietlibc/lib-mips64/dyn_start.o:
>>> In function `_dyn_start':
>>> dyn_start.c:(.text+0x0): multiple definition of `_dyn_start'
>>> /opt/T2/t2-trunk-latest/build/Mips-Octeon-9.0-trunk-generic-mips64-EB-octeon-cross-linux/usr/dietlibc/lib-mips64/dyn_start.o:dyn_start.c:(.text+0x0):
>>> first defined here
>>> /opt/T2/t2-trunk-latest/build/Mips-Octeon-9.0-trunk-generic-mips64-EB-octeon-cross-linux/usr/dietlibc/lib-mips64/libc.a(sprintf.o):
>>> In function `sprintf':
>>> sprintf.c:(.text+0x24): warning: warning: Avoid *sprintf; use *snprintf. It
>>> is more secure.
>>> /opt/T2/t2-trunk-latest/build/Mips-Octeon-9.0-trunk-generic-mips64-EB-octeon-cross-linux/usr/dietlibc/lib-mips64/libc.a(vsnprintf.o):
>>> In function `vsnprintf':
>>> vsnprintf.c:(.text+0xe4): warning: warning: the printf functions add
>>> several kilobytes of bloat.
>>> /opt/T2/t2-trunk-latest/build/Mips-Octeon-9.0-trunk-generic-mips64-EB-octeon-cross-linux/usr/dietlibc/lib-mips64/libc.a(stderr.o):
>>> In function `__fflush_stderr':
>>> stderr.c:(.text+0x14): warning: warning: your code uses stdio (7+k bloat).
>>> /opt/T2/t2-trunk-latest/build/Mips-Octeon-9.0-trunk-generic-mips64-EB-octeon-cross-linux/usr/dietlibc/lib-mips64/dyn_stop.o:
>>> In function `_init':
>>> dyn_stop.c:(.init+0x0): multiple definition of `_init'
>>> /opt/T2/t2-trunk-latest/build/Mips-Octeon-9.0-trunk-generic-mips64-EB-octeon-cross-linux/usr/dietlibc/lib-mips64/dyn_stop.o:dyn_stop.c:(.init+0x0):
>>> first defined here
>>> /opt/T2/t2-trunk-latest/build/Mips-Octeon-9.0-trunk-generic-mips64-EB-octeon-cross-linux/usr/dietlibc/lib-mips64/dyn_stop.o:(.eh_frame+0x0):
>>> multiple definition of `__FRAME_END__'
>>> /opt/T2/t2-trunk-latest/build/Mips-Octeon-9.0-trunk-generic-mips64-EB-octeon-cross-linux/usr/dietlibc/lib-mips64/dyn_stop.o:(.eh_frame+0x0):
>>> first defined here
>>> /opt/T2/t2-trunk-latest/build/Mips-Octeon-9.0-trunk-generic-mips64-EB-octeon-cross-linux/TOOLCHAIN/tools.cross/crosscc/../lib/gcc/mips64-t2-linux-gnu/4.5.2/../../../../mips64-t2-linux-gnu/bin/ld:
>>> main.o: warning: linking abicalls files with non-abicalls files
>>> /opt/T2/t2-trunk-latest/build/Mips-Octeon-9.0-trunk-generic-mips64-EB-octeon-cross-linux/TOOLCHAIN/tools.cross/crosscc/../lib/gcc/mips64-t2-linux-gnu/4.5.2/../../../../mips64-t2-linux-gnu/bin/ld:
>>>
>>> /opt/T2/t2-trunk-latest/build/Mips-Octeon-9.0-trunk-generic-mips64-EB-octeon-cross-linux/usr/dietlibc/lib-mips64/libc.a(unified.o):
>>> warning: linking abicalls files with non-abicalls files
>>> /opt/T2/t2-trunk-latest/build/Mips-Octeon-9.0-trunk-generic-mips64-EB-octeon-cross-linux/TOOLCHAIN/tools.cross/crosscc/../lib/gcc/mips64-t2-linux-gnu/4.5.2/../../../../mips64-t2-linux-gnu/bin/ld:
>>>
>>> /opt/T2/t2-trunk-latest/build/Mips-Octeon-9.0-trunk-generic-mips64-EB-octeon-cross-linux/usr/dietlibc/lib-mips64/libc.a(close.o):
>>> warning: linking abicalls files with non-abicalls files
>>> /opt/T2/t2-trunk-latest/build/Mips-Octeon-9.0-trunk-generic-mips64-EB-octeon-cross-linux/TOOLCHAIN/tools.cross/crosscc/../lib/gcc/mips64-t2-linux-gnu/4.5.2/../../../../mips64-t2-linux-gnu/bin/ld:
>>>
>>> /opt/T2/t2-trunk-latest/build/Mips-Octeon-9.0-trunk-generic-mips64-EB-octeon-cross-linux/usr/dietlibc/lib-mips64/libc.a(dup2.o):
>>> warning: linking abicalls files with non-abicalls files
>>> /opt/T2/t2-trunk-latest/build/Mips-Octeon-9.0-trunk-generic-mips64-EB-octeon-cross-linux/TOOLCHAIN/tools.cross/crosscc/../lib/gcc/mips64-t2-linux-gnu/4.5.2/../../../../mips64-t2-linux-gnu/bin/ld:
>>>
>>> /opt/T2/t2-trunk-latest/build/Mips-Octeon-9.0-trunk-generic-mips64-EB-octeon-cross-linux/usr/dietlibc/lib-mips64/libc.a(environ.o):
>>> warning: linking abicalls files with non-abicalls files
>>> /opt/T2/t2-trunk-latest/build/Mips-Octeon-9.0-trunk-generic-mips64-EB-octeon-cross-linux/TOOLCHAIN/tools.cross/crosscc/../lib/gcc/mips64-t2-linux-gnu/4.5.2/../../../../mips64-t2-linux-gnu/bin/ld:
>>>
>>> /opt/T2/t2-trunk-latest/build/Mips-Octeon-9.0-trunk-generic-mips64-EB-octeon-cross-linux/usr/dietlibc/lib-mips64/libc.a(errno.o):
>>> warning: linking abicalls files with non-abicalls files
>>> /opt/T2/t2-trunk-latest/build/Mips-Octeon-9.0-trunk-generic-mips64-EB-octeon-cross-linux/TOOLCHAIN/tools.cross/crosscc/../lib/gcc/mips64-t2-linux-gnu/4.5.2/../../../../mips64-t2-linux-gnu/bin/ld:
>>>
>>> /opt/T2/t2-trunk-latest/build/Mips-Octeon-9.0-trunk-generic-mips64-EB-octeon-cross-linux/usr/dietlibc/lib-mips64/libc.a(fcntl.o):
>>> warning: linking abicalls files with non-abicalls files
>>> /opt/T2/t2-trunk-latest/build/Mips-Octeon-9.0-trunk-generic-mips64-EB-octeon-cross-linux/TOOLCHAIN/tools.cross/crosscc/../lib/gcc/mips64-t2-linux-gnu/4.5.2/../../../../mips64-t2-linux-gnu/bin/ld:
>>>
>>> /opt/T2/t2-trunk-latest/build/Mips-Octeon-9.0-trunk-generic-mips64-EB-octeon-cross-linux/usr/dietlibc/lib-mips64/libc.a(fork.o):
>>> warning: linking abicalls files with non-abicalls files
>>> /opt/T2/t2-trunk-latest/build/Mips-Octeon-9.0-trunk-generic-mips64-EB-octeon-cross-linux/TOOLCHAIN/tools.cross/crosscc/../lib/gcc/mips64-t2-linux-gnu/4.5.2/../../../../mips64-t2-linux-gnu/bin/ld:
>>>
>>> /opt/T2/t2-trunk-latest/build/Mips-Octeon-9.0-trunk-generic-mips64-EB-octeon-cross-linux/usr/dietlibc/lib-mips64/libc.a(fstat.o):
>>> warning: linking abicalls files with non-abicalls files
>>> /opt/T2/t2-trunk-latest/build/Mips-Octeon-9.0-trunk-generic-mips64-EB-octeon-cross-linux/TOOLCHAIN/tools.cross/crosscc/../lib/gcc/mips64-t2-linux-gnu/4.5.2/../../../../mips64-t2-linux-gnu/bin/ld:
>>>
>>> /opt/T2/t2-trunk-latest/build/Mips-Octeon-9.0-trunk-generic-mips64-EB-octeon-cross-linux/usr/dietlibc/lib-mips64/libc.a(ioctl.o):
>>> warning: linking abicalls files with non-abicalls files
>>> /opt/T2/t2-trunk-latest/build/Mips-Octeon-9.0-trunk-generic-mips64-EB-octeon-cross-linux/TOOLCHAIN/tools.cross/crosscc/../lib/gcc/mips64-t2-linux-gnu/4.5.2/../../../../mips64-t2-linux-gnu/bin/ld:
>>>
>>> /opt/T2/t2-trunk-latest/build/Mips-Octeon-9.0-trunk-generic-mips64-EB-octeon-cross-linux/usr/dietlibc/lib-mips64/libc.a(kill.o):
>>> warning: linking abicalls files with non-abicalls files
>>> /opt/T2/t2-trunk-latest/build/Mips-Octeon-9.0-trunk-generic-mips64-EB-octeon-cross-linux/TOOLCHAIN/tools.cross/crosscc/../lib/gcc/mips64-t2-linux-gnu/4.5.2/../../../../mips64-t2-linux-gnu/bin/ld:
>>>
>>> /opt/T2/t2-trunk-latest/build/Mips-Octeon-9.0-trunk-generic-mips64-EB-octeon-cross-linux/usr/dietlibc/lib-mips64/libc.a(lseek.o):
>>> warning: linking abicalls files with non-abicalls files
>>> /opt/T2/t2-trunk-latest/build/Mips-Octeon-9.0-trunk-generic-mips64-EB-octeon-cross-linux/TOOLCHAIN/tools.cross/crosscc/../lib/gcc/mips64-t2-linux-gnu/4.5.2/../../../../mips64-t2-linux-gnu/bin/ld:
>>>
>>> /opt/T2/t2-trunk-latest/build/Mips-Octeon-9.0-trunk-generic-mips64-EB-octeon-cross-linux/usr/dietlibc/lib-mips64/libc.a(open.o):
>>> warning: linking abicalls files with non-abicalls files
>>> /opt/T2/t2-trunk-latest/build/Mips-Octeon-9.0-trunk-generic-mips64-EB-octeon-cross-linux/TOOLCHAIN/tools.cross/crosscc/../lib/gcc/mips64-t2-linux-gnu/4.5.2/../../../../mips64-t2-linux-gnu/bin/ld:
>>>
>>> /opt/T2/t2-trunk-latest/build/Mips-Octeon-9.0-trunk-generic-mips64-EB-octeon-cross-linux/usr/dietlibc/lib-mips64/libc.a(pipe.o):
>>> warning: linking abicalls files with non-abicalls files
>>> /opt/T2/t2-trunk-latest/build/Mips-Octeon-9.0-trunk-generic-mips64-EB-octeon-cross-linux/TOOLCHAIN/tools.cross/crosscc/../lib/gcc/mips64-t2-linux-gnu/4.5.2/../../../../mips64-t2-linux-gnu/bin/ld:
>>>
>>> /opt/T2/t2-trunk-latest/build/Mips-Octeon-9.0-trunk-generic-mips64-EB-octeon-cross-linux/usr/dietlibc/lib-mips64/libc.a(read.o):
>>> warning: linking abicalls files with non-abicalls files
>>> /opt/T2/t2-trunk-latest/build/Mips-Octeon-9.0-trunk-generic-mips64-EB-octeon-cross-linux/TOOLCHAIN/tools.cross/crosscc/../lib/gcc/mips64-t2-linux-gnu/4.5.2/../../../../mips64-t2-linux-gnu/bin/ld:
>>>
>>> /opt/T2/t2-trunk-latest/build/Mips-Octeon-9.0-trunk-generic-mips64-EB-octeon-cross-linux/usr/dietlibc/lib-mips64/libc.a(select.o):
>>> warning: linking abicalls files with non-abicalls files
>>> /opt/T2/t2-trunk-latest/build/Mips-Octeon-9.0-trunk-generic-mips64-EB-octeon-cross-linux/TOOLCHAIN/tools.cross/crosscc/../lib/gcc/mips64-t2-linux-gnu/4.5.2/../../../../mips64-t2-linux-gnu/bin/ld:
>>>
>>> /opt/T2/t2-trunk-latest/build/Mips-Octeon-9.0-trunk-generic-mips64-EB-octeon-cross-linux/usr/dietlibc/lib-mips64/libc.a(stat.o):
>>> warning: linking abicalls files with non-abicalls files
>>>
>>>
>>>
>>>> René
>>>>
>>>>> Jan
>>>>>
>>>>>
>>>>>> René
>>>>>>
>>>>>> On 28.10.2010, at 23:00, Rene Rebe wrote:
>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>> We need to fix dietlibs for mips64 for real, too - maybe time to get an
>>>>>>> Sgi O2 from eBay (or ask my parents to bring the Octane to Berlin on my
>>>>>>> 30th birthday this Saturday, 'though it was quite loud, bulky and
>>>>>>> heavy, ...) :-)
>>>>>>>
>>>>>>> Will review / apply the patches soon, any reason you duplicated the
>>>>>>> whole gcc.confirm int the architecture package directory?
>>>>>>>
>>>>>>> René
>>>>>>>
>>>>>>> Sent abroad - http://ExactCODE.com Germany.
>>>>>>>
>>>>>>> On Oct 27, 2010, at 21:11, Jan Rovins<[email protected]> wrote:
>>>>>>>
>>>>>>>> Hi Rene,
>>>>>>>>
>>>>>>>> Here are the last 3 patches that are needed for "generic minimal" to
>>>>>>>> build on Mips64.
>>>>>>>>
>>>>>>>> Since you mentioned that the latest GCC was also failing for you while
>>>>>>>> building e2fsprogs, I am including the patch to roll back to GCC 4.4.3.
>>>>>>>>
>>>>>>>> With these patches, the 9.0 branch will cross build Mips64, I will
>>>>>>>> also consider back-porting all the Mips64 fixes to the 8.0 branch, if
>>>>>>>> you are planning to do an 8.1 release.
>>>>>>>>
>>>>>>>> Jan
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> On 9/30/2010 6:07 AM, Rene Rebe wrote:
>>>>>>>>> Hi,
>>>>>>>>>
>>>>>>>>> On Sep 29, 2010, at 4:04 PM, Jan Rovins wrote:
>>>>>>>>>
>>>>>>>>>> On 9/28/2010 3:18 AM, Rene Rebe wrote:
>>>>>>>>>>> Hi again,
>>>>>>>>>>>
>>>>>>>>>>> it built here:
>>>>>>>>>>>
>>>>>>>>>>> -rw-r--r-- 1 root root 10847302 Sep 25 11:34
>>>>>>>>>>> build/cross-mips64-9.0-trunk-generic-mips64-EB-cross-linux/var/adm/logs/1-gcc.log
>>>>>>>>>>>
>>>>>>>>>>> While usually building 64bit binaries on 32bit system was (and
>>>>>>>>>>> should) not a problem, there certainly can be something in that
>>>>>>>>>>> distribution that poses a problem, ... :-(
>>>>>>>>>>>
>>>>>>>>>>> René
>>>>>>>>>> Yes, Probability something specific about building on 32-bit Suse
>>>>>>>>>> SLES-11, To move forward, I had to roll back to GCC 4.4.3.
>>>>>>>>>> Eventually I would like to set up a T2 host, or at least somthing
>>>>>>>>>> more compatable for cross building T2, but am currently short of
>>>>>>>>>> time& fast machines.
>>>>>>>>>>
>>>>>>>>>> Looking back at the GCC 4.5.0 compiler failure back in May, that was
>>>>>>>>>> an internal compiler error while building e2fsprogs on Ubuntu 9.10,
>>>>>>>>>> GCC 4.5.0 Built OK at stage 1 in that situation.
>>>>>>>>> indeed, in my trunk (built on a x86_64 t2/trunk) e2fsprogs get's the
>>>>>>>>> cross gcc to an internal compiler error (ICE), ...
>>>>>>>>>
>>>>>>>>> René
>>>>>>>> <mips64-svn.patch>
>>>>>>>> <mips64-gcc-4.4.3.patch>
>>>>>>>> <mips64-e2fsprog.patch>
>>>>>>> -----------------------------------------------------------
>>>>>>> If you wish to unsubscribe from this mailing, send mail to
>>>>>>> [email protected] with a subject of: unsubscribe t2
>>>
>>
>> --
>> René Rebe, ExactCODE GmbH, Jaegerstr. 67, DE-10117 Berlin
>> http://exactcode.com | http://t2-project.org | http://rene.rebe.de
>>
>> -----------------------------------------------------------
>> If you wish to unsubscribe from this mailing, send mail to
>> [email protected] with a subject of: unsubscribe t2
>
> --
> René Rebe, ExactCODE GmbH, Jaegerstr. 67, DE-10117 Berlin
> http://exactcode.com | http://t2-project.org | http://rene.rebe.de
>
> -----------------------------------------------------------
> If you wish to unsubscribe from this mailing, send mail to
> [email protected] with a subject of: unsubscribe t2
--
René Rebe, ExactCODE GmbH, Jaegerstr. 67, DE-10117 Berlin
DE Legal: Amtsgericht Charlottenburg HRB 105123B, Tax-ID#: DE251602478
Managing Directors: Susanne Klaus, René Rebe
http://exactcode.com | http://t2-project.org | http://rene.rebe.de
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[email protected] with a subject of: unsubscribe t2