Subject: Re: Toolchain problems
To: Krister Walfridsson <cato@df.lth.se>
From: Simon Burge <simonb@netbsd.org>
List: port-pmax
Date: 04/18/1999 16:16:41
Krister Walfridsson wrote:
> I have two problems with the toolchain and 1.4_ALPHA
>
> 1. I get some warnings
>
> Warning: No .cprestore pseudo-op used in PIC code
>
> when I compile the libraries (for example in the file
> src/lib/libc/arch/mips/gen/isinf.S) Is this a cause for
> consern, or just gas beeing stupid?
The warnings seem mostly harmless. Here's a few paragraphs from
Jonathan Stone:
> This means the assembler is seeing code compiled as PIC, that isn't
> emitting the mips svr4 PIC pseudo-ops to save and restore the [sic]
> ``segment register'' used to set up GP-relative addressing. It's
> probably part of the reason profiling is broken.
>
> The reason profiled libraries are compiled as PIC is because both the
> non-shared (.a) and shared (_pic.a and .so) libraries are compiled as
> PIC. They have to be, so that users can link user-code as either
> static or dynamic *without* having to recompile all the user code as
> static. (Because that's what binutils and the mips svr4 ABI insist on.)
>
> We could punt on the svr4 ABI, but that basically means we'd have to
> support our own toolchain back-end. Time, time...
For now, just ignore the warnings :-)
> 2. ld dies with a segmentation fault when I link 'strings'.
> I have tried it both with a system built from 8 Apr source
> and the binary snapshot, with the same result... But everything
> else links just fine...
mona:usr.bin/binutils/strings 319# make "CC=cc -v"
cc -v -o strings strings.o \
-L/usr/src/gnu/usr.bin/binutils/common/obj.pmax -lcommon \
-L/usr/src/gnu/lib/libbfd/obj.pmax -lbfd
Using builtin specs.
gcc version egcs-2.91.60 19981201 (egcs-1.1.1 release)
/usr/libexec/collect2 -non_shared -dynamic-linker \
/usr/libexec/ld.elf_so -e __start -dc -dp -Bdynamic -o \
strings /usr/lib/crt0.o /usr/lib/crtbegin.o \
-L/usr/src/gnu/usr.bin/binutils/common/obj.pmax \
-L/usr/src/gnu/lib/libbfd/obj.pmax -L/usr/libexec strings.o \
-lcommon -lbfd -lgcc -lc -lgcc /usr/lib/crtend.o
/usr/src/gnu/usr.bin/binutils/common/obj.pmax/libcommon.a(bucomm.o): \
In function `make_tempname':
/usr/src/gnu/usr.bin/binutils/common/../../../dist/binutils/bucomm.c(.text+0x798): \
warning: mktemp() possibly used unsafely, use mkstemp() or mkdtemp()
This is on the machine building the 1.4_ALPHA snapshots. Can you try
the ld from the latest snapshot?
Simon.