Subject: Re: The mysterious NEEDED crtend.so
To: None <M.Drochner@fz-juelich.de, current-users@netbsd.org,>
From: Ryo HAYASAKA <ryoh@jaist.ac.jp>
List: tech-toolchain
Date: 11/01/2002 07:01:09
Hi.

In message <200210311429.PAA0000045966@zel459.zel.kfa-juelich.de>,
Matthias Drochner <M.Drochner@fz-juelich.de> wrote:

> to provide some additional data points to the crtend.o mystery
> described in

I've just found that basesrc/lib/libc/gen/basename.c rev. 1.5 causes
this problem for building pkgsrc/sysutils/rox.  The problem goes away
with rev. 1.4 of basename.c.

The line "static char result[PATH_MAX];" in basename.c is incompatible
with gnusrc/gnu/dist/toolchain/ld/emultempl/elf32.em.  In elf32.em, I
guess a return value of basename(3) is overridden by the next
basename(3) call in another function.

So, If I change all of basename(...) into xstrdup(basename(...)) in
elf32.em, the problem is not seen.

How to fix this?

--
Ryo HAYASAKA <ryoh@jaist.ac.jp>
Japan Advanced Institute of Science and Technology (JAIST)