diff mbox

PR libffi/52223: Define FLAGS_TO_PASS for libffi

Message ID 20294.12804.697123.425174@pilspetsen.it.uu.se
State New
Headers show

Commit Message

Mikael Pettersson Feb. 23, 2012, 12:33 p.m. UTC
This fixes a "make prefix=... mandir=... install" installation error
in libffi on multilib targets like {x86_64,m68k}-linux:

make prefix=/tmp/buildroot/usr mandir=/tmp/buildroot/usr/share/man install
...
Making install in man
make[5]: Entering directory
`/tmp/objdir/x86_64-unknown-linux-gnu/32/libffi/man'
make[6]: Entering directory
`/tmp/objdir/x86_64-unknown-linux-gnu/32/libffi/man'
make[6]: Nothing to be done for `install-exec-am'.
test -z "/usr/share/man/man3" || /bin/mkdir -p "/usr/share/man/man3"
 /usr/bin/install -c -m 644 /tmp/gcc-4.7-20120211/libffi/man/ffi.3
/tmp/gcc-4.7-20120211/libffi/man/ffi_call.3
/tmp/gcc-4.7-20120211/libffi/man/ffi_prep_cif.3 '/usr/share/man/man3'
/usr/bin/install: cannot create regular file `/usr/share/man/man3/ffi.3':
Permission denied
/usr/bin/install: cannot create regular file `/usr/share/man/man3/ffi_call.3':
Permission denied
/usr/bin/install: cannot create regular file
`/usr/share/man/man3/ffi_prep_cif.3': Permission denied
make[6]: *** [install-man3] Error 1

The problem is that the Makefile variable FLAGS_TO_PASS isn't defined.
This causes multilib subdirs to not see the install-time settings and
instead use the configure-time settings, which breaks installations via
a separate staging area.

This problem affects trunk and the 4.6 and 4.5 branches.  4.4 is not
affected since it doesn't have these man pages.

See <http://gcc.gnu.org/ml/gcc-patches/2011-09/msg01187.html> for a
similar problem in libquadmath that Joseph Myers fixed last year.

OK for trunk and affected branches?

(If approved I'll need from someone with svn write access to get it applied.)

/Mikael

libffi/

2012-02-23  Mikael Pettersson  <mikpe@it.uu.se>

	PR libffi/52223
	* Makefile.am (FLAGS_TO_PASS): Define.
	* Makefile.in: Regenerate.

Comments

Jakub Jelinek Feb. 27, 2012, 10:01 a.m. UTC | #1
On Thu, Feb 23, 2012 at 01:33:08PM +0100, Mikael Pettersson wrote:
> This problem affects trunk and the 4.6 and 4.5 branches.  4.4 is not
> affected since it doesn't have these man pages.
> 
> See <http://gcc.gnu.org/ml/gcc-patches/2011-09/msg01187.html> for a
> similar problem in libquadmath that Joseph Myers fixed last year.
> 
> OK for trunk and affected branches?

Ok for trunk (and checked it in for you).  On older branches please wait a
few days (especially on 4.6 after 4.6.3 is released).

> 2012-02-23  Mikael Pettersson  <mikpe@it.uu.se>
> 
> 	PR libffi/52223
> 	* Makefile.am (FLAGS_TO_PASS): Define.
> 	* Makefile.in: Regenerate.

	Jakub
diff mbox

Patch

--- gcc-4.7-20120218/libffi/Makefile.am.~1~	2010-07-02 18:52:38.000000000 +0200
+++ gcc-4.7-20120218/libffi/Makefile.am	2012-02-23 12:49:21.000000000 +0100
@@ -76,6 +76,9 @@  AM_MAKEFLAGS = \
 	"RANLIB=$(RANLIB)" \
 	"DESTDIR=$(DESTDIR)"
 
+# Subdir rules rely on $(FLAGS_TO_PASS)
+FLAGS_TO_PASS = $(AM_MAKEFLAGS)
+
 MAKEOVERRIDES=
 
 toolexeclib_LTLIBRARIES = libffi.la
--- gcc-4.7-20120218/libffi/Makefile.in.~1~	2012-02-18 23:44:28.000000000 +0100
+++ gcc-4.7-20120218/libffi/Makefile.in	2012-02-23 12:49:21.000000000 +0100
@@ -455,6 +455,9 @@  AM_MAKEFLAGS = \
 	"RANLIB=$(RANLIB)" \
 	"DESTDIR=$(DESTDIR)"
 
+
+# Subdir rules rely on $(FLAGS_TO_PASS)
+FLAGS_TO_PASS = $(AM_MAKEFLAGS)
 MAKEOVERRIDES = 
 toolexeclib_LTLIBRARIES = libffi.la
 noinst_LTLIBRARIES = libffi_convenience.la