[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: make needs to know about multiarch for expansion of -l target depend
Re: make needs to know about multiarch for expansion of -l target dependencies
Fri, 18 Mar 2011 17:00:58 -0500
Steve Langasek wrote:
> As part of the initial deployment of multiarch support in Ubuntu, we've
> discovered that some packages rely on make dependencies on "-lpthread" and
> the like, which GNU make resolves internally to a library file. Since
> multiarch means changing the paths at which libraries are installed on the
> system, this means an update to make is required to know about the extended
> system path on Debian systems.
> The attached patch implements this.
> (Note, this currently doesn't include /usr/local/lib/$triplet. The reason
> for this is that the gcc and eglibc patches for multiarch do not mention
> /usr/local/lib/$triplet, so I'm following suit here; but we may want to
> revisit this issue down the line, I'm not sure this is very FHS upstreamable
> without the /usr/local/lib analogue.)
> Changelog entry used for the upload to Ubuntu was:
> * remake.c, configure.in: prepend multiarch paths to the library path in
> library_search() when we have a target dependency of '-lfoo', so that
> this still works when all our libraries are moving to multiarch library
> directories. LP: #737641.
This all suggests to me that we need a
command so the same system-specific rules do not have to be reimplemented
in every program that cares.
Potential Debian-specific patch to just deal with this in "make" in the
short term follows. Thoughts?
> --- Makefile.am 2006-05-03 21:49:55 +0000
> +++ Makefile.am 2011-03-18 20:34:06 +0000
> @@ -57,7 +57,7 @@
> man_MANS = make.1
> -DEFS = -DLOCALEDIR=\"$(localedir)\" -DLIBDIR=\"$(libdir)\"
> -DINCLUDEDIR=\"$(includedir)\" @DEFS@
> +DEFS = -DLOCALEDIR=\"$(localedir)\" -DLIBDIR=\"$(libdir)\"
> -DINCLUDEDIR=\"$(includedir)\" -DMULTIARCH_DIRS="$(MULTIARCH_DIRS)" @DEFS@
> AM_CPPFLAGS = $(GLOBINC)
> # Only process if target is MS-Windows
> === modified file 'configure.in'
> --- configure.in 2006-05-03 21:49:55 +0000
> +++ configure.in 2011-03-18 20:41:16 +0000
> @@ -374,6 +374,24 @@
> +AC_PATH_TOOL([DPKG_ARCH], [dpkg-architecture])
> +AC_MSG_CHECKING([for multiarch paths])
> +if test -n "$DPKG_ARCH"; then
> + multiarch_triplet=$($DPKG_ARCH -qDEB_HOST_MULTIARCH)
> + if test -z "$multiarch_triplet"; then
> + multiarch_triplet=$($DPKG_ARCH -qDEB_HOST_GNU_TYPE)
> + fi
> +if test -n "$multiarch_triplet"; then
> + MULTIARCH_DIRS="\\\"/lib/$multiarch_triplet\\\",
> + AC_MSG_RESULT([$MULTIARCH_DIRS])
> + AC_MSG_RESULT([not found])
> AM_CONDITIONAL([WINDOWSENV], false)
> === modified file 'remake.c'
> --- remake.c 2008-04-03 02:04:02 +0000
> +++ remake.c 2011-03-18 20:17:13 +0000
> @@ -1451,6 +1451,9 @@
> static char *dirs =
> +#ifdef MULTIARCH_DIRS
> + MULTIARCH_DIRS
> #ifndef _AMIGA
|[Prev in Thread]
||[Next in Thread]|
- Re: make needs to know about multiarch for expansion of -l target dependencies,
Jonathan Nieder <=