[patch] binutils current: libiberty/configure and --with-build-subdir
H . J . Lu
hjl@lucon.org
Tue Feb 5 00:33:00 GMT 2002
On Mon, Feb 04, 2002 at 01:51:05PM -0800, H . J . Lu wrote:
> On Mon, Feb 04, 2002 at 04:16:43PM -0500, DJ Delorie wrote:
> >
> > > it won't work since ../../libiberty has already been configured for the
> > > target. You can't configure a different build directory when the source
> > > directory has been configured already.
> >
> > Oh, right.
> >
> > > Please try build != host yourself to see what is going on.
> >
> > I'll try to find time to do that today.
>
> Thanks.
>
> >
> > > BTW, please make sure you enable shared library.
> >
>
> When the shared library is enabled, the stamp-picdir target in libiberty
> will create the "pic" directory. That is one thing which won't work
> right when you configure a different build directory when the source
> directory has been configured already.
>
>
This is what I come up with. Any comments?
H.J.
---
2002-02-05 H.J. Lu (hjl@gnu.org)
* config-ml.in (ml_srcdotdot): Support --with-build-subdir.
(ml_unsubdir): Likewise.
2002-02-05 H.J. Lu (hjl@gnu.org)
* configure.in: Support --with-build-subdir.
* configure: Rebuild.
--- binutils-2.11.93.0.1/config-ml.in.build Tue Aug 22 16:49:39 2000
+++ binutils-2.11.93.0.1/config-ml.in Tue Feb 5 00:14:06 2002
@@ -580,7 +580,7 @@ if [ "${ml_verbose}" = --verbose ]; then
fi
if [ "${srcdir}" = "." ]; then
- if [ "${with_target_subdir}" != "." ]; then
+ if [ "${with_build_subdir}" != "." ] || [ "${with_target_subdir}" != "." ]; then
ml_srcdotdot="../"
else
ml_srcdotdot=""
@@ -700,7 +700,7 @@ if [ -n "${multidirs}" ] && [ -z "${ml_n
case ${srcdir} in
".")
echo Building symlink tree in `pwd`/${ml_dir}/${ml_libdir}
- if [ "${with_target_subdir}" != "." ]; then
+ if [ "${with_build_subdir}" != "." ] || [ "${with_target_subdir}" != "." ]; then
ml_unsubdir="../"
else
ml_unsubdir=""
--- binutils-2.11.93.0.1/libiberty/configure.in.build Mon Feb 4 23:11:56 2002
+++ binutils-2.11.93.0.1/libiberty/configure.in Tue Feb 5 00:13:36 2002
@@ -5,14 +5,19 @@ AC_INIT(pexecute.c)
dnl We use these options to decide which functions to include.
AC_ARG_WITH(target-subdir,
-[ --with-target-subdir=SUBDIR Configuring in a subdirectory])
+[ --with-target-subdir=SUBDIR Configuring in a subdirectory for target])
+AC_ARG_WITH(build-subdir,
+[ --with-build-subdir=SUBDIR Configuring in a subdirectory for build])
AC_ARG_WITH(cross-host,
[ --with-cross-host=HOST Configuring with a cross compiler])
AC_ARG_WITH(newlib,
[ --with-newlib Configuring with newlib])
if test "${srcdir}" = "."; then
- if test -z "${with_target_subdir}"; then
+ if test -n "${with_build_subdir}"; then
+ libiberty_topdir="${srcdir}/../.."
+ with_target_subdir=
+ elif test -z "${with_target_subdir}"; then
libiberty_topdir="${srcdir}/.."
else
if test "${with_target_subdir}" != "."; then
@@ -217,7 +222,7 @@ fi
setobjs=
CHECK=
-if test -n "${with_target_subdir}"; then
+if test -n "${with_build_subdir}" || test -n "${with_target_subdir}"; then
# We are being configured as a target library. AC_REPLACE_FUNCS
# may not work correctly, because the compiler may not be able to
@@ -319,7 +324,7 @@ if test -z "${setobjs}"; then
# DJ - only if we're *building* cygwin, not just building *with* cygwin
- if test -n "${with_target_subdir}"
+ if test -n "${with_build_subdir}" || test -n "${with_target_subdir}"
then
funcs="`echo $funcs | sed -e 's/random//'`"
LIBOBJS="$LIBOBJS random.o"
@@ -406,7 +411,7 @@ AC_SUBST(INSTALL_DEST)
AC_OUTPUT(Makefile testsuite/Makefile,
[test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
if test -n "$CONFIG_FILES"; then
- if test -n "${with_target_subdir}"; then
+ if test -n "${with_build_subdir}" || test -n "${with_target_subdir}"; then
# FIXME: We shouldn't need to set ac_file
ac_file=Makefile
. ${libiberty_topdir}/config-ml.in
@@ -415,6 +420,7 @@ fi],
srcdir=${srcdir}
host=${host}
target=${target}
+with_build_subdir=${with_build_subdir}
with_target_subdir=${with_target_subdir}
with_multisubdir=${with_multisubdir}
ac_configure_args="--enable-multilib ${ac_configure_args}"
More information about the Gcc-patches
mailing list