This is the mail archive of the libffi-discuss@sourceware.org mailing list for the libffi project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 0/7] Merge of gcc patches


The following series of patches merges the changes in gcc's copy
of libffi since this gcc-commit:

  2012-12-26 16:28 green        * <libffi-last-merge> libffi merge

While I've tried to resolve conflicts in a sensible way, I've not
made any effort to check what the patches do or whether they are
(still) useful, so please double check before checking in.  libffi
still compiles after applying the patches 1 to 7 (without path
"0", see below), but I've not run any tests.

The "zeroth" patch is attached right to this message.  To me it
looks like a patch that is applied to gcc every time libffi is
merged, but there may be unrelated bits; I cannot judge that.  (The
patch conflicts with a later patch in the series, but the conflict
is easy to resolve.)

Ciao

Dominik ^_^  ^_^

-- 

Dominik Vogt
IBM Germany

Attachment: 0000-ChangeLog
Description: Text document

>From 84a69f2b23cf7d2ec83d02bb1ea65a9b2a3b7de8 Mon Sep 17 00:00:00 2001
From: schwab <schwab@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Sat, 29 Dec 2012 16:25:27 +0000
Subject: [PATCH "0"/7] * Makefile.am (ACLOCAL_AMFLAGS, TEXINFO_TEX,
 MAKEINFOFLAGS) (STAMP_GENINSRC, STAMP_BUILD_INFO, CLEANFILES)
 (MAINTAINERCLEANFILES): Define. (all-local, stamp-geninsrc,
 stamp-build-info): New targets. (doc/libffi.info): Depend on
 $(STAMP_BUILD_INFO) * configure.ac: Check for modern makeinfo.  Add support
 for --enable-generated-files-in-srcdir. * mdate-sh: New file. *
 testsuite/lib/libffi.exp (load_gcc_lib): Load from gcc testsuite lib dir.
 (libffi-init): Properly set library paths for multilibs and add path to
 libstdc++.

---
 Makefile.am              | 41 ++++++++++++++++++++++++++++++++++++++++-
 configure.ac             | 25 +++++++++++++++++++++++++
 testsuite/lib/libffi.exp | 10 ++++++++--
 3 files changed, 73 insertions(+), 3 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 0e40451..c200efa 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,7 +2,7 @@
 
 AUTOMAKE_OPTIONS = foreign subdir-objects
 
-ACLOCAL_AMFLAGS = -I m4
+ACLOCAL_AMFLAGS = -I m4 -I .. -I ../config
 
 SUBDIRS = include testsuite man
 
@@ -53,8 +53,47 @@ EXTRA_DIST = LICENSE ChangeLog.v1 ChangeLog.libgcj			\
 	 libffi.xcodeproj/project.pbxproj src/arm/trampoline.S		\
 	 libtool-ldflags ChangeLog.libffi-3.1
 
+# Automake Documentation:
+# If your package has Texinfo files in many directories, you can use the
+# variable TEXINFO_TEX to tell Automake where to find the canonical
+# `texinfo.tex' for your package. The value of this variable should be
+# the relative path from the current `Makefile.am' to `texinfo.tex'.
+TEXINFO_TEX   = ../gcc/doc/include/texinfo.tex
+
+# Defines info, dvi, pdf and html targets
+MAKEINFOFLAGS = -I $(srcdir)/../gcc/doc/include
 info_TEXINFOS = doc/libffi.texi
 
+# AM_CONDITIONAL on configure option --generated-files-in-srcdir
+if GENINSRC
+STAMP_GENINSRC = stamp-geninsrc
+else
+STAMP_GENINSRC =
+endif
+
+# AM_CONDITIONAL on configure check ACX_CHECK_PROG_VER([MAKEINFO])
+if BUILD_INFO
+STAMP_BUILD_INFO = stamp-build-info
+else
+STAMP_BUILD_INFO =
+endif
+
+all-local: $(STAMP_GENINSRC)
+
+stamp-geninsrc: doc/libffi.info
+	cp -p $(top_builddir)/doc/libffi.info $(srcdir)/doc/libffi.info
+	@touch $@
+
+doc/libffi.info: $(STAMP_BUILD_INFO)
+
+stamp-build-info: doc/libffi.texi $(srcdir)/doc/version.texi doc/$(am__dirstamp)
+	$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)/doc -o doc/libffi.info $(srcdir)/doc/libffi.texi
+	@touch $@
+
+
+CLEANFILES = $(STAMP_GENINSRC) $(STAMP_BUILD_INFO) doc/libffi.info
+MAINTAINERCLEANFILES = $(srcdir)/doc/libffi.info
+
 ## ################################################################
 
 ##
diff --git a/configure.ac b/configure.ac
index 4a44bff..6889311 100644
--- a/configure.ac
+++ b/configure.ac
@@ -18,6 +18,31 @@ AX_ENABLE_BUILDDIR
 
 AM_INIT_AUTOMAKE
 
+# See if makeinfo has been installed and is modern enough
+# that we can use it.
+ACX_CHECK_PROG_VER([MAKEINFO], [makeinfo], [--version],
+                   [GNU texinfo.* \([0-9][0-9.]*\)],
+                   [4.[4-9]*|4.[1-9][0-9]*|[5-9]*|[1-9][0-9]*])
+AM_CONDITIONAL(BUILD_INFO, test $gcc_cv_prog_makeinfo_modern = "yes")
+
+# We would like our source tree to be readonly. However when releases or
+# pre-releases are generated, the flex/bison generated files as well as the
+# various formats of manuals need to be included along with the rest of the
+# sources.  Therefore we have --enable-generated-files-in-srcdir to do
+# just that.
+AC_MSG_CHECKING(generated-files-in-srcdir)
+AC_ARG_ENABLE(generated-files-in-srcdir,
+AS_HELP_STRING([--enable-generated-files-in-srcdir],
+ [put copies of generated files in source dir intended for creating source tarballs for users without texinfo bison or flex]),
+[case "$enableval" in
+ yes) enable_generated_files_in_srcdir=yes ;;
+ no)  enable_generated_files_in_srcdir=no ;;
+ *)   AC_MSG_ERROR([Unknown argument to enable/disable version-specific libs]);;
+ esac],
+[enable_generated_files_in_srcdir=no])
+AC_MSG_RESULT($enable_generated_files_in_srcdir)
+AM_CONDITIONAL(GENINSRC, test "$enable_generated_files_in_srcdir" = yes)
+
 # The same as in boehm-gc and libstdc++. Have to borrow it from there.
 # We must force CC to /not/ be precious variables; otherwise
 # the wrong, non-multilib-adjusted value will be used in multilibs.
diff --git a/testsuite/lib/libffi.exp b/testsuite/lib/libffi.exp
index 5051d31..b981473 100644
--- a/testsuite/lib/libffi.exp
+++ b/testsuite/lib/libffi.exp
@@ -16,7 +16,7 @@
 
 proc load_gcc_lib { filename } {
     global srcdir
-    load_file $srcdir/lib/$filename
+    load_file $srcdir/../../gcc/testsuite/lib/$filename
 }
 
 load_lib dg.exp
@@ -94,6 +94,7 @@ proc libffi-init { args } {
     global srcdir
     global blddirffi
     global objdir
+    global blddircxx
     global TOOL_OPTIONS
     global tool
     global libffi_include
@@ -103,8 +104,10 @@ proc libffi-init { args } {
 
     global using_gcc
 
-    set blddirffi [pwd]/.. 
+    set blddirffi [lookfor_file [get_multilibs] libffi]
     verbose "libffi $blddirffi"
+    set blddircxx [lookfor_file [get_multilibs] libstdc++-v3]
+    verbose "libstdc++ $blddircxx"
 
     # Are we building with GCC?
     set tmp [grep ../config.status "GCC='yes'"]
@@ -144,6 +147,8 @@ proc libffi-init { args } {
 
     # add the library path for libffi.
     append ld_library_path ":${blddirffi}/.libs"
+    # add the library path for libstdc++ as well.
+    append ld_library_path ":${blddircxx}/src/.libs"
 
     verbose "ld_library_path: $ld_library_path"
 
@@ -156,6 +161,7 @@ proc libffi-init { args } {
     if { $libffi_dir != "" } {
 	set libffi_dir [file dirname ${libffi_dir}]
 	set libffi_link_flags "-L${libffi_dir}/.libs"
+	lappend libffi_link_flags "-L${blddircxx}/src/.libs"
     }
 
     set_ld_library_path_env_vars
-- 
1.8.4.2


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]