merge from gcc
This commit is contained in:
parent
12769ad22a
commit
11a338da34
4 changed files with 1125 additions and 1054 deletions
|
@ -31,6 +31,8 @@ srcdir = @srcdir@
|
||||||
|
|
||||||
top_builddir = .
|
top_builddir = .
|
||||||
|
|
||||||
|
enable_shared = @enable_shared@
|
||||||
|
|
||||||
prefix = @prefix@
|
prefix = @prefix@
|
||||||
|
|
||||||
exec_prefix = @exec_prefix@
|
exec_prefix = @exec_prefix@
|
||||||
|
@ -70,7 +72,11 @@ PICFLAG =
|
||||||
MAKEOVERRIDES =
|
MAKEOVERRIDES =
|
||||||
|
|
||||||
TARGETLIB = ./libiberty.a
|
TARGETLIB = ./libiberty.a
|
||||||
|
LTTARGETLIB = ./libiberty.la
|
||||||
|
PREFIXTARGETLIB= ./libiberty
|
||||||
TESTLIB = ./testlib.a
|
TESTLIB = ./testlib.a
|
||||||
|
LTTESTLIB = ./testlib.la
|
||||||
|
PREFIXTESTLIB = ./testlib
|
||||||
|
|
||||||
LIBOBJS = @LIBOBJS@
|
LIBOBJS = @LIBOBJS@
|
||||||
LTLIBOBJS = @LTLIBOBJS@
|
LTLIBOBJS = @LTLIBOBJS@
|
||||||
|
@ -121,6 +127,8 @@ INCDIR=$(srcdir)/$(MULTISRCTOP)../include
|
||||||
|
|
||||||
COMPILE.c = $(CC) -c @DEFS@ $(LIBCFLAGS) -I. -I$(INCDIR) $(HDEFINES) @ac_libiberty_warn_cflags@
|
COMPILE.c = $(CC) -c @DEFS@ $(LIBCFLAGS) -I. -I$(INCDIR) $(HDEFINES) @ac_libiberty_warn_cflags@
|
||||||
LTCOMPILE = $(LIBTOOL) --mode=compile $(COMPILE.c)
|
LTCOMPILE = $(LIBTOOL) --mode=compile $(COMPILE.c)
|
||||||
|
CCLD = $(CC)
|
||||||
|
LINK = $(LIBTOOL) --mode=link $(CCLD) $(CFLAGS)
|
||||||
|
|
||||||
# Just to make sure we don't use a built-in rule with VPATH
|
# Just to make sure we don't use a built-in rule with VPATH
|
||||||
.c.o:
|
.c.o:
|
||||||
|
@ -259,13 +267,25 @@ INSTALLED_HEADERS = \
|
||||||
$(INCDIR)/splay-tree.h \
|
$(INCDIR)/splay-tree.h \
|
||||||
$(INCDIR)/ternary.h
|
$(INCDIR)/ternary.h
|
||||||
|
|
||||||
|
# FIXME: Libtool has to be used to create static and shared libraries
|
||||||
|
# if it is used to compile object files. Since libiberty doesn't really
|
||||||
|
# build shared library, we have to create the libraries we need by hand
|
||||||
|
# and remove those created by libtool.
|
||||||
$(TARGETLIB): $(REQUIRED_LTOFILES) $(EXTRA_LTOFILES) $(LTLIBOBJS)
|
$(TARGETLIB): $(REQUIRED_LTOFILES) $(EXTRA_LTOFILES) $(LTLIBOBJS)
|
||||||
-rm -f $(TARGETLIB) .libs/$(TARGETLIB)
|
libtooldir=`$(LIBTOOL) --config | sed -n -e 's/^objdir=//p'`; \
|
||||||
$(AR) $(AR_FLAGS) $(TARGETLIB) \
|
rm -f $(TARGETLIB) $$libtooldir/$(TARGETLIB) pic/$(TARGETLIB) \
|
||||||
$(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS)
|
|| true; \
|
||||||
$(RANLIB) $(TARGETLIB)
|
$(LINK) -o $(LTTARGETLIB) -rpath $(libdir) \
|
||||||
if [ -d .libs ]; then \
|
$(REQUIRED_LTOFILES) $(EXTRA_LTOFILES) $(LTLIBOBJS); \
|
||||||
cd .libs; \
|
if [ -f $$libtooldir/$(TARGETLIB) ]; then \
|
||||||
|
cp $$libtooldir/$(TARGETLIB) $(TARGETLIB).tmp; \
|
||||||
|
$(RANLIB) $(TARGETLIB).tmp; \
|
||||||
|
$(SHELL) $(srcdir)/../move-if-change \
|
||||||
|
$(TARGETLIB).tmp $(TARGETLIB); \
|
||||||
|
else true; fi; \
|
||||||
|
rm -f $(LTTARGETLIB) $$libtooldir/$(PREFIXTARGETLIB)*; \
|
||||||
|
if [ x$(enable_shared) = xyes ]; then \
|
||||||
|
cd $$libtooldir; \
|
||||||
$(AR) $(AR_FLAGS) $(TARGETLIB) \
|
$(AR) $(AR_FLAGS) $(TARGETLIB) \
|
||||||
$(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS); \
|
$(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS); \
|
||||||
$(RANLIB) $(TARGETLIB); \
|
$(RANLIB) $(TARGETLIB); \
|
||||||
|
@ -276,10 +296,17 @@ $(TARGETLIB): $(REQUIRED_LTOFILES) $(EXTRA_LTOFILES) $(LTLIBOBJS)
|
||||||
else true; fi
|
else true; fi
|
||||||
|
|
||||||
$(TESTLIB): $(REQUIRED_LTOFILES) $(CONFIGURED_LTOFILES)
|
$(TESTLIB): $(REQUIRED_LTOFILES) $(CONFIGURED_LTOFILES)
|
||||||
-rm -f $(TESTLIB)
|
libtooldir=`$(LIBTOOL) --config | sed -n -e 's/^objdir=//p'`; \
|
||||||
$(AR) $(AR_FLAGS) $(TESTLIB) \
|
rm -f $(TESTLIB) $$libtooldir/$(TESTLIB) || true; \
|
||||||
$(REQUIRED_OFILES) $(CONFIGURED_OFILES)
|
$(LINK) -o $(LTTESTLIB) -rpath $(libdir) \
|
||||||
$(RANLIB) $(TESTLIB)
|
$(REQUIRED_LTOFILES) $(CONFIGURED_LTOFILES); \
|
||||||
|
if [ -f $$libtooldir/$(TESTLIB) ]; then \
|
||||||
|
cp $$libtooldir/$(TESTLIB) $(TESTLIB).tmp; \
|
||||||
|
$(RANLIB) $(TESTLIB).tmp; \
|
||||||
|
$(SHELL) $(srcdir)/../move-if-change \
|
||||||
|
$(TESTLIB).tmp $(TESTLIB); \
|
||||||
|
else true; fi; \
|
||||||
|
rm -f $(LTTESTLIB) $$libtooldir/$(PREFIXTESTLIB)*
|
||||||
|
|
||||||
info: libiberty.info info-subdir
|
info: libiberty.info info-subdir
|
||||||
install-info: install-info-subdir
|
install-info: install-info-subdir
|
||||||
|
@ -402,7 +429,9 @@ maint-deps :
|
||||||
# Cleaning has to be done carefully to ensure that we don't clean our SUBDIRS
|
# Cleaning has to be done carefully to ensure that we don't clean our SUBDIRS
|
||||||
# multiple times, hence our explicit recursion with an empty SUBDIRS.
|
# multiple times, hence our explicit recursion with an empty SUBDIRS.
|
||||||
mostlyclean: mostlyclean-subdir
|
mostlyclean: mostlyclean-subdir
|
||||||
-rm -rf *.o *.lo pic .libs core errs \#* *.E a.out
|
-libtooldir=`$(LIBTOOL) --config | sed -n -e 's/^objdir=//p'`; \
|
||||||
|
rm -f $$libtooldir
|
||||||
|
-rm -rf *.o *.lo pic core errs \#* *.E a.out
|
||||||
-rm -f needed.awk needed2.awk errors dummy needed-list config.h stamp-*
|
-rm -f needed.awk needed2.awk errors dummy needed-list config.h stamp-*
|
||||||
-rm -f $(CONFIG_H) $(NEEDED_LIST)
|
-rm -f $(CONFIG_H) $(NEEDED_LIST)
|
||||||
-rm -f libiberty.aux libiberty.cp libiberty.cps libiberty.fn libiberty.ky
|
-rm -f libiberty.aux libiberty.cp libiberty.cps libiberty.fn libiberty.ky
|
||||||
|
|
|
@ -30,12 +30,5 @@ for frag in ${frags}; do
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
# record if we want to build shared libs.
|
|
||||||
if [ "${shared}" = "yes" ]; then
|
|
||||||
echo enable_shared = yes >> temp-frag
|
|
||||||
else
|
|
||||||
echo enable_shared = no >> temp-frag
|
|
||||||
fi
|
|
||||||
|
|
||||||
frag=xhost-mkfrag
|
frag=xhost-mkfrag
|
||||||
${CONFIG_SHELL-/bin/sh} ${libiberty_topdir}/move-if-change temp-frag xhost-mkfrag
|
${CONFIG_SHELL-/bin/sh} ${libiberty_topdir}/move-if-change temp-frag xhost-mkfrag
|
||||||
|
|
2086
libiberty/configure
vendored
2086
libiberty/configure
vendored
File diff suppressed because it is too large
Load diff
|
@ -4,6 +4,9 @@ AC_PREREQ(2.59)
|
||||||
AC_INIT
|
AC_INIT
|
||||||
AC_CONFIG_SRCDIR([xmalloc.c])
|
AC_CONFIG_SRCDIR([xmalloc.c])
|
||||||
|
|
||||||
|
# FIXME: libiberty doesn't support --disable-static
|
||||||
|
enable_static=yes
|
||||||
|
|
||||||
# This works around the fact that libtool configuration may change LD
|
# This works around the fact that libtool configuration may change LD
|
||||||
# for this particular configuration, but some shells, instead of
|
# for this particular configuration, but some shells, instead of
|
||||||
# keeping the changes in LD private, export them just because LD is
|
# keeping the changes in LD private, export them just because LD is
|
||||||
|
@ -113,8 +116,6 @@ GCC_NO_EXECUTABLES
|
||||||
AC_PROG_CC
|
AC_PROG_CC
|
||||||
AC_PROG_CPP_WERROR
|
AC_PROG_CPP_WERROR
|
||||||
|
|
||||||
AC_PROG_LIBTOOL
|
|
||||||
|
|
||||||
if test x$GCC = xyes; then
|
if test x$GCC = xyes; then
|
||||||
ac_libiberty_warn_cflags='-W -Wall -Wtraditional -pedantic'
|
ac_libiberty_warn_cflags='-W -Wall -Wtraditional -pedantic'
|
||||||
fi
|
fi
|
||||||
|
@ -124,13 +125,11 @@ AC_C_CONST
|
||||||
AC_C_INLINE
|
AC_C_INLINE
|
||||||
AC_C_BIGENDIAN_CROSS
|
AC_C_BIGENDIAN_CROSS
|
||||||
|
|
||||||
dnl When we start using libtool:
|
|
||||||
dnl Default to a non shared library. This may be overridden by the
|
dnl Default to a non shared library. This may be overridden by the
|
||||||
dnl configure option --enable-shared.
|
dnl configure option --enable-shared.
|
||||||
dnl AM_DISABLE_SHARED
|
AM_DISABLE_SHARED
|
||||||
|
|
||||||
dnl When we start using libtool:
|
AM_PROG_LIBTOOL
|
||||||
dnl AM_PROG_LIBTOOL
|
|
||||||
|
|
||||||
dnl When we start using automake:
|
dnl When we start using automake:
|
||||||
dnl AM_CONFIG_HEADER(config.h:config.in)
|
dnl AM_CONFIG_HEADER(config.h:config.in)
|
||||||
|
@ -529,6 +528,30 @@ else
|
||||||
fi
|
fi
|
||||||
AC_SUBST(INSTALL_DEST)
|
AC_SUBST(INSTALL_DEST)
|
||||||
|
|
||||||
|
# Add `./' to avoid VPATH.
|
||||||
|
m4_pattern_allow(LIBOBJS)
|
||||||
|
L=""
|
||||||
|
for l in x $LIBOBJS; do
|
||||||
|
case $l in
|
||||||
|
x) ;;
|
||||||
|
*) L="$L ./$l" ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
LIBOBJS="$L"
|
||||||
|
|
||||||
|
m4_pattern_allow(LTLIBOBJS)
|
||||||
|
L=""
|
||||||
|
for l in x $LTLIBOBJS; do
|
||||||
|
case $l in
|
||||||
|
x) ;;
|
||||||
|
*) L="$L ./$l" ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
LTLIBOBJS="$L"
|
||||||
|
|
||||||
|
dnl Delete it when we start creating shared library with libtool.
|
||||||
|
AC_SUBST(enable_shared)
|
||||||
|
|
||||||
# We need multilib support, but only if configuring for the target.
|
# We need multilib support, but only if configuring for the target.
|
||||||
AC_CONFIG_FILES([Makefile testsuite/Makefile])
|
AC_CONFIG_FILES([Makefile testsuite/Makefile])
|
||||||
AC_CONFIG_COMMANDS([default],
|
AC_CONFIG_COMMANDS([default],
|
||||||
|
|
Loading…
Add table
Reference in a new issue