summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornickc <nickc@138bc75d-0d04-0410-961f-82ee72b054a4>1999-03-02 09:25:31 +0000
committernickc <nickc@138bc75d-0d04-0410-961f-82ee72b054a4>1999-03-02 09:25:31 +0000
commit8ffadb5b8c590d5474a865820a5a3ccdfcd017cc (patch)
tree42aac305a72b4f86dcdb1e33c97ddd0c67114b1e
parentdaa9067950023645de267e1e14b91a18b9aabee5 (diff)
downloadgcc-8ffadb5b8c590d5474a865820a5a3ccdfcd017cc.tar.gz
Rename gxx_include_dir to gcc_gxx_include_dir
Fix computation of gcc_tooldir. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@25537 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog12
-rw-r--r--gcc/Makefile.in12
-rwxr-xr-xgcc/configure46
-rw-r--r--gcc/configure.in56
4 files changed, 96 insertions, 30 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 8b984de08c2..67bb7e3248d 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,15 @@
+Tue Mar 2 09:24:10 1999 Nick Clifton <nickc@cygnus.com>
+
+ * configure.in (gxx_include_dir): Rename to
+ gcc_gxx_include_dir in order to prevent it being overridden by
+ a top level Makefile.
+ (gcc_tooldir): If $exec_prefix != $prefix then use the
+ difference between the two as the basis for gcc_tooldir.
+
+ * configure: Rebuild.
+
+ * Makefile.in: Rename gxx_include_dir to gcc_gxx_include_dir.
+
Tue Mar 2 16:45:31 1999 J"orn Rennecke <amylaar@cygnus.co.uk>
* unroll.c (copy_loop_body): Don't make extra copies of
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 5691c49ef17..a73df5e8b05 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -274,7 +274,7 @@ gcc_tooldir = @gcc_tooldir@
# Since tooldir does not exist at build-time, use -B$(build_tooldir)/bin/
build_tooldir = $(exec_prefix)/$(target_alias)
# Directory in which the compiler finds g++ includes.
-gxx_include_dir= @gxx_include_dir@
+gcc_gxx_include_dir= @gcc_gxx_include_dir@
# Directory to search for site-specific includes.
includedir = $(local_prefix)/include
# assertdir is overridden in cross-make.
@@ -637,7 +637,7 @@ FLAGS_TO_PASS = \
"exec_prefix=$(exec_prefix)" \
"prefix=$(prefix)" \
"local_prefix=$(local_prefix)" \
- "gxx_include_dir=$(gxx_include_dir)" \
+ "gxx_include_dir=$(gcc_gxx_include_dir)" \
"tooldir=$(tooldir)" \
"gcc_tooldir=$(gcc_tooldir)" \
"bindir=$(bindir)" \
@@ -1947,7 +1947,7 @@ cccp.o: cccp.c $(CONFIG_H) intl.h pcp.h version.c config.status system.h \
mbchar.h prefix.h Makefile.in
$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
-DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
- -DGPLUSPLUS_INCLUDE_DIR=\"$(gxx_include_dir)\" \
+ -DGPLUSPLUS_INCLUDE_DIR=\"$(gcc_gxx_include_dir)\" \
-DLOCAL_INCLUDE_DIR=\"$(includedir)\" \
-DCROSS_INCLUDE_DIR=\"$(gcc_tooldir)/sys-include\" \
-DTOOL_INCLUDE_DIR=\"$(gcc_tooldir)/include\" \
@@ -1981,7 +1981,7 @@ cppinit.o: cppalloc.c $(CONFIG_H) cpplib.h intl.h system.h \
cpphash.h prefix.h output.h Makefile
$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
-DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
- -DGPLUSPLUS_INCLUDE_DIR=\"$(gxx_include_dir)\" \
+ -DGPLUSPLUS_INCLUDE_DIR=\"$(gcc_gxx_include_dir)\" \
-DLOCAL_INCLUDE_DIR=\"$(includedir)\" \
-DCROSS_INCLUDE_DIR=\"$(gcc_tooldir)/sys-include\" \
-DTOOL_INCLUDE_DIR=\"$(gcc_tooldir)/include\" \
@@ -2004,7 +2004,7 @@ protoize.o: protoize.c $(srcdir)/../include/getopt.h $(CONFIG_H) system.h \
Makefile
$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
-DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
- -DGPLUSPLUS_INCLUDE_DIR=\"$(gxx_include_dir)\" \
+ -DGPLUSPLUS_INCLUDE_DIR=\"$(gcc_gxx_include_dir)\" \
-DCROSS_INCLUDE_DIR=\"$(gcc_tooldir)/sys-include\" \
-DTOOL_INCLUDE_DIR=\"$(gcc_tooldir)/include\" \
-DLOCAL_INCLUDE_DIR=\"$(includedir)\" \
@@ -2015,7 +2015,7 @@ unprotoize.o: unprotoize.c protoize.c $(srcdir)/../include/getopt.h \
$(CONFIG_H) system.h Makefile
$(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
-DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
- -DGPLUSPLUS_INCLUDE_DIR=\"$(gxx_include_dir)\" \
+ -DGPLUSPLUS_INCLUDE_DIR=\"$(gcc_gxx_include_dir)\" \
-DCROSS_INCLUDE_DIR=\"$(gcc_tooldir)/sys-include\" \
-DTOOL_INCLUDE_DIR=\"$(gcc_tooldir)/include\" \
-DLOCAL_INCLUDE_DIR=\"$(includedir)\" \
diff --git a/gcc/configure b/gcc/configure
index a15a7b18936..f4d09cfc879 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -731,7 +731,10 @@ if test x$local_prefix = x; then
local_prefix=/usr/local
fi
-gxx_include_dir=
+# Don't set gcc_gxx_include_dir to gxx_include_dir since that's only
+# passed in by the toplevel make and thus we'd get different behavior
+# depending on where we built the sources.
+gcc_gxx_include_dir=
# Specify the g++ header file directory
# Check whether --with-gxx-include-dir or --without-gxx-include-dir was given.
if test "${with_gxx_include_dir+set}" = set; then
@@ -739,17 +742,17 @@ if test "${with_gxx_include_dir+set}" = set; then
case "${withval}" in
yes) { echo "configure: error: bad value ${withval} given for g++ include directory" 1>&2; exit 1; } ;;
no) ;;
-*) gxx_include_dir=$with_gxx_include_dir ;;
+*) gcc_gxx_include_dir=$with_gxx_include_dir ;;
esac
fi
-if test x${gxx_include_dir} = x; then
+if test x${gcc_gxx_include_dir} = x; then
if test x${enable_version_specific_runtime_libs} = xyes; then
- gxx_include_dir='${libsubdir}/include/g++'
+ gcc_gxx_include_dir='${libsubdir}/include/g++'
else
topsrcdir=${srcdir}/.. . ${srcdir}/../config.if
- gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/include/g++"-${libstdcxx_interface}
+ gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/include/g++"-${libstdcxx_interface}
fi
fi
@@ -8338,16 +8341,39 @@ if test x$enable_haifa != x; then
done
fi
-# if $(exec_prefix) is not the same as $(prefix), then do not use a relative
-# directory to get to $gcc_tooldir. Also handle the case where the user did
-# not specify a value for exec_prefix.
+# If $(exec_prefix) exists and is not the same as $(prefix), then compute an
+# absolute path for gcc_tooldir based on inserting the number of up-directory
+# movements required to get from $(exec_prefix) to $(prefix) into the basic
+# $(libsubdir)/@(unlibsubdir) based path.
# Don't set gcc_tooldir to tooldir since that's only passed in by the toplevel
# make and thus we'd get different behavior depending on where we built the
# sources.
if test x$exec_prefix = xNONE -o x$exec_prefix = x$prefix; then
gcc_tooldir='$(libsubdir)/$(unlibsubdir)/../$(target_alias)'
else
- gcc_tooldir='$(exec_prefix)'/${target_alias}
+# An explanation of the sed strings:
+# -e 's|^\$(prefix)||' matches and eliminates 'prefix' from 'exec_prefix'
+# -e 's|/$||' match a trailing forward slash and eliminates it
+# -e 's|^[^/]|/|' forces the string to start with a forward slash (*)
+# -e 's|/[^/]*|../|g' replaces each occurance of /<directory> with ../
+#
+# (*) Note this pattern overwrites the first character of the string
+# with a forward slash if one is not already present. This is not a
+# problem because the exact names of the sub-directories concerned is
+# unimportant, just the number of them matters.
+#
+# The practical upshot of these patterns is like this:
+#
+# prefix exec_prefix result
+# ------ ----------- ------
+# /foo /foo/bar ../
+# /foo/ /foo/bar ../
+# /foo /foo/bar/ ../
+# /foo/ /foo/bar/ ../
+# /foo /foo/bar/ugg ../../
+#
+ gcc_tooldir="$(libsubdir)/$(unlibsubdir)/\`echo \$(exec_prefix) |
+sed -e 's|^\$(prefix)||' -e 's|/$||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`$(target_alias)"
fi
@@ -8699,7 +8725,7 @@ s%@JAVAGC@%$JAVAGC%g
s%@gcc_version@%$gcc_version%g
s%@gcc_version_trigger@%$gcc_version_trigger%g
s%@local_prefix@%$local_prefix%g
-s%@gxx_include_dir@%$gxx_include_dir%g
+s%@gcc_gxx_include_dir@%$gcc_gxx_include_dir%g
s%@fixincludes@%$fixincludes%g
s%@build_install_headers_dir@%$build_install_headers_dir%g
s%@build_exeext@%$build_exeext%g
diff --git a/gcc/configure.in b/gcc/configure.in
index 75e5cd0b70c..e7a0a498f25 100644
--- a/gcc/configure.in
+++ b/gcc/configure.in
@@ -149,7 +149,10 @@ if test x$local_prefix = x; then
local_prefix=/usr/local
fi
-gxx_include_dir=
+# Don't set gcc_gxx_include_dir to gxx_include_dir since that's only
+# passed in by the toplevel make and thus we'd get different behavior
+# depending on where we built the sources.
+gcc_gxx_include_dir=
# Specify the g++ header file directory
AC_ARG_WITH(gxx-include-dir,
[ --with-gxx-include-dir=DIR
@@ -157,16 +160,16 @@ AC_ARG_WITH(gxx-include-dir,
[case "${withval}" in
yes) AC_MSG_ERROR(bad value ${withval} given for g++ include directory) ;;
no) ;;
-*) gxx_include_dir=$with_gxx_include_dir ;;
+*) gcc_gxx_include_dir=$with_gxx_include_dir ;;
esac])
-if test x${gxx_include_dir} = x; then
+if test x${gcc_gxx_include_dir} = x; then
if test x${enable_version_specific_runtime_libs} = xyes; then
- gxx_include_dir='${libsubdir}/include/g++'
+ gcc_gxx_include_dir='${libsubdir}/include/g++'
else
topsrcdir=${srcdir}/.. . ${srcdir}/../config.if
changequote(<<, >>)dnl
- gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/include/g++"-${libstdcxx_interface}
+ gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/include/g++"-${libstdcxx_interface}
changequote([, ])dnl
fi
fi
@@ -195,7 +198,7 @@ AC_ARG_ENABLE(c-cpplib,
if test x$enable_c_cpplib != xno; then
extra_c_objs="${extra_c_objs} libcpp.a"
extra_cxx_objs="${extra_cxx_objs} ../libcpp.a"
- extra_c_flags=-DUSE_CPPLIB=1
+ extra_c_flags="${extra_c_flags} -DUSE_CPPLIB=1"
cpp_main=cppmain
fi)
@@ -226,7 +229,7 @@ AC_ARG_ENABLE(init-priority,
--disable-init-priority conform to ISO C++ rules for ordering static objects
(i.e. initialized in order of declaration). ],
if test x$enable_init_priority != xno; then
- extra_c_flags=-DUSE_INIT_PRIORITY
+ extra_c_flags="${extra_c_flags} -DUSE_INIT_PRIORITY"
fi)
# Enable threads
@@ -803,7 +806,7 @@ changequote([,])dnl
;;
hppa*-*-openbsd*)
target_cpu_default="MASK_SNAKE"
- tmake_file=pa/t-openbsd
+ tmake_file=pa/t-openbsd
;;
hppa1.1-*-pro*)
tm_file="pa/pa-pro.h ${tm_file} pa/pa-pro-end.h libgloss.h"
@@ -3369,7 +3372,7 @@ changequote([,])dnl
xarm[23678] | xarm250 | xarm[67][01]0 \
| xarm7m | xarm7dm | xarm7dmi | xarm7tdmi \
| xarm7100 | xarm7500 | xarm7500fe | xarm810 \
- | xstrongarm | xstrongarm110)
+ | xstrongarm | xstrongarm110 | xstrongarm1100)
target_cpu_default2="TARGET_CPU_$with_cpu"
;;
@@ -4225,16 +4228,41 @@ if test x$enable_haifa != x; then
done
fi
-# if $(exec_prefix) is not the same as $(prefix), then do not use a relative
-# directory to get to $gcc_tooldir. Also handle the case where the user did
-# not specify a value for exec_prefix.
+# If $(exec_prefix) exists and is not the same as $(prefix), then compute an
+# absolute path for gcc_tooldir based on inserting the number of up-directory
+# movements required to get from $(exec_prefix) to $(prefix) into the basic
+# $(libsubdir)/@(unlibsubdir) based path.
# Don't set gcc_tooldir to tooldir since that's only passed in by the toplevel
# make and thus we'd get different behavior depending on where we built the
# sources.
if test x$exec_prefix = xNONE -o x$exec_prefix = x$prefix; then
gcc_tooldir='$(libsubdir)/$(unlibsubdir)/../$(target_alias)'
else
- gcc_tooldir='$(exec_prefix)'/${target_alias}
+changequote(<<, >>)dnl
+# An explanation of the sed strings:
+# -e 's|^\$(prefix)||' matches and eliminates 'prefix' from 'exec_prefix'
+# -e 's|/$||' match a trailing forward slash and eliminates it
+# -e 's|^[^/]|/|' forces the string to start with a forward slash (*)
+# -e 's|/[^/]*|../|g' replaces each occurance of /<directory> with ../
+#
+# (*) Note this pattern overwrites the first character of the string
+# with a forward slash if one is not already present. This is not a
+# problem because the exact names of the sub-directories concerned is
+# unimportant, just the number of them matters.
+#
+# The practical upshot of these patterns is like this:
+#
+# prefix exec_prefix result
+# ------ ----------- ------
+# /foo /foo/bar ../
+# /foo/ /foo/bar ../
+# /foo /foo/bar/ ../
+# /foo/ /foo/bar/ ../
+# /foo /foo/bar/ugg ../../
+#
+ gcc_tooldir="$(libsubdir)/$(unlibsubdir)/\`echo \$(exec_prefix) |
+sed -e 's|^\$(prefix)||' -e 's|/$||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`$(target_alias)"
+changequote([, ])dnl
fi
AC_SUBST(gcc_tooldir)
@@ -4290,7 +4318,7 @@ AC_SUBST(JAVAGC)
AC_SUBST(gcc_version)
AC_SUBST(gcc_version_trigger)
AC_SUBST(local_prefix)
-AC_SUBST(gxx_include_dir)
+AC_SUBST(gcc_gxx_include_dir)
AC_SUBST(fixincludes)
AC_SUBST(build_install_headers_dir)
AC_SUBST(build_exeext)