Patchwork [#3] declarations that are not Linux-specific

login
register
mail settings
Submitter Robert Millan
Date Jan. 20, 2011, 3:16 p.m.
Message ID <AANLkTimYb_epHEuxhNJgkKQDjsYYp3x3ShRYmCa3co2y@mail.gmail.com>
Download mbox | patch
Permalink /patch/79701/
State New
Headers show

Comments

Robert Millan - Jan. 20, 2011, 3:16 p.m.
A few declarations that are not Linux-specific are currently
in the Linux-specific sections of config.gcc:

  - default_gnu_indirect_function, introduced in r164725

  - i386/amd64 biarch support, introduced in r118147

Unless there's a reason that really makes them specific
to Linux, they can be enabled in all GNU systems.  In my
tests, this change doesn't prevent bootstrap on either
i386 or amd64 GNU/kFreeBSD.

Note 0: indentation has been (intentionally) omitted from
this patch.

Note 1: patch is relative to my previous patch for AMD64
targets running GNU/kFreeBSD.

Note 2: ChangeLog entry is in patch header.

Patch

2011-01-20  Robert Millan  <rmh@gnu.org>

	* config.gcc: Make a few declarations available for all GNU targets
	(instead of just Linux-based ones).

=== modified file 'gcc/config.gcc'
--- gcc/config.gcc	2011-01-18 22:00:14 +0000
+++ gcc/config.gcc	2011-01-19 15:37:29 +0000
@@ -1226,8 +1226,6 @@  i[34567]86-*-linux* | i[34567]86-*-kfree
 			# Intel 80386's running GNU/*
 			# with ELF format using glibc 2
 	tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h"
-	case ${target} in
-	i[34567]86-*-linux*)
 		# Assume modern glibc
 		default_gnu_indirect_function=yes
 		if test x$enable_targets = xall; then
@@ -1253,20 +1251,19 @@  i[34567]86-*-linux* | i[34567]86-*-kfree
 		else
 			tm_file="${tm_file} i386/linux.h"
 		fi
-		;;
-	i[34567]86-*-knetbsd*-gnu) tm_file="${tm_file} i386/linux.h knetbsd-gnu.h i386/knetbsd-gnu.h" ;;
-	i[34567]86-*-kfreebsd*-gnu) tm_file="${tm_file} i386/linux.h kfreebsd-gnu.h i386/kfreebsd-gnu.h" ;;
-	i[34567]86-*-kopensolaris*-gnu) tm_file="${tm_file} i386/linux.h kopensolaris-gnu.h i386/kopensolaris-gnu.h" ;;
-	i[34567]86-*-gnu*) tm_file="$tm_file i386/linux.h gnu.h i386/gnu.h";;
+	case ${target} in
+	i[34567]86-*-knetbsd*-gnu) tm_file="${tm_file} knetbsd-gnu.h i386/knetbsd-gnu.h" ;;
+	i[34567]86-*-kfreebsd*-gnu) tm_file="${tm_file} kfreebsd-gnu.h i386/kfreebsd-gnu.h" ;;
+	i[34567]86-*-kopensolaris*-gnu) tm_file="${tm_file} kopensolaris-gnu.h i386/kopensolaris-gnu.h" ;;
+	i[34567]86-*-gnu*) tm_file="$tm_file gnu.h i386/gnu.h";;
 	esac
 	tmake_file="${tmake_file} i386/t-crtstuff i386/t-crtpc i386/t-crtfm t-dfprules"
 	;;
 x86_64-*-linux* | x86_64-*-kfreebsd*-gnu | x86_64-*-knetbsd*-gnu)
 	tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h \
 		 i386/x86-64.h i386/linux64.h"
+	default_gnu_indirect_function=glibc-2011
 	case ${target} in
-	x86_64-*-linux*)
-	  default_gnu_indirect_function=glibc-2011 ;;
 	x86_64-*-kfreebsd*-gnu) tm_file="${tm_file} kfreebsd-gnu.h i386/kfreebsd-gnu.h" ;;
 	x86_64-*-knetbsd*-gnu) tm_file="${tm_file} knetbsd-gnu.h" ;;
 	esac