[uae] Re: E-UAE on NetBSD: some patches

  • From: Bernhard Moellemann <zza@xxxxxxxxxx>
  • To: uae@xxxxxxxxxxxxx
  • Date: Tue, 12 Apr 2005 23:06:37 +0200


You wrote:

> > src/include/unzip.h uses a macro OF(x) which is not defined in NetBSD.
> > It seems to be a wrapper around prototypes. NetBSDs (g)cc supports
> > Prototypes so I added
> Hmmm. The OF macro should be in the zlib's zconf.h header. Does NetBSD's 
> version not have this (/usr/include/zconf.h?).

There is only __P defined:

#ifndef __P /* function prototypes */
#  ifdef STDC
#    define __P(args)  args
#  else
#    define __P(args)  ()
#  endif

which seems to do something like this.

> > [-Wl,-R]
> Why is this necessary, though? What happens if you don't specify the library 
> paths with the -R linker option? Is the dynamic linker unable to find the 
> necessary libraries at run-time?

Exactly. The program fails, stating it can't find libSM.so.6 or some
other X-Libraries. I can then export LD_LIBRARY_PATH=/usr/X11R6/lib
and it works. But this is of cource not the solution.

> Are the /usr/pkg/lib and /usr/X11R6/lib 
> paths, for example, not already in the run-time linker's library path?

No, there is only /usr/lib, because NetBSD can be installed without X
or without additional packages.

> Does NetBSD use GNU ld as it's linker or something else?

It uses gccs ld, but with another configuration.

> I could add an --enable-rpath option to the config script to handle this, and 
> it could default to enabled on NetBSD if it's really necessary.

I think it is necessary.

    Bernhard  //

Other related posts: