public inbox for libffi-discuss@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Missing variable in AM_MAKEFLAGS
@ 2013-06-11 15:57 Stewart Brodie
  2013-06-20 12:11 ` [PATCH] Add --disable-multi-os-directory configure option Stewart Brodie
  0 siblings, 1 reply; 2+ messages in thread
From: Stewart Brodie @ 2013-06-11 15:57 UTC (permalink / raw)
  To: libffi-discuss


I've been trying to compile libffi (latest cloned from git earlier today)
but hitting a problem with overriding where the library is installed.

This patch fixes the problem with passing an overridden value for
toolexeclibdir to the recursive make call.  It looks like adding the
variable to AM_MAKEFLAGS may have been missed when toolexeclibdir was added.

---
 Makefile.am | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Makefile.am b/Makefile.am
index bf0156f..f821df0 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -82,6 +82,7 @@ AM_MAKEFLAGS = \
 	"exec_prefix=$(exec_prefix)" \
 	"infodir=$(infodir)" \
 	"libdir=$(libdir)" \
+	"toolexeclibdir=$(toolexeclibdir)" \
 	"mandir=$(mandir)" \
 	"prefix=$(prefix)" \
 	"AR=$(AR)" \
-- 
1.8.1.4


-- 
Stewart Brodie
Senior Software Engineer
Team Leader ANT Galio Browser
Espial UK

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH] Add --disable-multi-os-directory configure option
  2013-06-11 15:57 [PATCH] Missing variable in AM_MAKEFLAGS Stewart Brodie
@ 2013-06-20 12:11 ` Stewart Brodie
  0 siblings, 0 replies; 2+ messages in thread
From: Stewart Brodie @ 2013-06-20 12:11 UTC (permalink / raw)
  To: libffi-discuss

Stewart Brodie <sbrodie@espial.com> wrote:

> 
> I've been trying to compile libffi (latest cloned from git earlier today)
> but hitting a problem with overriding where the library is installed.
> [ patch in original e-mail ]

I have since discovered that my patch only works if you build out-of-tree.
autoconf has put something strange in the configure script to detect when
$top_srcdir == $top_builddir and write completely different stuff out to the
Makefile, which doesn't pass the required parameters to the recursive makes
that it runs, as far as I can tell.

So I just added a configuration option instead, which always works.

The --disable-multi-os-directory option stops the configure script
from asking gcc whether it should override the library installation
directory.
---
 configure.ac | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/configure.ac b/configure.ac
index 0dc0675..cc64876 100644
--- a/configure.ac
+++ b/configure.ac
@@ -535,6 +535,10 @@ AC_ARG_ENABLE(purify-safety,
     AC_DEFINE(USING_PURIFY, 1, [Define this if you are using Purify and
want to suppress spurious messages.])
   fi)
 
+AC_ARG_ENABLE(multi-os-directory,
+[  --disable-multi-os-directory
+                          disable use of gcc --print-multi-os-directory to
change the library installation directory])
+
 # These variables are only ever used when we cross-build to X86_WIN32.
 # And we only support this with GCC, so...
 if test "x$GCC" = "xyes"; then
@@ -546,11 +550,13 @@ if test "x$GCC" = "xyes"; then
     toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
     toolexeclibdir='$(libdir)'
   fi
-  multi_os_directory=`$CC -print-multi-os-directory`
-  case $multi_os_directory in
-    .) ;; # Avoid trailing /.
-    ../*) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;;
-  esac
+  if test x"$enable_multi_os_directory" != x"no"; then
+    multi_os_directory=`$CC -print-multi-os-directory`
+    case $multi_os_directory in
+      .) ;; # Avoid trailing /.
+      ../*) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;;
+    esac
+  fi
   AC_SUBST(toolexecdir)
 else
   toolexeclibdir='$(libdir)'
-- 
1.8.1.4



-- 
Stewart Brodie
Senior Software Engineer
Team Leader ANT Galio Browser
Espial UK

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-06-20 12:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-11 15:57 [PATCH] Missing variable in AM_MAKEFLAGS Stewart Brodie
2013-06-20 12:11 ` [PATCH] Add --disable-multi-os-directory configure option Stewart Brodie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).