diff options
author | Richard Sandiford <richard@codesourcery.com> | 2007-05-12 08:00:12 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2007-05-12 08:00:12 +0000 |
commit | a747170836486ab3bbe8d16ec5f0c26566a0a0ff (patch) | |
tree | 133456234c1cdb8e1855c392ad57492bb7b95d86 | |
parent | eb77cddf4276f2ae7c6745cd7cf82dd49327dc4f (diff) | |
download | gcc-a747170836486ab3bbe8d16ec5f0c26566a0a0ff.zip gcc-a747170836486ab3bbe8d16ec5f0c26566a0a0ff.tar.gz gcc-a747170836486ab3bbe8d16ec5f0c26566a0a0ff.tar.bz2 |
configure.ac (gcc_gxx_include_dir): Use $(libsubdir_to_prefix).
gcc/
* configure.ac (gcc_gxx_include_dir): Use $(libsubdir_to_prefix).
(gcc_tooldir): Likewise.
* configure: Regenerate.
* Makefile.in (libsubdir_to_prefix): New variable, based on the
old configure.ac gcc_tooldir setting.
(prefix_to_exec_prefix): New variable.
(DRIVER_DEFINES): Use $(libsubdir_to_prefix)$(prefix_to_exec_prefix)
rather than $(unlibsubdir)/../ to derive TOOLDIR_BASE_PREFIX.
From-SVN: r124634
-rw-r--r-- | gcc/ChangeLog | 11 | ||||
-rw-r--r-- | gcc/Makefile.in | 32 | ||||
-rwxr-xr-x | gcc/configure | 37 | ||||
-rw-r--r-- | gcc/configure.ac | 41 |
4 files changed, 46 insertions, 75 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3f1318b..01ce517 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,14 @@ +2007-05-12 Richard Sandiford <richard@codesourcery.com> + + * configure.ac (gcc_gxx_include_dir): Use $(libsubdir_to_prefix). + (gcc_tooldir): Likewise. + * configure: Regenerate. + * Makefile.in (libsubdir_to_prefix): New variable, based on the + old configure.ac gcc_tooldir setting. + (prefix_to_exec_prefix): New variable. + (DRIVER_DEFINES): Use $(libsubdir_to_prefix)$(prefix_to_exec_prefix) + rather than $(unlibsubdir)/../ to derive TOOLDIR_BASE_PREFIX. + 2007-05-11 Silvius Rus <rus@google.com> * Makefile.in (OBJS-common): Add tree-ssa-alias-warnings.o. diff --git a/gcc/Makefile.in b/gcc/Makefile.in index a1952f5..ce039a2 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -461,6 +461,36 @@ libexecdir = @libexecdir@ libsubdir = $(libdir)/gcc/$(target_noncanonical)/$(version) # Directory in which the compiler finds executables libexecsubdir = $(libexecdir)/gcc/$(target_noncanonical)/$(version) +# $(prefix), expressed as a path relative to $(libsubdir). +# +# 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 occurrence 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 ../../ +libsubdir_to_prefix = \ + $(unlibsubdir)/`echo "$(libdir)" | \ + sed -e 's|^$(prefix)||' -e 's|/$$||' -e 's|^[^/]|/|' \ + -e 's|/[^/]*|../|g'` +# $(exec_prefix), expressed as a path relative to $(prefix). +prefix_to_exec_prefix = \ + `echo "$(exec_prefix)" | \ + sed -e 's|^$(prefix)||' -e 's|^/||' -e '/./s|$$|/|'` # Used to produce a relative $(gcc_tooldir) in gcc.o unlibsubdir = ../../.. # Directory in which to find other cross-compilation tools and headers. @@ -1778,7 +1808,7 @@ DRIVER_DEFINES = \ -DDEFAULT_TARGET_VERSION=\"$(version)\" \ -DDEFAULT_TARGET_MACHINE=\"$(target_noncanonical)\" \ -DSTANDARD_BINDIR_PREFIX=\"$(bindir)/\" \ - -DTOOLDIR_BASE_PREFIX=\"$(unlibsubdir)/../\" \ + -DTOOLDIR_BASE_PREFIX=\"$(libsubdir_to_prefix)$(prefix_to_exec_prefix)\" \ @TARGET_SYSTEM_ROOT_DEFINE@ \ $(VALGRIND_DRIVER_DEFINES) \ `test "X$${SHLIB_LINK}" = "X" || test "@enable_shared@" != "yes" || echo "-DENABLE_SHARED_LIBGCC"` \ diff --git a/gcc/configure b/gcc/configure index b3aa2b0..f920639 100755 --- a/gcc/configure +++ b/gcc/configure @@ -1688,7 +1688,7 @@ if test x${gcc_gxx_include_dir} = x; then if test x$host != x$target; then libstdcxx_incdir="$target_alias/$libstdcxx_incdir" fi - gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/$libstdcxx_incdir" + gcc_gxx_include_dir="\$(libsubdir)/\$(libsubdir_to_prefix)$libstdcxx_incdir" fi fi @@ -16835,40 +16835,7 @@ if test "x$subdirs" != x; then fi echo "source ${srcdir}/gdbinit.in" >> .gdbinit -# 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_noncanonical)' -else -# 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 occurrence 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 ../../ -# - dollar='$$' - gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_noncanonical)" -fi +gcc_tooldir='$(libsubdir)/$(libsubdir_to_prefix)$(target_noncanonical)' diff --git a/gcc/configure.ac b/gcc/configure.ac index 708ce16..f5e9c3e 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -141,9 +141,7 @@ if test x${gcc_gxx_include_dir} = x; then if test x$host != x$target; then libstdcxx_incdir="$target_alias/$libstdcxx_incdir" fi -changequote(<<, >>)dnl - gcc_gxx_include_dir="\$(libsubdir)/\$(unlibsubdir)/..\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/[^/]*|/..|g'\`/$libstdcxx_incdir" -changequote([, ])dnl + gcc_gxx_include_dir="\$(libsubdir)/\$(libsubdir_to_prefix)$libstdcxx_incdir" fi fi @@ -3681,42 +3679,7 @@ if test "x$subdirs" != x; then fi echo "source ${srcdir}/gdbinit.in" >> .gdbinit -# 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_noncanonical)' -else -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 occurrence 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 ../../ -# - dollar='$$' - gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_noncanonical)" -changequote([, ])dnl -fi +gcc_tooldir='$(libsubdir)/$(libsubdir_to_prefix)$(target_noncanonical)' AC_SUBST(gcc_tooldir) AC_SUBST(dollar) |