This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB 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]

[rfc] [3/7] Modernize AIX target: merge targets


Hello,

we currently support three different host/target rules for AIX:

  rs6000-*-aix4*   config/rs6000/aix4.mh   config/rs6000/aix4.mt
  rs6000-*-*       config/rs6000/rs6000.mh config/rs6000/rs6000.mt
  powerpc-*-aix*   config/powerpc/aix.mh   config/powerpc/aix.mt

The two sets of MH/MT files in config/rs6000 are completely identical
except for cosmetic changes.  They are also mostly identical to the 
files in config/powerpc, except that:

- config/powerpc/aix.mh adds xcoffread.o to NATDEPFILES
  (which is a no-op as xcoffread.o is in TDEPFILES anyway)

- config/powerpc/aix.mt adds rs6000-aix-tdep.o to TDEPFILES
  -- this is a bug in the rs6000 version

Thus, the whole setup can be simplified by merging the rs6000-*-* rules
into the powerpc-*-aix* rule, and removing the rs6000 MT/MH files.

Tested on powerpc-ibm-aix5.3.0.0, and by making sure GDB still builds
with --host=rs6000-aix, --host=rs6000-aix4, --target=rs6000-aix,
--target=rs6000-aix4.

Bye,
Ulrich


ChangeLog:

	* configure.host (rs6000-*-*): Merge with powerpc-*-aix* rules.
	* configure.tgt (rs6000-*-*): Likewise.
	* config/rs6000/aix4.mh: Delete file.
	* config/rs6000/aix4.mt: Delete file.
	* config/rs6000/rs6000.mh: Delete file.
	* config/rs6000/rs6000.mt: Delete file.

	* config/powerpc/nm-aix.h: Delete file.
	* config/powerpc/aix.mh (NAT_FILE): Set to config/rs6000/nm-rs6000.h.


diff -urNp gdb-orig/gdb/config/powerpc/aix.mh gdb-head/gdb/config/powerpc/aix.mh
--- gdb-orig/gdb/config/powerpc/aix.mh	Wed Apr 18 16:17:31 2007
+++ gdb-head/gdb/config/powerpc/aix.mh	Wed Apr 18 16:25:22 2007
@@ -1,6 +1,6 @@
 # Host: IBM PowerPC running AIX
 
-NAT_FILE= nm-aix.h
+NAT_FILE= config/rs6000/nm-rs6000.h
 
 # aix-thread.o is not listed in NATDEPFILES as it is pulled in by configure.
 NATDEPFILES= fork-child.o infptrace.o inftarg.o corelow.o rs6000-nat.o \
diff -urNp gdb-orig/gdb/config/powerpc/nm-aix.h gdb-head/gdb/config/powerpc/nm-aix.h
--- gdb-orig/gdb/config/powerpc/nm-aix.h	Wed Apr 18 16:17:31 2007
+++ gdb-head/gdb/config/powerpc/nm-aix.h	Wed Dec 31 19:00:00 1969
@@ -1,22 +0,0 @@
-/* IBM PowerPC native-dependent macros for GDB, the GNU debugger.
-   Copyright 1995, 1996, 2007 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330,
-   Boston, MA 02111-1307, USA.  */
-
-#include "rs6000/nm-rs6000.h"
-
diff -urNp gdb-orig/gdb/config/rs6000/aix4.mh gdb-head/gdb/config/rs6000/aix4.mh
--- gdb-orig/gdb/config/rs6000/aix4.mh	Wed Apr 18 16:17:30 2007
+++ gdb-head/gdb/config/rs6000/aix4.mh	Wed Dec 31 19:00:00 1969
@@ -1,9 +0,0 @@
-# Host: IBM RS/6000 running AIX4
-
-NAT_FILE= nm-rs6000.h
-NATDEPFILES= fork-child.o infptrace.o inftarg.o corelow.o rs6000-nat.o \
-	     xcoffsolib.o
-
-# When compiled with cc, for debugging, this argument should be passed.
-# We have no idea who our current compiler is though, so we skip it.
-# MH_CFLAGS = -bnodelcsect
diff -urNp gdb-orig/gdb/config/rs6000/aix4.mt gdb-head/gdb/config/rs6000/aix4.mt
--- gdb-orig/gdb/config/rs6000/aix4.mt	Wed Apr 18 16:17:30 2007
+++ gdb-head/gdb/config/rs6000/aix4.mt	Wed Dec 31 19:00:00 1969
@@ -1,3 +0,0 @@
-# Target: IBM RS/6000 running AIX4
-TDEPFILES= rs6000-tdep.o xcoffread.o ppc-sysv-tdep.o solib.o solib-svr4.o
-DEPRECATED_TM_FILE= config/rs6000/tm-rs6000.h
diff -urNp gdb-orig/gdb/config/rs6000/rs6000.mh gdb-head/gdb/config/rs6000/rs6000.mh
--- gdb-orig/gdb/config/rs6000/rs6000.mh	Wed Apr 18 16:17:30 2007
+++ gdb-head/gdb/config/rs6000/rs6000.mh	Wed Dec 31 19:00:00 1969
@@ -1,9 +0,0 @@
-# Host: IBM RS/6000 running AIX
-
-NAT_FILE= nm-rs6000.h
-NATDEPFILES= fork-child.o infptrace.o inftarg.o corelow.o rs6000-nat.o \
-	     xcoffsolib.o
-
-# When compiled with cc, for debugging, this argument should be passed.
-# We have no idea who our current compiler is though, so we skip it.
-# MH_CFLAGS = -bnodelcsect
diff -urNp gdb-orig/gdb/config/rs6000/rs6000.mt gdb-head/gdb/config/rs6000/rs6000.mt
--- gdb-orig/gdb/config/rs6000/rs6000.mt	Wed Apr 18 16:17:30 2007
+++ gdb-head/gdb/config/rs6000/rs6000.mt	Wed Dec 31 19:00:00 1969
@@ -1,3 +0,0 @@
-# Target: IBM RS/6000 running AIX
-TDEPFILES= rs6000-tdep.o xcoffread.o ppc-sysv-tdep.o solib.o solib-svr4.o
-DEPRECATED_TM_FILE= tm-rs6000.h
diff -urNp gdb-orig/gdb/configure.host gdb-head/gdb/configure.host
--- gdb-orig/gdb/configure.host	Wed Apr 18 16:17:10 2007
+++ gdb-head/gdb/configure.host	Wed Apr 18 16:23:28 2007
@@ -44,7 +44,7 @@ i[34567]86*)		gdb_host_cpu=i386 ;;
 m68*)			gdb_host_cpu=m68k ;;
 m88*)			gdb_host_cpu=m88k ;;
 mips*)			gdb_host_cpu=mips ;;
-powerpc*)		gdb_host_cpu=powerpc ;;
+powerpc* | rs6000)	gdb_host_cpu=powerpc ;;
 sparcv9 | sparc64)	gdb_host_cpu=sparc ;;
 s390*)			gdb_host_cpu=s390 ;;
 sh*)			gdb_host_cpu=sh ;;
@@ -118,7 +118,8 @@ mips*-*-netbsd* | mips*-*-knetbsd*-gnu)
 			gdb_host=nbsd ;;
 mips64*-*-openbsd*)	gdb_host=obsd64 ;;
 
-powerpc-*-aix*)		gdb_host=aix ;;
+powerpc-*-aix* | rs6000-*-*)
+			gdb_host=aix ;;
 powerpc-*-linux*)	gdb_host=linux ;;
 powerpc-*-netbsd* | powerpc-*-knetbsd*-gnu)
 			gdb_host=nbsd ;;
@@ -131,9 +132,6 @@ powerpc64-*-linux*)     gdb_host=ppc64-l
 				gdb_native=yes
                         fi
 			;;
-
-rs6000-*-aix4*)		gdb_host=aix4 ;;
-rs6000-*-*)		gdb_host=rs6000 ;;
 
 s390*-*-*)		gdb_host=s390 ;;
 
diff -urNp gdb-orig/gdb/configure.tgt gdb-head/gdb/configure.tgt
--- gdb-orig/gdb/configure.tgt	Wed Apr 18 16:17:16 2007
+++ gdb-head/gdb/configure.tgt	Wed Apr 18 16:24:18 2007
@@ -38,7 +38,7 @@ m68hc11*|m6811*)	gdb_target_cpu=m68hc11 
 m68*)			gdb_target_cpu=m68k ;;
 m88*)			gdb_target_cpu=m88k ;;
 mips*)			gdb_target_cpu=mips ;;
-powerpc*)		gdb_target_cpu=powerpc ;;
+powerpc* | rs6000)	gdb_target_cpu=powerpc ;;
 sparc*)			gdb_target_cpu=sparc ;;
 thumb*)			gdb_target_cpu=arm ;;
 s390*)			gdb_target_cpu=s390 ;;
@@ -171,7 +171,8 @@ mt-*-*)			gdb_target=mt ;;
 powerpc-*-netbsd* | powerpc-*-knetbsd*-gnu)
 			gdb_target=nbsd ;;
 powerpc-*-openbsd*)	gdb_target=obsd ;;
-powerpc-*-aix*)		gdb_target=aix ;;
+powerpc-*-aix* | rs6000-*-*)
+			gdb_target=aix ;;
 powerpc-*-linux*)	gdb_target=linux
 			build_gdbserver=yes
 			;;
@@ -183,9 +184,6 @@ powerpc*-*-*)		if test -f ../sim/ppc/Mak
 			else
 			  gdb_target=ppc-eabi
 			fi ;;
-
-rs6000-*-aix4*)		gdb_target=aix4 ;;
-rs6000-*-*)		gdb_target=rs6000 ;;
 
 s390*-*-*)		gdb_target=s390
 			build_gdbserver=yes
-- 
  Dr. Ulrich Weigand
  GNU Toolchain for Linux on System z and Cell BE
  Ulrich.Weigand@de.ibm.com


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