This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[planning to commit] use target_noncanonical more in gcc subdir


This is 'future-proofing', sidestepping the change in meaning of
target_alias which will happen with autoconf 2.5x.  No behavior
change.  

Currently testing with a bootstrap and install on i686-pc-linux-gnu;
will commit if there is no problem.

	* Makefile.in, configure.in, config.host, mkheaders.in: Replace
	uses of ${target_alias} for directory names (and other places which
	won't like the empty string) with ${target_noncanonical}.  Introduce
	call early in configure.in to _GCC_TOPLEV_NONCANONICAL_TARGET so it's
	available.
	* configure: Regenerate.

Index: Makefile.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Makefile.in,v
retrieving revision 1.1170
diff -u -r1.1170 Makefile.in
--- Makefile.in	11 Oct 2003 22:57:45 -0000	1.1170
+++ Makefile.in	14 Oct 2003 02:08:10 -0000
@@ -62,7 +62,7 @@
 build=@build@
 host=@host@
 target=@target@
-target_alias=@target_alias@
+target_noncanonical=@target_noncanonical@
 
 # Sed command to transform gcc to installed name.
 program_transform_name = @program_transform_name@
@@ -396,9 +396,9 @@
 # --------
 
 # Directory in which the compiler finds libraries etc.
-libsubdir = $(libdir)/gcc/$(target_alias)/$(version)
+libsubdir = $(libdir)/gcc/$(target_noncanonical)/$(version)
 # Directory in which the compiler finds executables
-libexecsubdir = $(libexecdir)/gcc/$(target_alias)/$(version)
+libexecsubdir = $(libexecdir)/gcc/$(target_noncanonical)/$(version)
 # Used to produce a relative $(gcc_tooldir) in gcc.o
 unlibsubdir = ../../..
 # Directory in which to find other cross-compilation tools and headers.
@@ -408,7 +408,7 @@
 # Used to install the shared libgcc.
 slibdir = @slibdir@
 # Since gcc_tooldir does not exist at build-time, use -B$(build_tooldir)/bin/
-build_tooldir = $(exec_prefix)/$(target_alias)
+build_tooldir = $(exec_prefix)/$(target_noncanonical)
 # Directory in which the compiler finds target-independent g++ includes.
 gcc_gxx_include_dir = @gcc_gxx_include_dir@
 # Directory to search for site-specific includes.
@@ -570,7 +570,7 @@
 
 # Actual name to use when installing a native compiler.
 GCC_INSTALL_NAME = `echo gcc|sed '$(program_transform_name)'`
-GCC_TARGET_INSTALL_NAME = $(target_alias)-`echo gcc|sed '$(program_transform_name)'`
+GCC_TARGET_INSTALL_NAME = $(target_noncanonical)-`echo gcc|sed '$(program_transform_name)'`
 CPP_INSTALL_NAME = `echo cpp|sed '$(program_transform_name)'`
 PROTOIZE_INSTALL_NAME = `echo protoize|sed '$(program_transform_name)'`
 UNPROTOIZE_INSTALL_NAME = `echo unprotoize|sed '$(program_transform_name)'`
@@ -1316,7 +1316,7 @@
 collect2.o : collect2.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) gstab.h intl.h \
 	$(OBSTACK_H) $(DEMANGLE_H) collect2.h version.h
 	$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES)  \
-	-DTARGET_MACHINE=\"$(target_alias)\" \
+	-DTARGET_MACHINE=\"$(target_noncanonical)\" \
 	-c $(srcdir)/collect2.c $(OUTPUT_OPTION)
 
 tlink.o: tlink.c $(DEMANGLE_H) $(HASHTAB_H) $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
@@ -1369,7 +1369,7 @@
   -DSTANDARD_EXEC_PREFIX=\"$(libdir)/gcc/\" \
   -DSTANDARD_LIBEXEC_PREFIX=\"$(libexecdir)/gcc/\" \
   -DDEFAULT_TARGET_VERSION=\"$(version)\" \
-  -DDEFAULT_TARGET_MACHINE=\"$(target_alias)\" \
+  -DDEFAULT_TARGET_MACHINE=\"$(target_noncanonical)\" \
   -DSTANDARD_BINDIR_PREFIX=\"$(bindir)/\" \
   -DTOOLDIR_BASE_PREFIX=\"$(unlibsubdir)/../\" \
   @TARGET_SYSTEM_ROOT_DEFINE@ \
@@ -1504,7 +1504,7 @@
    langhooks.h insn-flags.h cfglayout.h real.h cfgloop.h \
    hosthooks.h $(LANGHOOKS_DEF_H) cgraph.h $(COVERAGE_H)
 	$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
-	  -DTARGET_NAME=\"$(target_alias)\" \
+	  -DTARGET_NAME=\"$(target_noncanonical)\" \
 	  -c $(srcdir)/toplev.c $(OUTPUT_OPTION)
 main.o : main.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) toplev.h
 
@@ -1839,7 +1839,7 @@
   insn-config.h insn-flags.h insn-codes.h insn-constants.h \
   insn-attr.h
 	$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
-	  -DTARGET_NAME=\"$(target_alias)\" \
+	  -DTARGET_NAME=\"$(target_noncanonical)\" \
 	  -DLOCALEDIR=\"$(localedir)\" \
 	  -c $(filter %.c,$^) -o $@
 
@@ -2313,7 +2313,7 @@
 PREPROCESSOR_DEFINES = \
   -DGCC_INCLUDE_DIR=\"$(libsubdir)/include\" \
   -DGPLUSPLUS_INCLUDE_DIR=\"$(gcc_gxx_include_dir)\" \
-  -DGPLUSPLUS_TOOL_INCLUDE_DIR=\"$(gcc_gxx_include_dir)/$(target_alias)\" \
+  -DGPLUSPLUS_TOOL_INCLUDE_DIR=\"$(gcc_gxx_include_dir)/$(target_noncanonical)\" \
   -DGPLUSPLUS_BACKWARD_INCLUDE_DIR=\"$(gcc_gxx_include_dir)/backward\" \
   -DLOCAL_INCLUDE_DIR=\"$(local_includedir)\" \
   -DCROSS_INCLUDE_DIR=\"$(CROSS_SYSTEM_HEADER_DIR)\" \
@@ -2930,16 +2930,16 @@
 	fi
 	$(INSTALL_SCRIPT) gccbug $(DESTDIR)$(bindir)/$(GCCBUG_INSTALL_NAME)
 
-# Install the driver program as $(target_alias)-gcc, 
-# $(target_alias)-gcc-$(version)
+# Install the driver program as $(target_noncanonical)-gcc, 
+# $(target_noncanonical)-gcc-$(version)
 # and also as either gcc (if native) or $(gcc_tooldir)/bin/gcc.
 install-driver: installdirs xgcc$(exeext)
 	-if [ -f gcc-cross$(exeext) ] ; then \
 	  rm -f $(DESTDIR)$(bindir)/$(GCC_CROSS_NAME)$(exeext); \
 	  $(INSTALL_PROGRAM) gcc-cross$(exeext) $(DESTDIR)$(bindir)/$(GCC_CROSS_NAME)$(exeext); \
-	  rm -f $(DESTDIR)$(bindir)/$(target_alias)-gcc-$(version); \
+	  rm -f $(DESTDIR)$(bindir)/$(target_noncanonical)-gcc-$(version); \
 	  ( cd $(DESTDIR)$(bindir) && \
-	    $(LN) $(GCC_CROSS_NAME)$(exeext) $(target_alias)-gcc-$(version) ); \
+	    $(LN) $(GCC_CROSS_NAME)$(exeext) $(target_noncanonical)-gcc-$(version) ); \
 	  if [ -d $(DESTDIR)$(gcc_tooldir)/bin/. ] ; then \
 	    rm -f $(DESTDIR)$(gcc_tooldir)/bin/gcc$(exeext); \
 	    $(INSTALL_PROGRAM) gcc-cross$(exeext) $(DESTDIR)$(gcc_tooldir)/bin/gcc$(exeext); \
@@ -2947,13 +2947,13 @@
 	else \
 	  rm -f $(DESTDIR)$(bindir)/$(GCC_INSTALL_NAME)$(exeext); \
 	  $(INSTALL_PROGRAM) xgcc$(exeext) $(DESTDIR)$(bindir)/$(GCC_INSTALL_NAME)$(exeext); \
-	  rm -f $(DESTDIR)$(bindir)/$(target_alias)-gcc-$(version); \
+	  rm -f $(DESTDIR)$(bindir)/$(target_noncanonical)-gcc-$(version); \
 	  ( cd $(DESTDIR)$(bindir) && \
-	    $(LN) $(GCC_INSTALL_NAME)$(exeext) $(target_alias)-gcc-$(version) ); \
-	  rm -f $(DESTDIR)$(bindir)/$(target_alias)-gcc-tmp$(exeext); \
+	    $(LN) $(GCC_INSTALL_NAME)$(exeext) $(target_noncanonical)-gcc-$(version) ); \
+	  rm -f $(DESTDIR)$(bindir)/$(target_noncanonical)-gcc-tmp$(exeext); \
 	  ( cd $(DESTDIR)$(bindir) && \
-	    $(LN) $(GCC_INSTALL_NAME)$(exeext) $(target_alias)-gcc-tmp$(exeext) && \
-	    mv -f $(target_alias)-gcc-tmp$(exeext) $(GCC_TARGET_INSTALL_NAME)$(exeext) ); \
+	    $(LN) $(GCC_INSTALL_NAME)$(exeext) $(target_noncanonical)-gcc-tmp$(exeext) && \
+	    mv -f $(target_noncanonical)-gcc-tmp$(exeext) $(GCC_TARGET_INSTALL_NAME)$(exeext) ); \
 	fi
 
 # Install the info files.
@@ -3145,7 +3145,6 @@
 # These targets are for the dejagnu testsuites. The file site.exp
 # contains global variables that all the testsuites will use.
 
-# Set to $(target_alias).
 target_subdir = @target_subdir@
 
 site.exp: ./config.status Makefile
@@ -3161,7 +3160,7 @@
 	@echo "set host_triplet $(host)" >> ./tmp0
 	@echo "set build_triplet $(build)" >> ./tmp0
 	@echo "set target_triplet $(target)" >> ./tmp0
-	@echo "set target_alias $(target_alias)" >> ./tmp0
+	@echo "set target_alias $(target_noncanonical)" >> ./tmp0
 # CFLAGS is set even though it's empty to show we reserve the right to set it.
 	@echo "set CFLAGS \"\"" >> ./tmp0
 	@echo "set CXXFLAGS \"\"" >> ./tmp0
@@ -3296,7 +3295,7 @@
 	echo "CompilerTable.cplusplus_kind=GCC" >> $@
 	echo "CompilerTable.cplusplus_path=${objdir}/g++" >> $@
 	echo "CompilerTable.cplusplus_options=-B${objdir}/" >> $@
-	echo "DejaGNUTest.target=${target_alias}" >> $@
+	echo "DejaGNUTest.target=${target_noncanonical}" >> $@
 
 # Run the G++ testsuite using QMTest.
 qmtest-g++: ${QMTEST_DIR}/context
Index: config.host
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config.host,v
retrieving revision 2.6
diff -u -r2.6 config.host
--- config.host	13 Oct 2003 17:50:11 -0000	2.6
+++ config.host	14 Oct 2003 02:08:14 -0000
@@ -84,7 +84,7 @@
     host_exeext=.exe
     # This removes the cpu type and manufacturer components and
     #  replaces "." with "_" in the operating system version.
-    target_alias=`echo $host | sed 's/.*-.*-\(.*\)$/\1/' | sed 's/\./_/g'`
+    target_noncanonical=`echo $host | sed 's/.*-.*-\(.*\)$/\1/' | sed 's/\./_/g'`
     prefix=/gnu
     local_prefix=/gnu
     ;;
@@ -120,10 +120,10 @@
   i[34567]86-pc-msdosdjgpp*)
     host_xm_file=i386/xm-djgpp.h
     host_exeext=.exe
-    # Shorten $target_alias for 8.3 filename conventions.
+    # Shorten $target_noncanonical for 8.3 filename conventions.
     case ${target} in
       *pc-msdosdjgpp*)
-        target_alias=djgpp
+        target_noncanonical=djgpp
         ;;
     esac
     ;;
Index: configure.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/configure.in,v
retrieving revision 1.739
diff -u -r1.739 configure.in
--- configure.in	13 Oct 2003 18:18:01 -0000	1.739
+++ configure.in	14 Oct 2003 02:08:18 -0000
@@ -32,6 +32,9 @@
 # Determine the host, build, and target systems
 AC_CANONICAL_SYSTEM
 
+# Determine the noncanonical target name, for directory use.
+_GCC_TOPLEV_NONCANONICAL_TARGET
+
 # Determine the target- and build-specific subdirectories
 GCC_TOPLEV_SUBDIRS
 
@@ -519,7 +522,7 @@
 [  --with-sysroot[=DIR] Search for usr/lib, usr/include, et al, within DIR.],
 [
  case ${with_sysroot} in
- yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_alias}/sys-root' ;;
+ yes) TARGET_SYSTEM_ROOT='${exec_prefix}/${target_noncanonical}/sys-root' ;;
  *) TARGET_SYSTEM_ROOT=$with_sysroot ;;
  esac
    
@@ -1564,12 +1567,12 @@
 		gcc_cv_as=`echo as | sed ${program_transform_name}`$host_exeext
 	fi
 
-	test_dirs="$test_prefix/lib/gcc-lib/$target_alias/$gcc_version \
-		   $test_prefix/lib/gcc-lib/$target_alias \
-		   /usr/lib/gcc/$target_alias/$gcc_version \
-		   /usr/lib/gcc/$target_alias \
-		   $test_prefix/$target_alias/bin/$target_alias/$gcc_version \
-		   $test_prefix/$target_alias/bin"
+	test_dirs="$test_prefix/lib/gcc-lib/$target_noncanonical/$gcc_version \
+		   $test_prefix/lib/gcc-lib/$target_noncanonical \
+		   /usr/lib/gcc/$target_noncanonical/$gcc_version \
+		   /usr/lib/gcc/$target_noncanonical \
+		   $test_prefix/$target_noncanonical/bin/$target_noncanonical/$gcc_version \
+		   $test_prefix/$target_noncanonical/bin"
 
 	if test x$host = x$target; then
 	    test_dirs="$test_dirs \
@@ -1680,12 +1683,12 @@
 		gcc_cv_ld=`echo ld | sed ${program_transform_name}`$host_exeext
 	fi
 
-	test_dirs="$test_prefix/lib/gcc-lib/$target_alias/$gcc_version \
-		   $test_prefix/lib/gcc-lib/$target_alias \
-		   /usr/lib/gcc/$target_alias/$gcc_version \
-		   /usr/lib/gcc/$target_alias \
-		   $test_prefix/$target_alias/bin/$target_alias/$gcc_version \
-		   $test_prefix/$target_alias/bin"
+	test_dirs="$test_prefix/lib/gcc-lib/$target_noncanonical/$gcc_version \
+		   $test_prefix/lib/gcc-lib/$target_noncanonical \
+		   /usr/lib/gcc/$target_noncanonical/$gcc_version \
+		   /usr/lib/gcc/$target_noncanonical \
+		   $test_prefix/$target_noncanonical/bin/$target_noncanonical/$gcc_version \
+		   $test_prefix/$target_noncanonical/bin"
 
 	if test x$host = x$target; then
 	    test_dirs="$test_dirs \
@@ -2524,7 +2527,7 @@
     else
       test_prefix=$exec_prefix
     fi
-    for f in $gcc_cv_libgloss_srcdir/mips/idt.ld $test_prefix/$target_alias/lib/idt.ld
+    for f in $gcc_cv_libgloss_srcdir/mips/idt.ld $test_prefix/$target_noncanonical/lib/idt.ld
     do
       if grep '^STARTUP' $f > /dev/null 2>&1; then
         gcc_cv_mips_libgloss_startup=yes
@@ -2866,7 +2869,7 @@
 # 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)'
+    gcc_tooldir='$(libsubdir)/$(unlibsubdir)/../$(target_noncanonical)'
 else
 changequote(<<, >>)dnl
 # An explanation of the sed strings:
@@ -2891,7 +2894,7 @@
 #   /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_alias)"
+    gcc_tooldir="\$(libsubdir)/\$(unlibsubdir)/\`echo \$(exec_prefix) | sed -e 's|^\$(prefix)||' -e 's|/\$(dollar)||' -e 's|^[^/]|/|' -e 's|/[^/]*|../|g'\`\$(target_noncanonical)"
 changequote([, ])dnl
 fi
 AC_SUBST(gcc_tooldir)
@@ -2981,7 +2984,7 @@
 AC_SUBST(xm_file_list)
 AC_SUBST(xm_include_list)
 AC_SUBST(xm_defines)
-AC_SUBST(target_alias)
+AC_SUBST(target_noncanonical)
 AC_SUBST(c_target_objs)
 AC_SUBST(cxx_target_objs)
 AC_SUBST(target_cpu_default)
Index: mkheaders.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/mkheaders.in,v
retrieving revision 1.2
diff -u -r1.2 mkheaders.in
--- mkheaders.in	31 Jul 2003 23:36:43 -0000	1.2
+++ mkheaders.in	14 Oct 2003 02:08:18 -0000
@@ -21,7 +21,7 @@
 
 # Basic information
 target=@target@
-target_alias=@target_alias@
+target_noncanonical=@target_noncanonical@
 version=@gcc_version@
 
 VERBOSE=0
@@ -66,11 +66,11 @@
 libdir=@libdir@
 libexecdir=@libexecdir@
 # Directory in which the compiler finds libraries, etc.
-libsubdir=${libdir}/gcc-lib/${target_alias}/${version}
+libsubdir=${libdir}/gcc-lib/${target_noncanonical}/${version}
 # Directory in which the compiler finds executables
-libexecsubdir=${libexecdir}/gcc/${target_alias}/${version}
+libexecsubdir=${libexecdir}/gcc/${target_noncanonical}/${version}
 # Since gcc_tooldir does not exist at build-time, use -B${build_tooldir}/bin/
-build_tooldir=${exec_prefix}/${target_alias}
+build_tooldir=${exec_prefix}/${target_noncanonical}
 # Directory to search for site-specific includes.
 local_includedir=${local_prefix}/include
 includedir=${prefix}/include

-- 
Nathanael Nerode  <neroden at gcc.gnu.org>
http://home.twcny.rr.com/nerode/neroden/fdl.html


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]