configure.in: Handle multilibs, support --enable-version-specific-runtime-libs.
* configure.in: Handle multilibs, support --enable-version-specific-runtime-libs. * Makefile.am (lib_LTLIBRARIES): Rename to ... (toolexeclib_LTLIBRARIES): this for multilib support. * Makefile.in: Regenerated. * configure: Regenerated. * aclocal.m4: Regenerated. * testsuite/lib/libmudflap.exp (libmudflap-init): Handle multilibs, using multilib directory instead of hardcoded path. Set LD_RUN_PATH. From-SVN: r82527
This commit is contained in:
parent
017f7506b5
commit
42fcd7bb7a
@ -1,3 +1,19 @@
|
||||
2004-06-01 Andreas Jaeger <aj@suse.de>
|
||||
|
||||
* configure.in: Handle multilibs, support
|
||||
--enable-version-specific-runtime-libs.
|
||||
* Makefile.am (lib_LTLIBRARIES): Rename to ...
|
||||
(toolexeclib_LTLIBRARIES): this for multilib support.
|
||||
* Makefile.in: Regenerated.
|
||||
* configure: Regenerated.
|
||||
* aclocal.m4: Regenerated.
|
||||
|
||||
2004-06-01 Andreas Jaeger <aj@suse.de>
|
||||
|
||||
* testsuite/lib/libmudflap.exp (libmudflap-init): Handle
|
||||
multilibs, using multilib directory instead of hardcoded path.
|
||||
Set LD_RUN_PATH.
|
||||
|
||||
2004-05-21 Frank Ch. Eigler <fche@redhat.com>
|
||||
|
||||
* Makefile.am (AM_MAKEFLAGS): Pass RUNTESTFLAGS.
|
||||
@ -112,7 +128,7 @@
|
||||
|
||||
* configure.in: Reorganize check for <pthread.h>.
|
||||
* configure: Regenerated.
|
||||
|
||||
|
||||
2003-11-04 David Edelsohn <edelsohn@gnu.org>
|
||||
|
||||
* mf-runtime.c (_ALL_SOURCE): Define for AIX.
|
||||
@ -217,7 +233,7 @@
|
||||
2003-06-19 Frank Ch. Eigler <fche@redhat.com>
|
||||
|
||||
* mf-hooks.c (struct pthread_info): Add "thread_errno" field.
|
||||
(__mf_pthread_spawner, __mf_pthread_cleanup): Use it with GUESS
|
||||
(__mf_pthread_spawner, __mf_pthread_cleanup): Use it with GUESS
|
||||
libmudflap object type.
|
||||
* mf-runtime.c (__mfu_unregister): Correct cemetary logic to avoid
|
||||
crashes on unregistering STATIC objects.
|
||||
@ -248,12 +264,12 @@
|
||||
|
||||
2003-06-11 Frank Ch. Eigler <fche@redhat.com>
|
||||
|
||||
* mf-heuristics.c (__mf_heuristic_check): Disable stack_bounds
|
||||
* mf-heuristics.c (__mf_heuristic_check): Disable stack_bounds
|
||||
heuristic for threaded case, and for non-x86-linux targets.
|
||||
* mf-hooks.c (__mf_0fn_calloc): Provide a working dummy implementation
|
||||
for use during pre-main() program startup.
|
||||
(__mf_0fn_*): Make these functions non-static.
|
||||
* mf-impl.h (DECLARE, CALL_REAL): Support calls to 0fn backup hook
|
||||
* mf-impl.h (DECLARE, CALL_REAL): Support calls to 0fn backup hook
|
||||
functions.
|
||||
* mf-runtime.c (__mf_state): Set initial state to "starting".
|
||||
(__mf_resolve_single_dynamic): Tolerate repeated calls for same symbol.
|
||||
@ -263,8 +279,8 @@
|
||||
|
||||
* testsuite/libmudflap.c/pass38-frag.c: New test case.
|
||||
* testsuite/libmudflap.cth/pass37-frag.c: Improved test.
|
||||
|
||||
* acinclude.m4: Add comments with aoliva's concerns about x86_64
|
||||
|
||||
* acinclude.m4: Add comments with aoliva's concerns about x86_64
|
||||
pass_all.
|
||||
* aclocal.m4, configure: Regenerated.
|
||||
|
||||
@ -331,7 +347,7 @@
|
||||
(__mfu_report): Print the two new counts.
|
||||
* testsuite/lib/libmudflap.exp: Filter out junk ld/pthreads messages.
|
||||
* testsuite/libmudfap.cth/cthfrags.exp: New test driver.
|
||||
* testsuite/libmudflap.cth/pass37-frag.c: New pthreads test.
|
||||
* testsuite/libmudflap.cth/pass37-frag.c: New pthreads test.
|
||||
* testsuite/libmudfap.cth/cfrags.exp: Adapt to new libmudflap
|
||||
option defaults.
|
||||
|
||||
@ -371,7 +387,7 @@
|
||||
(__mf_usage): Check for -lpthread presence.
|
||||
(__mf_unregister): Confirm matching unregistration base.
|
||||
(__mf_find_objects_rec): Reduce unnecessary recursion.
|
||||
* mf-runtime.h.in: Add "nothrow" attribute to functions. Add
|
||||
* mf-runtime.h.in: Add "nothrow" attribute to functions. Add
|
||||
#defines for new hook functions.
|
||||
* mf-impl.h: Corresponding changes.
|
||||
* config.h.in, configure, Makefile.in: Regenerated.
|
||||
@ -593,7 +609,7 @@
|
||||
* mf-hooks.c: Don't include <execinfo.h> any more.
|
||||
* mf-runtime.c (__mf_set_options): Call more stdlib functions
|
||||
via CALL_REAL.
|
||||
(__mf_backtrace): Provide alternate baby implementation in
|
||||
(__mf_backtrace): Provide alternate baby implementation in
|
||||
absence of glibc.
|
||||
* test/mf-driver.c: Portability tweaks.
|
||||
* acinclude.m4: New file, containing top level libtool.m4.
|
||||
@ -604,19 +620,19 @@
|
||||
* mf-runtime.h.in (HAVE_UINTPTR_T): Define unconditionally.
|
||||
|
||||
2002-11-08 Frank Ch. Eigler <fche@redhat.com>
|
||||
|
||||
|
||||
* mf-runtime.c (options): Add new "wipe-heap", "wipe-stack"
|
||||
options.
|
||||
(__mf_unregister): Implement stack/heap object wiping.
|
||||
(__mf_set_options): Renamed from __mf_process_opts.
|
||||
(__mf_uncache_object): Change arg type, correct callers.
|
||||
(__mf_uncache_object): Change arg type, correct callers.
|
||||
* mf-impl.h: Corresponding changes.
|
||||
* mf-hooks.c (realloc): Save/restore heap-wiping flag.
|
||||
* mf-runtime.h.in (__mf_set_options): Extend public API.
|
||||
* test/pass26-frag.c: New test for stack wiping.
|
||||
* Makefile.am (TESTS): Run it.
|
||||
* Makefile.in: Regenerated.
|
||||
|
||||
|
||||
2002-11-07 Frank Ch. Eigler <fche@redhat.com>
|
||||
|
||||
* mf-runtime.h.in (__mf_watch, __mf_unwatch): Extend public API.
|
||||
@ -631,7 +647,7 @@
|
||||
(__mf_unregister): Unlink object explicitly before uncaching.
|
||||
* test/fail21-frag.c, pass25-frag.c: New tests.
|
||||
* Makefile.in, aclocal.m4: Regenerated.
|
||||
|
||||
|
||||
2002-11-05 Frank Ch. Eigler <fche@redhat.com>
|
||||
|
||||
* test/fail20-frag.c: New test for NULL pointer dereferencing.
|
||||
@ -641,8 +657,8 @@
|
||||
build tree from config.h and new file mf-runtime.h.in.
|
||||
* mf-runtime.h.in: Renamed from mf-runtime.h. Tweak uintptr_t decl.
|
||||
* Makefile.in, configure, config.h.in: Regenerated.
|
||||
* mf-hooks.c: Add #undef for wrapped glibc str*/mem* macros.
|
||||
* mf-runtime.c (options, __mf_set_default_options): Support new
|
||||
* mf-hooks.c: Add #undef for wrapped glibc str*/mem* macros.
|
||||
* mf-runtime.c (options, __mf_set_default_options): Support new
|
||||
default "abbreviate" option.
|
||||
(__mf_object.description_epoch): New field.
|
||||
(__mf_describe_object): Conditionally abbreviate objects already
|
||||
@ -732,7 +748,7 @@
|
||||
entries to avoid repeat registration.
|
||||
* mf-runtime.c (__mf_object_cemetary): Don't bother bury GUESS regions.
|
||||
(__mf_register, __mf_unregister): Rewrite GUESS handling logic.
|
||||
|
||||
|
||||
2002-09-09 Frank Ch. Eigler <fche@redhat.com>
|
||||
|
||||
* Makefile.am: Create test sources with #include, not cat>>.
|
||||
@ -752,7 +768,7 @@
|
||||
overlapping object search.
|
||||
(__mf_violation): Likewise for nearby objects.
|
||||
Improve nearby-object listing.
|
||||
|
||||
|
||||
cleanup:
|
||||
* mf-runtime.c, mf-hooks.c: Remove "{{{"/"}}}" folding marks.
|
||||
* mf-heuristics.c (__mf_heuristic_check): Tweak message.
|
||||
@ -794,7 +810,7 @@
|
||||
* Makefile.in: Regenerated.
|
||||
|
||||
Heuristics reorganization:
|
||||
* mf-heuristics.c (__mf_register_ro_sections, __mf_init_heuristics):
|
||||
* mf-heuristics.c (__mf_register_ro_sections, __mf_init_heuristics):
|
||||
Remove these functions. Update callers.
|
||||
(__mf_heuristic_check): Incorporate all the various heuristics.
|
||||
Encode cacheability/retry judgement into trinary return value.
|
||||
@ -870,10 +886,10 @@
|
||||
|
||||
2002-08-20 Graydon Hoare <graydon@redhat.com>
|
||||
|
||||
* mf-runtime.h: New option: stack_bound (heuristic).
|
||||
* mf-runtime.h: New option: stack_bound (heuristic).
|
||||
Move some macros out of implementation files.
|
||||
* mf-runtime.c: New option string: -stack-bound.
|
||||
Unify recursion protection with hooks.
|
||||
Unify recursion protection with hooks.
|
||||
Add more logging.
|
||||
(__mf_check): Call __mf_heuristic_check.
|
||||
(__mf_process_opts): Fix "no-" processing.
|
||||
@ -911,7 +927,7 @@
|
||||
(__mf_register): Handle guessed regions, splitting
|
||||
guesses when new registrations arrive.
|
||||
(__mf_unregister): Do not unregister guesses.
|
||||
* mf-runtime.h: Move convenience macros around,
|
||||
* mf-runtime.h: Move convenience macros around,
|
||||
declare new option fields. Add __MF_TYPE_GUESS.
|
||||
* mf-hooks.c (__wrap_*alloc): Use crumple zones.
|
||||
(__wrap_free): Call __real_free for deferred frees.
|
||||
@ -974,4 +990,3 @@
|
||||
* mf-hooks.c: New file: interposed libc functions.
|
||||
* mf-runtime.c: New file: bulk of runtime.
|
||||
* mf-runtime.h: New file: public functions.
|
||||
|
||||
|
@ -16,7 +16,7 @@ else
|
||||
libmudflapth =
|
||||
endif
|
||||
|
||||
lib_LTLIBRARIES = libmudflap.la $(libmudflapth)
|
||||
toolexeclib_LTLIBRARIES = libmudflap.la $(libmudflapth)
|
||||
include_HEADERS = mf-runtime.h
|
||||
|
||||
libmudflap_la_SOURCES = \
|
||||
|
File diff suppressed because it is too large
Load Diff
1918
libmudflap/aclocal.m4
vendored
1918
libmudflap/aclocal.m4
vendored
File diff suppressed because it is too large
Load Diff
7363
libmudflap/configure
vendored
7363
libmudflap/configure
vendored
File diff suppressed because it is too large
Load Diff
@ -11,17 +11,40 @@ AC_SUBST(PACKAGE)
|
||||
libtool_VERSION=1:0:0
|
||||
AC_SUBST(libtool_VERSION)
|
||||
|
||||
dnl AM_ENABLE_MULTILIB
|
||||
AC_MSG_CHECKING([for --enable-version-specific-runtime-libs])
|
||||
AC_ARG_ENABLE(version-specific-runtime-libs,
|
||||
[ --enable-version-specific-runtime-libs Specify that runtime libraries should be installed in a compiler-specific directory ],
|
||||
[case "$enableval" in
|
||||
yes) version_specific_libs=yes ;;
|
||||
no) version_specific_libs=no ;;
|
||||
*) AC_MSG_ERROR([Unknown argument to enable/disable version-specific libs]);;
|
||||
esac],
|
||||
[version_specific_libs=no])
|
||||
AC_MSG_RESULT($version_specific_libs)
|
||||
|
||||
AM_MAINTAINER_MODE
|
||||
AC_EXEEXT
|
||||
|
||||
AM_ENABLE_MULTILIB(, ..)
|
||||
|
||||
target_alias=${target_alias-$target}
|
||||
AC_SUBST(target_alias)
|
||||
|
||||
AM_CONFIG_HEADER(config.h)
|
||||
|
||||
AC_LANG_C
|
||||
# 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.
|
||||
# As a side effect, we have to subst CFLAGS ourselves.
|
||||
|
||||
m4_rename([_AC_ARG_VAR_PRECIOUS],[real_PRECIOUS])
|
||||
m4_define([_AC_ARG_VAR_PRECIOUS],[])
|
||||
AC_PROG_CC
|
||||
m4_rename([real_PRECIOUS],[_AC_ARG_VAR_PRECIOUS])
|
||||
|
||||
AC_SUBST(CFLAGS)
|
||||
|
||||
if test "x$GCC" != "xyes"; then
|
||||
AC_MSG_ERROR([libmudflap must be built with GCC])
|
||||
fi
|
||||
@ -56,7 +79,7 @@ fi
|
||||
|
||||
AC_MSG_CHECKING([for socklen_t in sys/socket.h])
|
||||
AC_TRY_COMPILE([#define _POSIX_PII_SOCKET
|
||||
#include <sys/types.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>], [socklen_t x = 5;],
|
||||
[AC_DEFINE(HAVE_SOCKLEN_T, 1, [Define it socklen_t typedef is in sys/socket.h.])
|
||||
AC_MSG_RESULT(yes)],
|
||||
@ -74,7 +97,7 @@ then
|
||||
MF_HAVE_UINTPTR_T=1
|
||||
else
|
||||
AC_TRY_COMPILE([#include <sys/types.h>], [uintptr_t k = 0;],
|
||||
[MF_HAVE_UINTPTR_T=1], [MF_HAVE_UINTPTR_T=0])
|
||||
[MF_HAVE_UINTPTR_T=1], [MF_HAVE_UINTPTR_T=0])
|
||||
fi
|
||||
AC_SUBST(MF_HAVE_UINTPTR_T)
|
||||
|
||||
@ -95,6 +118,42 @@ AM_CONDITIONAL(LIBMUDFLAPTH, [test "x$ac_have_pthread_h" != ""])
|
||||
|
||||
AC_CHECK_LIB(dl, dlsym)
|
||||
|
||||
# Process the option "--enable-version-specific-runtime-libs"
|
||||
gcc_version_trigger=${srcdir}/../gcc/version.c
|
||||
gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([[^ \"]]*\)[[ \"]].*/\1/'`
|
||||
gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'`
|
||||
AC_SUBST(gcc_version)
|
||||
|
||||
# Calculate toolexeclibdir
|
||||
# Also toolexecdir, though it's only used in toolexeclibdir
|
||||
case ${version_specific_libs} in
|
||||
yes)
|
||||
# Need the gcc compiler version to know where to install libraries
|
||||
# and header files if --enable-version-specific-runtime-libs option
|
||||
# is selected.
|
||||
toolexecdir='$(libdir)/gcc/$(target_alias)'
|
||||
toolexeclibdir='$(toolexecdir)/'${gcc_version}'$(MULTISUBDIR)'
|
||||
;;
|
||||
no)
|
||||
if test -n "$with_cross_host" &&
|
||||
test x"$with_cross_host" != x"no"; then
|
||||
# Install a library built with a cross compiler in tooldir, not libdir.
|
||||
toolexecdir='$(exec_prefix)/$(target_alias)'
|
||||
toolexeclibdir='$(toolexecdir)/lib'
|
||||
else
|
||||
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
|
||||
;;
|
||||
esac
|
||||
AC_SUBST(toolexecdir)
|
||||
AC_SUBST(toolexeclibdir)
|
||||
|
||||
if test "x$enable_shared" = "xyes" && test "x$ac_have_pthread_h" != ""; then
|
||||
# NB: don't check for -lpthread here, because then it would be
|
||||
# added to LIBS. For the thread-unaware libmudflap.la, we don't
|
||||
@ -112,7 +171,7 @@ if test "x$enable_shared" = "xyes" && test "x$ac_have_pthread_h" != ""; then
|
||||
# default symbol versioning suffix ("@@"), if any. But that's tricky.
|
||||
# Rather, run nm on the resulting executable. Unfortunately, autoconf
|
||||
# doesn't appear to have a macro that builds a test executable for
|
||||
# subsequent analysis ... so we do it by hand here.
|
||||
# subsequent analysis ... so we do it by hand here.
|
||||
cat >> conftest.c << EOF
|
||||
#include <pthread.h>
|
||||
int main () { void *p = (void *) & pthread_create; return (int) p; }
|
||||
@ -131,7 +190,12 @@ EOF
|
||||
LIBS="$oldLIBS"
|
||||
fi
|
||||
fi
|
||||
AC_DEFINE_UNQUOTED(PTHREAD_CREATE_VERSION, $pthread_create_version, [pthread_create symbol version])
|
||||
AC_DEFINE_UNQUOTED(PTHREAD_CREATE_VERSION, $pthread_create_version, [pthread_create symbol version])
|
||||
|
||||
if test ${multilib} = yes; then
|
||||
multilib_arg="--enable-multilib"
|
||||
else
|
||||
multilib_arg=
|
||||
fi
|
||||
|
||||
AC_OUTPUT([Makefile testsuite/Makefile mf-runtime.h])
|
||||
|
@ -1,4 +1,4 @@
|
||||
# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@ -76,7 +76,7 @@ proc libmudflap-init { language } {
|
||||
}
|
||||
append ld_library_path ":${blddir}/.libs"
|
||||
|
||||
set libs "-L../.libs -L../../../gcc"
|
||||
set libs "-L${blddir}/.libs"
|
||||
set cxxflags "-ggdb3 -DDEBUG_ASSERT"
|
||||
set includes "-I${srcdir} -I.."
|
||||
|
||||
@ -87,7 +87,7 @@ proc libmudflap-init { language } {
|
||||
# c++ libs are included by --build-cxx below
|
||||
set cxx "[exec sh $cxxflags_file --build-cxx]"
|
||||
} else {
|
||||
lappend libs "-L../../libstdc++-v3/src/.libs"
|
||||
lappend libs "-L${cxxblddir}src/.libs"
|
||||
lappend includes "-I../../libstdc++-v3/include"
|
||||
}
|
||||
}
|
||||
@ -95,6 +95,7 @@ proc libmudflap-init { language } {
|
||||
verbose -log "ld_library_path=$ld_library_path"
|
||||
setenv LD_LIBRARY_PATH $ld_library_path
|
||||
setenv SHLIB_PATH $ld_library_path
|
||||
setenv LD_RUN_PATH $ld_library_path
|
||||
setenv LD_LIBRARYN32_PATH $ld_library_path
|
||||
setenv LD_LIBRARY64_PATH $ld_library_path
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user