mirror of git://gcc.gnu.org/git/gcc.git
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.
|
||||
|
@ -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
File diff suppressed because it is too large
Load Diff
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
|
||||
|
@ -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
|
||||
|
@ -133,5 +192,10 @@ EOF
|
|||
fi
|
||||
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