Subject: Re: binutils 2.9.1 TESTERS NEEDED /macppc
To: Todd Vierling <>
From: Erik Bertelsen <>
List: tech-toolchain
Date: 02/04/1999 23:24:28
On Tue, Feb 02, 1999 at 09:23:33PM -0500, Todd Vierling wrote:
> I have imported binutils/bfd 2.9.1 into src/gnu/dist, and have tested it
> thoroughly on i386 and alpha, and partly on arm32.  I need some testers to
> verify operation on all other platforms.

My experiments with the new binutils on NetBSD/macppc have the 
results shown below.

Actually I have been running for some time with the patches to 
the original binutils 2.9.1 that Todd sent out earlier.

With the patches shown below, gas and ld have been used in
successive recompilations with make installs inbetween.

Egcs has also been completely recompiled after updating

Furthermore the machine is now running a kernel built with
the new tools, and it is currently recompiling /usr/src/lib
in preparation for a compilation of the rest of userland.

I made a powerpc configuration by cloning the alpha configuration
and then changing at shown in the following diff:

Only in alpha: CVS
diff alpha/ powerpc/
< TARG_CPU_C=	tc-alpha.c
> TARG_CPU_C=	tc-ppc.c
diff alpha/config.h powerpc/config.h
< #define TARGET_ALIAS "alpha--netbsd"
< #define TARGET_CPU "alpha"
< #define TARGET_CANONICAL "alpha--netbsd"
> #define TARGET_ALIAS "powerpc--netbsd"
> #define TARGET_CPU "powerpc"
> #define TARGET_CANONICAL "powerpc--netbsd"
diff alpha/targ-cpu.h powerpc/targ-cpu.h
< #include "tc-alpha.h"
> #include "tc-ppc.h"

When I compare to the config.h generated by configure
with the stock binutils 2.9.1 with Todds patches, I'm
in doubt of whether TARGET_BYTES_BIG_ENDIAN should
be undefined or defined to 1.

I added a ppc entry to ldemul-list.h, maybe another
one for little endian ppc should be added. Further-
more I wrote a as shown below.

Index: ldemul-list.h
RCS file: /home/cvs-base/src/gnu/usr.bin/,v
retrieving revision
diff -c -r1.1.1.5 ldemul-list.h
*** ldemul-list.h	1999/01/11 15:00:50
--- ldemul-list.h	1999/02/04 21:42:25
*** 16,18 ****
--- 16,21 ----
  extern ld_emulation_xfer_type ld_elf64_sparc_emulation;
  extern ld_emulation_xfer_type ld_sun4_emulation;
  extern ld_emulation_xfer_type ld_sparcnbsd_emulation;
+ /* powerpc emulations */
+ extern ld_emulation_xfer_type ld_elf32ppc_emulation;
#	$NetBSD:$

# is elf32lpcc relevant for NetBSD ?
EMULS=		elf32ppc

DEFAULT_EMUL=	elf32ppc


Just a failure report, no fix.

cc -O  -Werror   -I/home/src/gnu/usr.bin/gdb/obj.macppc -I/home/src/gnu/usr.bin/gdb -I/home/src/gnu/usr.bin/gdb/../../dist/gdb -I/home/src/gnu/usr.bin/gdb/../../dist/gdb/config -I/home/src/gnu/usr.bin/gdb/../../dist/readline -I/home/src/gnu/lib/bfd/obj.macppc -I/home/src/gnu/usr.bin/gdb/../../dist/bfd -I/home/src/gnu/usr.bin/gdb/../../dist/include -DNO_MMALLOC -c /home/src/gnu/usr.bin/gdb/../../dist/gdb/rs6000-nat.c
/home/src/gnu/usr.bin/gdb/../../dist/gdb/rs6000-nat.c:33: sys/reg.h: No such file or directory
/home/src/gnu/usr.bin/gdb/../../dist/gdb/rs6000-nat.c:46: sys/ldr.h: No such file or directory
*** Error code 1


Erik Bertelsen

ps: your C++ experiment resulted in:

g3 cat > 
#include <iostream.h>
extern int i;
int main(void) { cout << i << '\n'; }
g3 cat >

int i;
struct X { X() { i = 42; } } x;

g3 c++ -fPIC -c
g3 ld -shared -o x1.o
g3 c++ -o x -L. -lx
/usr/lib/ warning: reference to compatibility vfork(); include <unistd.h> for correct reference
g3 env LD_LIBRARY_PATH=. ./x

I just did a complete rebuild in /usr/src/gnu/lib/libstdc+++,
but it still prints 0.