Subject: Re: CVS commit: pkgsrc/devel/libiberty
To: None <tech-pkg@netbsd.org>
From: Johnny Lam <jlam@NetBSD.org>
List: tech-pkg
Date: 01/18/2005 17:52:16
Todd Vierling wrote:
> Module Name:	pkgsrc
> Committed By:	tv
> Date:		Tue Jan 18 21:58:55 UTC 2005
> 
> Modified Files:
> 	pkgsrc/devel/libiberty: Makefile PLIST buildlink3.mk distinfo
> Added Files:
> 	pkgsrc/devel/libiberty: application.mk
> 	pkgsrc/devel/libiberty/patches: patch-aa
> 
> Log Message:
> nb1: Install ansidecl.h as libiberty_decl.h (to avoid collision).  Done as
> patches rather than altering custom tarball so as to keep the tarball as
> close to FSF's source as possible.
> 
> Add application.mk convenience include to add to CPPFLAGS and LIBS enough
> glue to use libiberty in a gcc-based app compile.

This is just a heads-up on some uncommitted work that I'm still working
on.  I was working on a less compiler-centric solution to this problem
that involved creating special headers files in ${BUILDLINK_DIR}/include
and depending on pkgtools/libnbcompat.  For example, if a platform lacks
asprintf(), we search the header search path for <stdio.h>, then create
a ${BUILDLINK_DIR}/include/stdio.h that looks like:

#include <nbcompat.h>
#include "/usr/include/include/stdio.h"	  /* path to <stdio.h> */

I could just as easily use libiberty instead of libnbcompat since the
former is probably better maintained.  All of this is encapulated in a
single Makefile nbcompat.buildlink3.mk that was to be included for
particular platforms, e.g. IRIX, HP-UX, etc.

This originally came up because pkgsrc on IRIX 5 was stalling due to thd
system libraries missing many functions that are expected in a more
modern UNIX system.  I was trying to think of a non-intrusive way to
augment the system libraries and headers with a library that provided
these missing functions, and also to avoid needing to change a lot of
packages to make this work.

	Cheers,

	-- Johnny Lam <jlam@NetBSD.org>