Ultralinux archive on lore.kernel.org
 help / color / mirror / Atom feed
* More sparc64-libc questions
@ 2001-09-30 17:20 Sean Callanan
  2001-09-30 18:06 ` Ben Collins
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Sean Callanan @ 2001-09-30 17:20 UTC (permalink / raw)
  To: ultralinux


>Yes, it's known to work. Debian contains a gcc-3.0-sparc64 package along
>with a libc6-sparc64. The tricky part is that gcc is hardcoded to use
>/lib64/ld-linux.so.2. You should make a symlink from /lib64 to
>/usr/local/sparc64-linux/lib for your setup to work, and then add /lib64
>to /etc/ld.so.conf and rerun ldconfig.

I did what you suggested, adding /lib64 to /etc/ld.so.conf, and rerunning 
ldconfig. But now the program segfaults.

% sparc64-linux-gcc -m64 -o hello hello.c
% ./hello
Segmentation fault

It doesn't dump core, either. (not that my 32-bit gdb would do much good)

By the way, how difficult would it be to use a file in /etc to determine 
the 64-bit library location (such as, maybe /etc/ld64.so.conf)?

Sincerely,

Sean Callanan 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: More sparc64-libc questions
  2001-09-30 17:20 More sparc64-libc questions Sean Callanan
@ 2001-09-30 18:06 ` Ben Collins
  2001-10-01  1:36 ` sc843
  2001-10-01  1:52 ` Ben Collins
  2 siblings, 0 replies; 4+ messages in thread
From: Ben Collins @ 2001-09-30 18:06 UTC (permalink / raw)
  To: ultralinux

On Sun, Sep 30, 2001 at 01:20:50PM -0400, Sean Callanan wrote:
> 
> >Yes, it's known to work. Debian contains a gcc-3.0-sparc64 package along
> >with a libc6-sparc64. The tricky part is that gcc is hardcoded to use
> >/lib64/ld-linux.so.2. You should make a symlink from /lib64 to
> >/usr/local/sparc64-linux/lib for your setup to work, and then add /lib64
> >to /etc/ld.so.conf and rerun ldconfig.
> 
> I did what you suggested, adding /lib64 to /etc/ld.so.conf, and rerunning 
> ldconfig. But now the program segfaults.
> 
> % sparc64-linux-gcc -m64 -o hello hello.c
> % ./hello
> Segmentation fault
> 
> It doesn't dump core, either. (not that my 32-bit gdb would do much good)
> 
> By the way, how difficult would it be to use a file in /etc to determine 
> the 64-bit library location (such as, maybe /etc/ld64.so.conf)?

ldconfig is smart enought to handle 32-bit and 64-bit API's from the
same ld.so.cache. That's not the problem. I beleive you can use a
different ld.so.conf (maybe .64 extension? can't remember).

%cat hello.c
#include <stdio.h>

int main() { puts("Hello World!"); return 0; }
%gcc-3.0 -m64 hello.c
%./a.out
Hello World!
%file a.out
a.out: ELF 64-bit MSB executable, SPARC V9, version 1, dynamically linked (uses shared libs), not stripped
%ldd a.out
        libc.so.6 => /lib/64/libc.so.6 (0xfffff80000120000)
        /lib/64/ld-linux.so.2 => /lib/64/ld-linux.so.2 (0xfffff80000000000)
%gcc-3.0 -v
...
gcc version 3.0.2 20010908 (Debian prerelease)


Note, I am also using a subreg-byte patch so that fpu works correctly.
And yes, I setup Debian to use /lib/64 instead of /lib64, but that's
just my preference, and required patching gcc and glibc (glibc 2.2.4).

If you are using the latest glibc, then the segv occurs in
ld-linux.so.2 (try executing it directory, you'll see), and I haven't
had time to diagnose it yet.


Ben

-- 
 .----------====-=-===-=====-----------===------------=-=-----.
/                   Ben Collins    --    Debian GNU/Linux                  \
`  bcollins@debian.org  --  bcollins@openldap.org  --  bcollins@linux.com  '
 `---=====------====-------------=-=-----=-==-===-------=--=---'

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: More sparc64-libc questions
  2001-09-30 17:20 More sparc64-libc questions Sean Callanan
  2001-09-30 18:06 ` Ben Collins
@ 2001-10-01  1:36 ` sc843
  2001-10-01  1:52 ` Ben Collins
  2 siblings, 0 replies; 4+ messages in thread
From: sc843 @ 2001-10-01  1:36 UTC (permalink / raw)
  To: ultralinux

Thanks Ben!

Indeed it _is_ ld-linux.so.2 which segfaults (I'm using a recent CVS.)

I'm seriously considering creating a pure 64-bit Sparc distribution of Linux. 
Everyting that can be would be native 64-bit (init, shells, X, etc...). Having 
the compiler working is a good thing, and I'll test glibc 2.2.4 and see whether 
that fixes my segfault problem.

I understand that this will provide only marginal performance benefits, and 
that Debian has a solid distro out with 64-bit support, but I'm doing this as 
much for the adventure as for the performance benefits. How is a distribution 
usually begun? I'd take the next release of GCC (3.0.2) and the latest release 
of libc.

This would probably be a personal project; I don't want to spend the kind of 
time required to keep packages up-to-date, etc. Would there any interest at all 
out there in a Sparc-bootable ISO with some tarballs that unpack to a bare-
bones distro that could be used as a base to compile everything else? I'd 
probably use http://www.linuxfromscratch.org as a guide.

Sincerely,

Sean Callanan

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: More sparc64-libc questions
  2001-09-30 17:20 More sparc64-libc questions Sean Callanan
  2001-09-30 18:06 ` Ben Collins
  2001-10-01  1:36 ` sc843
@ 2001-10-01  1:52 ` Ben Collins
  2 siblings, 0 replies; 4+ messages in thread
From: Ben Collins @ 2001-10-01  1:52 UTC (permalink / raw)
  To: ultralinux

On Sun, Sep 30, 2001 at 09:36:07PM -0400, sc843@bard.edu wrote:
> Thanks Ben!
> 
> Indeed it _is_ ld-linux.so.2 which segfaults (I'm using a recent CVS.)
> 
> I'm seriously considering creating a pure 64-bit Sparc distribution of Linux. 
> Everyting that can be would be native 64-bit (init, shells, X, etc...). Having 
> the compiler working is a good thing, and I'll test glibc 2.2.4 and see whether 
> that fixes my segfault problem.
> 
> I understand that this will provide only marginal performance benefits, and 
> that Debian has a solid distro out with 64-bit support, but I'm doing this as 
> much for the adventure as for the performance benefits. How is a distribution 
> usually begun? I'd take the next release of GCC (3.0.2) and the latest release 
> of libc.

Actually, it would create a performance hit for most things. From what I
understand the addressing causes performance issues, and is only really
needed for applications that need to address > 4gigs of memory (or other
large accesses), like databases, etc.

I've gone through a lot with this for Debian. Final decision I made was
to not have a native 64-bit distribution, and this was based on input
from Dave and Jakub. That's why I've only provided a 64-bit compiler and
base libraries; so people can compile what they need as 64-bit.

Read through some of the comments in gcc/config/sparc/ about the memory
addressing models used. Even the kernel is slow when compiled with full
64-bit addressing, which is why it is compiled with the medlow model.


Ben


-- 
 .----------====-=-===-=====-----------===------------=-=-----.
/                   Ben Collins    --    Debian GNU/Linux                  \
`  bcollins@debian.org  --  bcollins@openldap.org  --  bcollins@linux.com  '
 `---=====------====-------------=-=-----=-==-===-------=--=---'

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2001-10-01  1:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-09-30 17:20 More sparc64-libc questions Sean Callanan
2001-09-30 18:06 ` Ben Collins
2001-10-01  1:36 ` sc843
2001-10-01  1:52 ` Ben Collins

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox