From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 94002 invoked by alias); 6 Oct 2017 10:21:49 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 93989 invoked by uid 89); 6 Oct 2017 10:21:48 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=Share, ARC, (unknown) X-HELO: mail-wr0-f173.google.com Received: from mail-wr0-f173.google.com (HELO mail-wr0-f173.google.com) (209.85.128.173) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 06 Oct 2017 10:21:45 +0000 Received: by mail-wr0-f173.google.com with SMTP id k7so1720298wre.2 for ; Fri, 06 Oct 2017 03:21:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=qgUuKP8ux5hHQGpNDdUJuc09Vz5jraiQSvOPQiWOWuw=; b=bC18a1UWaShaaGbRccZuEks0wYMSYZ/bJyuz6ucYeUcx15xo5bsxzd8sF4rPpbYVvs LG2YzTH3mixXrWSGh6UcpWOnxlZb6zt3N4UejPkQtjplte1M2euZ3hRw34SDtkfE3XNA asvM9JOY2YFnjgYrLOhiZT8eryR7MnfdA0HjheYLdrYbu7444D6ZdqbFqffFF47BTzNK LAyR0eVErEscrIKacWP9QiJ0ZbSe0mjGGLpPrBcE9hF+0KoXFtCiFgCuHKnWwaCjV0wY eVwscxBdVWYuE/+zwsaHxtblRZczVpr6aWmPnbpJJbV/z+LE5ZIzQVgWwBvt8C55vTVK yQyQ== X-Gm-Message-State: AMCzsaXzhprJ4f8qV7gs6lF4d6vIvB9eZkTQedONoaWTCcfrblzncPWo 5nH5V2++YldyBjYgXdcrZvMN4Q== X-Google-Smtp-Source: AOwi7QDl8z6iORxwfQAJMAs1N+N90P3Pxt/M/tCFxtD+GPUnZ/HgXRhIJn3bMIdcUJgB5emqIkgFEQ== X-Received: by 10.223.134.157 with SMTP id 29mr1522745wrx.72.1507285302683; Fri, 06 Oct 2017 03:21:42 -0700 (PDT) Received: from E107787-LIN (static.42.136.251.148.clients.your-server.de. [148.251.136.42]) by smtp.gmail.com with ESMTPSA id g206sm1026326wme.23.2017.10.06.03.21.41 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Fri, 06 Oct 2017 03:21:41 -0700 (PDT) From: Yao Qi To: Pedro Alves Cc: gdb-patches@sourceware.org Subject: Re: [RFC] Replicate src dir in build dir References: <1505832159-23038-1-git-send-email-yao.qi@linaro.org> <0aca31f3-4604-5630-baba-0584bb9d5c65@redhat.com> <86y3p99uy3.fsf@gmail.com> <06499c43-88b6-06cd-b3d8-4964bbd3b58e@redhat.com> <86a81djoln.fsf@gmail.com> <33e5939d-b8c1-ae61-4910-7492f85fdba8@redhat.com> Date: Fri, 06 Oct 2017 10:21:00 -0000 In-Reply-To: <33e5939d-b8c1-ae61-4910-7492f85fdba8@redhat.com> (Pedro Alves's message of "Tue, 3 Oct 2017 21:02:19 +0100") Message-ID: <86lgko60gd.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2017-10/txt/msg00133.txt.bz2 Pedro Alves writes: > OOC, this wasn't with gdb/gdb_buildall.sh, was it? > It is gdb_mbuild.sh, but they are similar. >> + >> +case "${targ}" in >> +*-*-freebsd* | *-*-kfreebsd*-gnu) >> + os_obs=3D"fbsd-tdep.o solib-svr4.o";; >> +*-*-netbsd* | *-*-knetbsd*-gnu) >> + os_obs=3D"nbsd-tdep.o solib-svr4.o";; >> +*-*-openbsd*) >> + os_obs=3D"obsd-tdep.o solib-svr4.o";; > > I'm surprised that there's no case for GNU/Linux > here, with at least linux-tdep.c and solib-svr4.o, > off hand. Maybe glibc-tdep.o too. I intended to add a case for linux here, but stop there due to some special cases, s390*-*-linux* doesn't have glibc-tdep.o. tic6x-*-*linux doesn't have solib-svr4.o (because it is actually uclinux). Anyway, I agree we need a case for linux, but still need to examine each special cases. > > There could be a case here for mingw/cygwin ports, > containing windows-tdep.o. arm*-wince-pe is a special case here. "wince" doesn't appear in the "os" part of target triplet (machine-vendor-os). > > And case for darwin ports with solib-darwin.o. Right. > > But none of that are blockers. I'm totally fine with > incremental progress. We can always improve on top. > >> +esac >> + >> # map target info into gdb names. > > I think IBWN to add a comment before each of the > arch / os sections, so that it's really obvious > what the different sections are about to new readers. > This "map target info ..." preexisting comment just above > might use an update too. Added some comments. > > But generally, I'm happy with this. Thanks much for doing it. Thanks for the review, patch below is what I pushed in. --=20 Yao (=E9=BD=90=E5=B0=A7) =46rom d97987e219b80c670e37eb0e25e31b36fa295509 Mon Sep 17 00:00:00 2001 From: Yao Qi Date: Fri, 6 Oct 2017 11:18:48 +0100 Subject: [PATCH] Share code updating gdb_target_obs Nowadays, there are much duplications in configure.tgt to update gdb_target_obs, some cpu specific object files are added to gdb_target_obs to some different target triplets of the same cpu. The same problem exists for os specific object files too. It is fragile to update them, and build with all targets enabled doesn't find the problem. This patch splits the gdb_target_obs update to three steps, cpu steps, os steps, and the rest. I tested this patch by build gdb for each different target triplets respectively, aarch64-elf aarch64-rtems aarch64-freebsd aarch64-linux alpha-elf alpha-linux alpha-netbsd alpha-openbsd arm-elf arm-wince-pe arm-linux arm-netbsd arm-symbianelf avr cris-elf frv-elf h8300-elf i386-elf i386-darwin i386-dicos i386-freebsd i386-netbsdelf i386-openbsd i386-nto i386-solaris i386-linux i386-gnu i386-cygwin i386-mingw32 i386-go32 ia64-linux-gnu ia64-vms lm32-elf m32c-elf m32r-elf m32r-linux m68hc11-elf m68k-elf m68k-linux m68k-netbsd m68k-openbsd m88k-openbsd mep-elf microblaze-xilinx-elf microblaze-linux-gnu mips-elf moxie-elf ms1-elf nios2-elf nios2-linux-gnu hppa-elf hppa-linux hppa-netbsd hppa-openbsd powerpc-eabi powerpc-freebsd powerpc-netbsd powerpc-openbsd powerpc-linux powerpc-lynx178 rl78-elf rx-elf s390-linux-gnu score-elf sh-elf sh-linux sh-openbsd sh64-elf sh64-linux sh64-openbsd sparc64-linux sparc-linux sparc-freebsd sparc64-freebsd sparc-netbsd sparc64-netbsd sparc-openbsd sparc64-openbsd spu-elf tic6x-elf tic6x-uclinux v850-elf vax-netbsd vax-openbsd x86_64-linux-gnu x86_64-darwin x86_64-dicos x86_64-elf x86_64-freebsd x86_64-mingw32 x86_64-netbsd x86_64-openbsd x86_64-rtems xstormy16-elf xtensa-elf xtensa-linux gdb: 2017-10-06 Yao Qi * configure.tgt (i386_tobjs): New variable. (amd64_tobjs): New variable. Set $cpu_obs and $os_obs. diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 93389b2..0f92439 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,11 @@ 2017-10-06 Yao Qi =20 + * configure.tgt (i386_tobjs): New variable. + (amd64_tobjs): New variable. + Set $cpu_obs and $os_obs. + +2017-10-06 Yao Qi + * Makefile.in (CONFIG_SRC_SUBDIR): New. (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o. (clean): Remove object files and dependency files. diff --git a/gdb/configure.tgt b/gdb/configure.tgt index 40c44b7..96cc7ee 100644 --- a/gdb/configure.tgt +++ b/gdb/configure.tgt @@ -36,23 +36,85 @@ case $targ in ;; esac =20 -# map target info into gdb names. +i386_tobjs=3D"i386-tdep.o i386.o i387-tdep.o" +amd64_tobjs=3D"amd64-tdep.o arch/amd64.o" + +# Here are three sections to get a list of target specific object +# files according to target triplet $TARG. + +# 1. Get the objects per cpu in $TARG. + +case "${targ}" in +aarch64*-*-*) + cpu_obs=3D"aarch64-tdep.o aarch64-insn.o";; + +alpha*-*-*) + # Target: Alpha + cpu_obs=3D"alpha-tdep.o" + ;; + +arc*-*-*) + # Target: Unidentified ARC target + cpu_obs=3D"arc-tdep.o" + ;; + +arm*-*-*) + cpu_obs=3D"arm.o arm-get-next-pcs.o arm-tdep.o";; + +hppa*-*-*) + # Target: HP PA-RISC + cpu_obs=3D"hppa-tdep.o" + ;; + +i[34567]86-*-*) + cpu_obs=3D"${i386_tobjs}" + if test "x$enable_64_bit_bfd" =3D "xyes"; then + cpu_obs=3D"${amd64_tobjs} ${cpu_obs}" + fi + ;; + +ia64*-*-*) + # Target: Intel IA-64 + cpu_obs=3D"ia64-tdep.o" + ;; + +x86_64-*-*) + cpu_obs=3D"${i386_tobjs} ${amd64_tobjs}";; + +xtensa*) + # Target: Tensilica Xtensa processors + cpu_obs=3D"xtensa-tdep.o xtensa-config.o solib-svr4.o" + ;; + +esac + +# 2. Get the objects per os in $TARG. + +case "${targ}" in +*-*-freebsd* | *-*-kfreebsd*-gnu) + os_obs=3D"fbsd-tdep.o solib-svr4.o";; +*-*-netbsd* | *-*-knetbsd*-gnu) + os_obs=3D"nbsd-tdep.o solib-svr4.o";; +*-*-openbsd*) + os_obs=3D"obsd-tdep.o solib-svr4.o";; +esac + +# 3. Get the rest of objects. =20 case "${targ}" in aarch64*-*-elf | aarch64*-*-rtems*) # Target: AArch64 embedded system - gdb_target_obs=3D"aarch64-tdep.o aarch64-newlib-tdep.o aarch64-insn.o" + gdb_target_obs=3D"aarch64-newlib-tdep.o" ;; =20 aarch64*-*-freebsd*) # Target: FreeBSD/aarch64 - gdb_target_obs=3D"aarch64-tdep.o aarch64-fbsd-tdep.o aarch64-insn.o \ - fbsd-tdep.o solib-svr4.o" + gdb_target_obs=3D"aarch64-fbsd-tdep.o" ;; =20 aarch64*-*-linux*) # Target: AArch64 linux - gdb_target_obs=3D"aarch64-tdep.o aarch64-linux-tdep.o aarch64-insn.o \ + gdb_target_obs=3D"aarch64-linux-tdep.o \ arm.o arm-linux.o arm-get-next-pcs.o arm-tdep.o \ arm-linux-tdep.o \ glibc-tdep.o linux-tdep.o solib-svr4.o \ @@ -62,23 +124,18 @@ aarch64*-*-linux*) =20 alpha*-*-linux*) # Target: Little-endian Alpha running Linux - gdb_target_obs=3D"alpha-tdep.o alpha-mdebug-tdep.o alpha-linux-tdep.o \ + gdb_target_obs=3D"alpha-mdebug-tdep.o alpha-linux-tdep.o \ linux-tdep.o solib-svr4.o" ;; alpha*-*-netbsd* | alpha*-*-knetbsd*-gnu) # Target: NetBSD/alpha - gdb_target_obs=3D"alpha-tdep.o alpha-mdebug-tdep.o alpha-bsd-tdep.o \ - alpha-nbsd-tdep.o nbsd-tdep.o solib-svr4.o" + gdb_target_obs=3D"alpha-mdebug-tdep.o alpha-bsd-tdep.o \ + alpha-nbsd-tdep.o" ;; alpha*-*-openbsd*) # Target: OpenBSD/alpha - gdb_target_obs=3D"alpha-tdep.o alpha-mdebug-tdep.o alpha-bsd-tdep.o \ - alpha-nbsd-tdep.o alpha-obsd-tdep.o nbsd-tdep.o \ - obsd-tdep.o solib-svr4.o" - ;; -alpha*-*-*) - # Target: Alpha - gdb_target_obs=3D"alpha-tdep.o" + gdb_target_obs=3D"alpha-mdebug-tdep.o alpha-bsd-tdep.o \ + alpha-nbsd-tdep.o alpha-obsd-tdep.o nbsd-tdep.o" ;; =20 am33_2.0*-*-linux*) @@ -89,44 +146,34 @@ am33_2.0*-*-linux*) =20 arc*-*-elf32) # Target: baremetal ARC elf32 (newlib) target - gdb_target_obs=3D"arc-newlib-tdep.o arc-tdep.o" - ;; - -arc*-*-*) - # Target: Unidentified ARC target - gdb_target_obs=3D"arc-tdep.o" + gdb_target_obs=3D"arc-newlib-tdep.o" ;; =20 arm*-wince-pe | arm*-*-mingw32ce*) # Target: ARM based machine running Windows CE (win32) - gdb_target_obs=3D"arm.o arm-get-next-pcs.o arm-tdep.o \ - arm-wince-tdep.o windows-tdep.o" + gdb_target_obs=3D"arm-wince-tdep.o windows-tdep.o" build_gdbserver=3Dyes ;; arm*-*-linux*) # Target: ARM based machine running GNU/Linux - gdb_target_obs=3D"arm.o arm-linux.o arm-get-next-pcs.o arm-tdep.o \ - arm-linux-tdep.o glibc-tdep.o \ + gdb_target_obs=3D"arm-linux.o arm-linux-tdep.o glibc-tdep.o \ solib-svr4.o symfile-mem.o linux-tdep.o linux-record.o" build_gdbserver=3Dyes ;; arm*-*-netbsd* | arm*-*-knetbsd*-gnu) # Target: NetBSD/arm - gdb_target_obs=3D"arm.o arm-get-next-pcs.o arm-tdep.o arm-nbsd-tdep.o \ - solib-svr4.o" + gdb_target_obs=3D"arm-nbsd-tdep.o" ;; arm*-*-openbsd*) # Target: OpenBSD/arm - gdb_target_obs=3D"arm.o arm-get-next-pcs.o arm-tdep.o arm-bsd-tdep.o \ - arm-obsd-tdep.o obsd-tdep.o solib-svr4.o" + gdb_target_obs=3D"arm-bsd-tdep.o arm-obsd-tdep.o" ;; arm*-*-symbianelf*) # Target: SymbianOS/arm - gdb_target_obs=3D"arm.o arm-get-next-pcs.o arm-tdep.o arm-symbian-tdep.o" + gdb_target_obs=3D"arm-symbian-tdep.o" ;; arm*-*-*) # Target: ARM embedded system - gdb_target_obs=3D"arm.o arm-get-next-pcs.o arm-tdep.o" gdb_sim=3D../sim/arm/libsim.a ;; =20 @@ -172,113 +219,94 @@ h8300-*-*) =20 hppa*-*-linux*) # Target: HP PA-RISC running Linux - gdb_target_obs=3D"hppa-tdep.o hppa-linux-tdep.o glibc-tdep.o \ + gdb_target_obs=3D"hppa-linux-tdep.o glibc-tdep.o \ linux-tdep.o solib-svr4.o symfile-mem.o" ;; hppa*-*-netbsd*) # Target: NetBSD/hppa - gdb_target_obs=3D"hppa-tdep.o hppa-bsd-tdep.o hppa-nbsd-tdep.o solib-svr4= .o" + gdb_target_obs=3D"hppa-bsd-tdep.o hppa-nbsd-tdep.o solib-svr4.o" ;; hppa*-*-openbsd*) # Target: OpenBSD/hppa - gdb_target_obs=3D"hppa-tdep.o hppa-bsd-tdep.o hppa-obsd-tdep.o solib-svr4= .o" - ;; -hppa*-*-*) - # Target: HP PA-RISC - gdb_target_obs=3D"hppa-tdep.o" + gdb_target_obs=3D"hppa-bsd-tdep.o hppa-obsd-tdep.o solib-svr4.o" ;; =20 i[34567]86-*-darwin*) # Target: Darwin/i386 - gdb_target_obs=3D"i386-tdep.o i386.o i387-tdep.o \ - i386-darwin-tdep.o solib-darwin.o" + gdb_target_obs=3D"i386-darwin-tdep.o solib-darwin.o" if test "x$enable_64_bit_bfd" =3D "xyes"; then # Target: GNU/Linux x86-64 - gdb_target_obs=3D"amd64-tdep.o arch/amd64.o amd64-darwin-tdep.o ${gdb= _target_obs}" + gdb_target_obs=3D"amd64-darwin-tdep.o ${gdb_target_obs}" fi ;; i[34567]86-*-dicos*) # Target: DICOS/i386 - gdb_target_obs=3D"i386-tdep.o i386.o i387-tdep.o dicos-tdep.o i386-dicos-= tdep.o" + gdb_target_obs=3D"dicos-tdep.o i386-dicos-tdep.o" ;; i[34567]86-*-freebsd* | i[34567]86-*-kfreebsd*-gnu) # Target: FreeBSD/i386 - gdb_target_obs=3D"i386-tdep.o i386.o i387-tdep.o i386-bsd-tdep.o \ - i386-fbsd-tdep.o fbsd-tdep.o solib-svr4.o" + gdb_target_obs=3D"i386-bsd-tdep.o i386-fbsd-tdep.o " ;; i[34567]86-*-netbsd* | i[34567]86-*-knetbsd*-gnu) # Target: NetBSD/i386 - gdb_target_obs=3D"i386-tdep.o i386.o i387-tdep.o i386-bsd-tdep.o \ - i386-nbsd-tdep.o nbsd-tdep.o solib-svr4.o" + gdb_target_obs=3D"i386-bsd-tdep.o i386-nbsd-tdep.o " ;; i[34567]86-*-openbsd*) # Target: OpenBSD/i386 - gdb_target_obs=3D"i386-tdep.o i386.o i387-tdep.o i386-bsd-tdep.o \ - i386-obsd-tdep.o obsd-tdep.o bsd-uthread.o \ - solib-svr4.o" + gdb_target_obs=3D"i386-bsd-tdep.o i386-obsd-tdep.o bsd-uthread.o" ;; i[34567]86-*-nto*) # Target: Intel 386 running qnx6. - gdb_target_obs=3D"i386-tdep.o i386.o i387-tdep.o solib-svr4.o \ + gdb_target_obs=3D"solib-svr4.o \ i386-nto-tdep.o nto-tdep.o" build_gdbserver=3Dyes ;; i[34567]86-*-solaris2* | x86_64-*-solaris2*) # Target: Solaris x86_64 - gdb_target_obs=3D"i386-tdep.o i386.o i387-tdep.o amd64-tdep.o arch/amd64.= o \ + gdb_target_obs=3D"${i386_tobjs} ${amd64_tobjs} \ amd64-sol2-tdep.o i386-sol2-tdep.o sol2-tdep.o \ solib-svr4.o" ;; i[34567]86-*-linux*) # Target: Intel 386 running GNU/Linux - gdb_target_obs=3D"i386-tdep.o i386.o i386-linux-tdep.o \ - glibc-tdep.o i387-tdep.o \ + gdb_target_obs=3D"i386-linux-tdep.o \ + glibc-tdep.o \ solib-svr4.o symfile-mem.o \ linux-tdep.o linux-record.o" if test "x$enable_64_bit_bfd" =3D "xyes"; then # Target: GNU/Linux x86-64 - gdb_target_obs=3D"amd64-tdep.o arch/amd64.o amd64-linux-tdep.o ${gdb_= target_obs}" + gdb_target_obs=3D"amd64-linux-tdep.o ${gdb_target_obs}" fi build_gdbserver=3Dyes ;; i[34567]86-*-gnu*) # Target: Intel 386 running the GNU Hurd - gdb_target_obs=3D"i386-tdep.o i386.o i387-tdep.o i386-gnu-tdep.o solib-sv= r4.o" + gdb_target_obs=3D"i386-gnu-tdep.o solib-svr4.o" ;; i[34567]86-*-cygwin*) # Target: Intel 386 running win32 - gdb_target_obs=3D"i386-tdep.o i386.o i386-cygwin-tdep.o i387-tdep.o \ - windows-tdep.o" + gdb_target_obs=3D"i386-cygwin-tdep.o windows-tdep.o" build_gdbserver=3Dyes ;; i[34567]86-*-mingw32*) # Target: Intel 386 running win32 - gdb_target_obs=3D"i386-tdep.o i386.o i386-cygwin-tdep.o i387-tdep.o \ - windows-tdep.o" + gdb_target_obs=3D"i386-cygwin-tdep.o windows-tdep.o" build_gdbserver=3Dyes ;; i[34567]86-*-go32* | i[34567]86-*-msdosdjgpp*) # Target: i386 running DJGPP/go32. - gdb_target_obs=3D"i386-tdep.o i386.o i387-tdep.o i386-go32-tdep.o" - ;; -i[34567]86-*-*) - # Target: i386 - gdb_target_obs=3D"i386-tdep.o i386.o i387-tdep.o" + gdb_target_obs=3D"i386-go32-tdep.o" ;; =20 ia64-*-linux*) # Target: Intel IA-64 running GNU/Linux - gdb_target_obs=3D"ia64-tdep.o ia64-linux-tdep.o linux-tdep.o \ + gdb_target_obs=3D"ia64-linux-tdep.o linux-tdep.o \ solib-svr4.o symfile-mem.o" build_gdbserver=3Dyes ;; ia64-*-*vms*) # Target: Intel IA-64 running OpenVMS - gdb_target_obs=3D"ia64-tdep.o ia64-vms-tdep.o" - ;; -ia64*-*-*) - # Target: Intel IA-64 - gdb_target_obs=3D"ia64-tdep.o" + gdb_target_obs=3D"ia64-vms-tdep.o" ;; =20 iq2000-*-*) @@ -332,11 +360,11 @@ m68*-*-linux*) ;; m68*-*-netbsd* | m68*-*-knetbsd*-gnu) # Target: NetBSD/m68k - gdb_target_obs=3D"m68k-tdep.o m68k-bsd-tdep.o solib-svr4.o" + gdb_target_obs=3D"m68k-tdep.o m68k-bsd-tdep.o" ;; m68*-*-openbsd*) # Target: OpenBSD/m68k - gdb_target_obs=3D"m68k-tdep.o m68k-bsd-tdep.o solib-svr4.o" + gdb_target_obs=3D"m68k-tdep.o m68k-bsd-tdep.o" ;; =20 m88*-*-openbsd*) @@ -371,17 +399,17 @@ mips*-*-linux*) ;; mips*-*-netbsd* | mips*-*-knetbsd*-gnu) # Target: MIPS running NetBSD - gdb_target_obs=3D"mips-tdep.o mips-nbsd-tdep.o solib-svr4.o nbsd-tdep.o" + gdb_target_obs=3D"mips-tdep.o mips-nbsd-tdep.o" gdb_sim=3D../sim/mips/libsim.a ;; mips*-*-freebsd*) # Target: MIPS running FreeBSD - gdb_target_obs=3D"mips-tdep.o mips-fbsd-tdep.o solib-svr4.o fbsd-tdep.o" + gdb_target_obs=3D"mips-tdep.o mips-fbsd-tdep.o" gdb_sim=3D../sim/mips/libsim.a ;; mips64*-*-openbsd*) # Target: OpenBSD/mips64 - gdb_target_obs=3D"mips-tdep.o mips64-obsd-tdep.o obsd-tdep.o solib-svr4.o" + gdb_target_obs=3D"mips-tdep.o mips64-obsd-tdep.o" ;; mips*-sde*-elf*) # Target: MIPS SDE @@ -434,21 +462,19 @@ nios2*-*-*) powerpc*-*-freebsd*) # Target: FreeBSD/powerpc gdb_target_obs=3D"rs6000-tdep.o ppc-sysv-tdep.o ppc64-tdep.o \ - ppc-fbsd-tdep.o fbsd-tdep.o solib-svr4.o \ + ppc-fbsd-tdep.o \ ravenscar-thread.o ppc-ravenscar-thread.o" ;; =20 powerpc-*-netbsd* | powerpc-*-knetbsd*-gnu) # Target: NetBSD/powerpc gdb_target_obs=3D"rs6000-tdep.o ppc-sysv-tdep.o ppc-nbsd-tdep.o \ - solib-svr4.o \ ravenscar-thread.o ppc-ravenscar-thread.o" gdb_sim=3D../sim/ppc/libsim.a ;; powerpc-*-openbsd*) # Target: OpenBSD/powerpc gdb_target_obs=3D"rs6000-tdep.o ppc-sysv-tdep.o ppc-obsd-tdep.o \ - solib-svr4.o \ ravenscar-thread.o ppc-ravenscar-thread.o" ;; powerpc-*-aix* | rs6000-*-* | powerpc64-*-aix*) @@ -516,12 +542,12 @@ sh*-*-linux*) ;; sh*-*-netbsdelf* | sh*-*-knetbsd*-gnu) # Target: NetBSD/sh - gdb_target_obs=3D"sh-tdep.o sh-nbsd-tdep.o solib-svr4.o" + gdb_target_obs=3D"sh-tdep.o sh-nbsd-tdep.o" gdb_sim=3D../sim/sh/libsim.a ;; sh*-*-openbsd*) # Target: OpenBSD/sh - gdb_target_obs=3D"sh-tdep.o sh64-tdep.o sh-nbsd-tdep.o solib-svr4.o" + gdb_target_obs=3D"sh-tdep.o sh64-tdep.o sh-nbsd-tdep.o" ;; sh64-*-elf*) # Target: Renesas/Super-H 64 bit with simulator @@ -558,32 +584,30 @@ sparc64-*-linux*) sparc*-*-freebsd* | sparc*-*-kfreebsd*-gnu) # Target: FreeBSD/sparc64 gdb_target_obs=3D"sparc-tdep.o sparc64-tdep.o sparc64-fbsd-tdep.o \ - fbsd-tdep.o solib-svr4.o \ ravenscar-thread.o sparc-ravenscar-thread.o" ;; sparc-*-netbsd* | sparc-*-knetbsd*-gnu) # Target: NetBSD/sparc - gdb_target_obs=3D"sparc-tdep.o sparc-nbsd-tdep.o nbsd-tdep.o \ - solib-svr4.o \ + gdb_target_obs=3D"sparc-tdep.o sparc-nbsd-tdep.o \ ravenscar-thread.o sparc-ravenscar-thread.o" ;; sparc64-*-netbsd* | sparc64-*-knetbsd*-gnu) # Target: NetBSD/sparc64 gdb_target_obs=3D"sparc64-tdep.o sparc64-nbsd-tdep.o sparc-tdep.o \ - sparc-nbsd-tdep.o nbsd-tdep.o solib-svr4.o \ + sparc-nbsd-tdep.o \ ravenscar-thread.o sparc-ravenscar-thread.o" ;; sparc-*-openbsd*) # Target: OpenBSD/sparc gdb_target_obs=3D"sparc-tdep.o sparc-nbsd-tdep.o sparc-obsd-tdep.o \ - nbsd-tdep.o obsd-tdep.o bsd-uthread.o solib-svr4.o \ + nbsd-tdep.o bsd-uthread.o \ ravenscar-thread.o sparc-ravenscar-thread.o" ;; sparc64-*-openbsd*) # Target: OpenBSD/sparc64 gdb_target_obs=3D"sparc64-tdep.o sparc64-nbsd-tdep.o sparc64-obsd-tdep.o \ sparc-tdep.o sparc-nbsd-tdep.o sparc-obsd-tdep.o \ - nbsd-tdep.o obsd-tdep.o bsd-uthread.o solib-svr4.o \ + nbsd-tdep.o bsd-uthread.o \ ravenscar-thread.o sparc-ravenscar-thread.o" ;; sparc-*-solaris2* | sparcv9-*-solaris2* | sparc64-*-solaris2*) @@ -660,67 +684,63 @@ vax-*-*) =20 x86_64-*-darwin*) # Target: Darwin/x86-64 - gdb_target_obs=3D"amd64-tdep.o arch/amd64.o i386-tdep.o i386.o i387-tdep.= o \ + gdb_target_obs=3D"${i386_tobjs} \ i386-darwin-tdep.o amd64-darwin-tdep.o \ solib-darwin.o" ;; =20 x86_64-*-dicos*) # Target: DICOS/x86-64 - gdb_target_obs=3D"amd64-tdep.o arch/amd64.o i386-tdep.o i386.o i387-tdep.= o \ + gdb_target_obs=3D"${i386_tobjs} \ dicos-tdep.o i386-dicos-tdep.o amd64-dicos-tdep.o" ;; x86_64-*-elf*) - gdb_target_obs=3D"amd64-tdep.o arch/amd64.o i386-tdep.o i386.o i387-tdep.= o" + gdb_target_obs=3D"${i386_tobjs}" ;; x86_64-*-linux*) # Target: GNU/Linux x86-64 - gdb_target_obs=3D"amd64-tdep.o amd64-linux-tdep.o arch/amd64.o i386-tdep.= o \ - i387-tdep.o i386.o i386-linux-tdep.o glibc-tdep.o \ + gdb_target_obs=3D"amd64-linux-tdep.o ${i386_tobjs} \ + i386-linux-tdep.o glibc-tdep.o \ solib-svr4.o symfile-mem.o linux-tdep.o linux-record.o" build_gdbserver=3Dyes ;; x86_64-*-freebsd* | x86_64-*-kfreebsd*-gnu) # Target: FreeBSD/amd64 - gdb_target_obs=3D"amd64-tdep.o arch/amd64.o amd64-fbsd-tdep.o i386-tdep.o= \ - i386.o i387-tdep.o i386-bsd-tdep.o i386-fbsd-tdep.o \ - fbsd-tdep.o solib-svr4.o" + gdb_target_obs=3D"amd64-fbsd-tdep.o ${i386_tobjs} \ + i386-bsd-tdep.o i386-fbsd-tdep.o" ;; x86_64-*-mingw* | x86_64-*-cygwin*) # Target: MingW/amd64 - gdb_target_obs=3D"amd64-tdep.o arch/amd64.o amd64-windows-tdep.o \ - i386-tdep.o i386.o i386-cygwin-tdep.o i387-tdep.o \ + gdb_target_obs=3D"amd64-windows-tdep.o \ + ${i386_tobjs} i386-cygwin-tdep.o \ windows-tdep.o" build_gdbserver=3Dyes ;; x86_64-*-netbsd* | x86_64-*-knetbsd*-gnu) # Target: NetBSD/amd64 - gdb_target_obs=3D"amd64-tdep.o arch/amd64.o amd64-nbsd-tdep.o i386-tdep.o= \ - i386.o i387-tdep.o nbsd-tdep.o solib-svr4.o" + gdb_target_obs=3D"amd64-nbsd-tdep.o ${i386_tobjs}" ;; x86_64-*-openbsd*) # Target: OpenBSD/amd64 - gdb_target_obs=3D"amd64-tdep.o arch/amd64.o amd64-obsd-tdep.o i386-tdep.o= \ - i387-tdep.o i386-bsd-tdep.o i386-obsd-tdep.o \ - i386.o obsd-tdep.o bsd-uthread.o solib-svr4.o" + gdb_target_obs=3D"amd64-obsd-tdep.o ${i386_tobjs} \ + i386-bsd-tdep.o i386-obsd-tdep.o \ + bsd-uthread.o" ;; x86_64-*-rtems*) - gdb_target_obs=3D"amd64-tdep.o arch/amd64.o i386-tdep.o i386.o i387-tdep.= o \ - i386-bsd-tdep.o" + gdb_target_obs=3D"${amd64_tobjs} ${i386_tobjs} i386-bsd-tdep.o" ;; xtensa*-*-linux*) gdb_target=3Dlinux # Target: GNU/Linux Xtensa - gdb_target_obs=3D"xtensa-tdep.o xtensa-config.o xtensa-linux-tdep.o \ - solib-svr4.o symfile-mem.o linux-tdep.o" + gdb_target_obs=3D"xtensa-linux-tdep.o symfile-mem.o linux-tdep.o" build_gdbserver=3Dyes ;; -xtensa*) - # Target: Tensilica Xtensa processors - gdb_target_obs=3D"xtensa-tdep.o xtensa-config.o solib-svr4.o" - ;; =20 esac =20 +# Put them together. + +gdb_target_obs=3D"${cpu_obs} ${os_obs} ${gdb_target_obs}" + # map target onto default OS ABI =20 case "${targ}" in