Commit 91bffbe9 by Jakub Jelinek Committed by Tom Tromey

Makefile.am (SUBDIRS): Define.

2000-04-28  Jakub Jelinek  <jakub@redhat.com>

	* Makefile.am (SUBDIRS): Define.
	(AM_MAKEFLAGS): Likewise.
	(Multilib support.): Add section.
	* Makefile.in: Rebuilt.
	* ltconfig (extra_compiler_flags, extra_compiler_flags_value):
        New variables. Set for gcc using -print-multi-lib. Export them
        to libtool.
        (sparc64-*-linux-gnu*): Use libsuff 64 for search paths.
        * ltmain.sh (B|b|V): Don't throw away gcc's -B, -b and -V options
        for -shared links.
        (extra_compiler_flags_value, extra_compiler_flags): Check these
        for extra compiler options which need to be passed down in
        compiler_flags.

From-SVN: r33586
parent 7e04d3c7
2000-04-28 Jakub Jelinek <jakub@redhat.com>
* Makefile.am (SUBDIRS): Define.
(AM_MAKEFLAGS): Likewise.
(Multilib support.): Add section.
* Makefile.in: Rebuilt.
* ltconfig (extra_compiler_flags, extra_compiler_flags_value):
New variables. Set for gcc using -print-multi-lib. Export them
to libtool.
(sparc64-*-linux-gnu*): Use libsuff 64 for search paths.
* ltmain.sh (B|b|V): Don't throw away gcc's -B, -b and -V options
for -shared links.
(extra_compiler_flags_value, extra_compiler_flags): Check these
for extra compiler options which need to be passed down in
compiler_flags.
2000-04-16 Anthony Green <green@redhat.com>
* configure: Rebuilt.
......
......@@ -2,6 +2,8 @@
AUTOMAKE_OPTIONS = cygnus
SUBDIRS = include
EXTRA_DIST = LICENSE ChangeLog.v1 src/mips/ffi.c src/mips/n32.S \
src/mips/n32.s src/mips/o32.S src/mips/o32.s \
src/sparc/ffi.c src/sparc/v8.S src/sparc/v9.S \
......@@ -13,6 +15,52 @@ EXTRA_DIST = LICENSE ChangeLog.v1 src/mips/ffi.c src/mips/n32.S \
VPATH = @srcdir@:@srcdir@/src:@srcdir@/src/@TARGETDIR@
## ################################################################
##
## This section is for make and multilib madness.
##
# Work around what appears to be a GNU make bug handling MAKEFLAGS
# values defined in terms of make variables, as is the case for CC and
# friends when we are called from the top level Makefile.
AM_MAKEFLAGS = \
"AR_FLAGS=$(AR_FLAGS)" \
"CC_FOR_BUILD=$(CC_FOR_BUILD)" \
"CFLAGS=$(CFLAGS)" \
"CXXFLAGS=$(CXXFLAGS)" \
"CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
"CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
"INSTALL=$(INSTALL)" \
"INSTALL_DATA=$(INSTALL_DATA)" \
"INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
"INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
"JC1FLAGS=$(JC1FLAGS)" \
"LDFLAGS=$(LDFLAGS)" \
"LIBCFLAGS=$(LIBCFLAGS)" \
"LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
"MAKE=$(MAKE)" \
"MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
"PICFLAG=$(PICFLAG)" \
"PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
"SHELL=$(SHELL)" \
"exec_prefix=$(exec_prefix)" \
"infodir=$(infodir)" \
"libdir=$(libdir)" \
"prefix=$(prefix)" \
"AR=$(AR)" \
"AS=$(AS)" \
"CC=$(CC)" \
"CXX=$(CXX)" \
"LD=$(LD)" \
"LIBCFLAGS=$(LIBCFLAGS)" \
"NM=$(NM)" \
"PICFLAG=$(PICFLAG)" \
"RANLIB=$(RANLIB)" \
"DESTDIR=$(DESTDIR)"
MAKEOVERRIDES=
# Multilib support variables.
MULTISRCTOP =
MULTIBUILDTOP =
......@@ -84,3 +132,31 @@ AM_CFLAGS = -fexceptions
libffi_la_LDFLAGS = -release $(VERSION)
INCLUDES = -I$(top_srcdir)/include -Iinclude -I$(top_srcdir)/src
# Multilib support.
.PHONY: all-multi mostlyclean-multi clean-multi distclean-multi \
maintainer-clean-multi
all-recursive: all-multi
install-recursive: install-multi
mostlyclean-recursive: mostlyclean-multi
clean-recursive: clean-multi
distclean-recursive: distclean-multi
maintainer-clean-recursive: maintainer-clean-multi
all-multi:
$(MULTIDO) $(AM_MAKEFLAGS) DO=all multi-do
install-multi:
$(MULTIDO) $(AM_MAKEFLAGS) DO=install multi-do
mostlyclean-multi:
$(MULTICLEAN) $(AM_MAKEFLAGS) DO=mostlyclean multi-clean
clean-multi:
$(MULTICLEAN) $(AM_MAKEFLAGS) DO=clean multi-clean
distclean-multi:
$(MULTICLEAN) $(AM_MAKEFLAGS) DO=distclean multi-clean
maintainer-clean-multi:
$(MULTICLEAN) $(AM_MAKEFLAGS) DO=maintainer-clean multi-clean
## ################################################################
......@@ -985,6 +985,29 @@ else
fi
echo "$ac_t$with_gnu_ld" 1>&6
extra_compiler_flags=
extra_compiler_flags_value=
if test "$with_gcc" = yes; then
extra_compiler_flags_value="-B|-b|-V"
extra_compiler_flags="-B*|-b*|-V*"
# Check to see what are the possible multilibing options
echo $ac_n "checking what multilib options $compiler supports ... $ac_c" 1>&6
multilibopts=
if ${CC-cc} -print-multi-lib >/dev/null 2>&1; then
for dir in `${CC-cc} -print-multi-lib 2>/dev/null`; do
multilibopts="$multilibopts`echo $dir | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`"
done
fi
# Kill any whitespace at the beginning and end
multilibopts=`echo $multilibopts`
if test -n "$multilibopts"; then
extra_compiler_flags="$extra_compiler_flags`echo $multilibopts | sed -e 's/ -/|-/g' -e 's/^-/|-/'`"
echo "$ac_t$multilibopts" 1>&6
else
echo "$ac_t"none 1>&6
fi
fi
# See if the linker supports building shared libraries.
echo $ac_n "checking whether the linker ($LD) supports shared libraries... $ac_c" 1>&6
......@@ -1109,8 +1132,8 @@ EOF
*)
if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname -o $lib'
archive_expsym_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $linkopts ${wl}-soname $wl$soname -o $lib'
archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $linkopts ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
else
ld_shlibs=no
fi
......@@ -1217,7 +1240,7 @@ else
# FreeBSD 3 and greater uses gcc -shared to do shared libraries.
freebsd*)
archive_cmds='$CC -shared -o $lib $libobjs $deplibs $linkopts'
archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags $linkopts'
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
hardcode_minus_L=no
......@@ -1242,9 +1265,9 @@ else
irix5* | irix6*)
if test "$with_gcc" = yes; then
archive_cmds='$CC -shared $libobjs $deplibs $linkopts ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $linkopts ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
else
archive_cmds='$LD -shared $libobjs $deplibs $linkopts -soname $soname `test -n "$verstring" && echo -set_version $verstring` -o $lib'
archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags $linkopts -soname $soname `test -n "$verstring" && echo -set_version $verstring` -o $lib'
fi
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
hardcode_libdir_separator=:
......@@ -1279,7 +1302,7 @@ else
osf3* | osf4*)
if test "$with_gcc" = yes; then
allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $linkopts ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags $linkopts ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
else
allow_undefined_flag=' -expect_unresolved \*'
archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linkopts -soname $soname `test -n "$verstring" && echo -set_version $verstring` -o $lib'
......@@ -1771,6 +1794,13 @@ linux-gnu*)
*) dynamic_linker='Linux ld.so' ;;
esac
fi
case "$host_cpu" in
sparc64)
libsuff=64
sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}"
;;
esac
;;
netbsd*)
......@@ -2428,7 +2458,8 @@ case "$ltmain" in
finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
hardcode_libdir_flag_spec hardcode_libdir_separator \
sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms \
extra_compiler_flags extra_compiler_flags_value; do
case "$var" in
reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
......@@ -2654,6 +2685,10 @@ archive_expsym_cmds=$archive_expsym_cmds
postinstall_cmds=$postinstall_cmds
postuninstall_cmds=$postuninstall_cmds
# Case patterns for extra compiler flags needed for linking
extra_compiler_flags=$extra_compiler_flags
extra_compiler_flags_value=$extra_compiler_flags_value
# Method to check whether dependent libraries are shared objects.
deplibs_check_method=$deplibs_check_method
......
......@@ -787,6 +787,7 @@ compiler."
finalize_command="$CC"
compile_rpath=
compiler_flags=
finalize_rpath=
compile_shlibpath=
finalize_shlibpath=
......@@ -916,6 +917,13 @@ compiler."
prev=
continue
;;
B|b|V)
compiler_flags="$compiler_flags -$prev$qarg"
prev=
compile_command="$compile_command -$prev$qarg"
finalize_command="$finalize_command -$prev$qarg"
continue
;;
*)
eval "$prev=\"\$arg\""
prev=
......@@ -1076,6 +1084,17 @@ compiler."
# Some other compiler flag.
-* | +*)
if test "X$extra_compiler_flags_value" != "X"; then
is_extra_compiler_flag=
eval "case \"\$arg\" in \
$extra_compiler_flags_value) \
is_extra_compiler_flag=yes ;; \
esac"
if test "$is_extra_compiler_flag"; then
prev=`echo "X$arg" | $Xsed -e 's/^-//'`
continue
fi
fi
# Unknown arguments in both finalize_command and compile_command need
# to be aesthetically quoted because they are evaled later.
arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
......@@ -1084,6 +1103,16 @@ compiler."
arg="\"$arg\""
;;
esac
if test "X$extra_compiler_flags" != "X"; then
is_extra_compiler_flag=
eval "case \"\$arg\" in \
$extra_compiler_flags) \
is_extra_compiler_flag=yes ;; \
esac"
if test "$is_extra_compiler_flag"; then
compiler_flags="$compiler_flags $arg"
fi
fi
;;
*.o | *.obj | *.a | *.lib)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment