Package: make-dfsg Version: 3.81-8 Severity: normal Tags: patch User: vor...@debian.org Usertags: multiarch
Hi Manoj, 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. It's not the prettiest m4 code I've ever written, but it does the job... It also has a fallback when built with current dpkg-architecture (which doesn't implement DEB_HOST_MULTIARCH), so this may be reasonable to apply in advance of dpkg-dev 1.16.0 landing in the Debian archive. Or, you may prefer to wait for dpkg-dev 1.16.0 and drop any mention of DEB_HOST_GNU_TYPE here, since it's been determined that this is wrong for i386. (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. Cheers, -- Steve Langasek Give me a lever long enough and a Free OS Debian Developer to set it on, and I can move the world. Ubuntu Developer http://www.debian.org/ slanga...@ubuntu.com vor...@debian.org
=== modified file 'Makefile.am' --- 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 @@ MAKE_HOST="$host" AC_SUBST(MAKE_HOST) +AC_PATH_TOOL([DPKG_ARCH], [dpkg-architecture]) +AC_MSG_CHECKING([for multiarch paths]) +multiarch_triplet="" +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 +fi +if test -n "$multiarch_triplet"; then + MULTIARCH_DIRS="\\\"/lib/$multiarch_triplet\\\", \\\"/usr/lib/$multiarch_triplet\\\"," + AC_MSG_RESULT([$MULTIARCH_DIRS]) +else + AC_MSG_RESULT([not found]) +fi + +AC_SUBST(MULTIARCH_DIRS) + w32_target_env=no 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 +#endif #ifndef _AMIGA "/lib", #endif