From patchwork Wed Oct 1 11:54:56 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pedro Alves X-Patchwork-Id: 3052 Received: (qmail 28969 invoked by alias); 1 Oct 2014 11:55:03 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 28956 invoked by uid 89); 1 Oct 2014 11:55:02 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 01 Oct 2014 11:54:59 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s91Bsw2m016662 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Wed, 1 Oct 2014 07:54:58 -0400 Received: from brno.lan (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s91BsuT9020868 for ; Wed, 1 Oct 2014 07:54:57 -0400 From: Pedro Alves To: gdb-patches@sourceware.org Subject: [pushed] features/Makefile: Make 'make cfiles' default to generating all C files Date: Wed, 1 Oct 2014 12:54:56 +0100 Message-Id: <1412164496-9841-1-git-send-email-palves@redhat.com> This makes it easier to rebuild all GDB's generated target description C files. It also clarifies the comments a bit. One might think we need a GDB configured for the particular arquitecture (--target=foo). But a build that includes support for the target description is sufficient. (GDB rejects target descriptions that explicitly specify the architecture, with an element, if the architecture is unknown.) Tested that "make clean-cfiles" deletes all .c files under src/gdb/features/, and that "make cfiles" generates them all without error, and that diffing the newly generated C files against master comes out an empty diff. gdb/ 2014-10-01 Pedro Alves * features/Makefile: Update comments. (XMLTOC): List all xml files we build C files from. (clean-cfiles): New rule. --- gdb/ChangeLog | 6 +++ gdb/features/Makefile | 122 ++++++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 124 insertions(+), 4 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 770e32d..a80b0d3 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,11 @@ 2014-10-01 Pedro Alves + * features/Makefile: Update comments. + (XMLTOC): List all xml files we build C files from. + (clean-cfiles): New rule. + +2014-10-01 Pedro Alves + * features/i386/amd64-avx512-linux.c: Regenerate. * features/i386/amd64-avx512.c: Regenerate. * features/i386/x32-avx512-linux.c: Regenerate. diff --git a/gdb/features/Makefile b/gdb/features/Makefile index f967e4c..d0ffa52 100644 --- a/gdb/features/Makefile +++ b/gdb/features/Makefile @@ -25,9 +25,22 @@ # GDB repository. # It can also update the C files in the features directory from their -# XML master copies. This relies on a GDB linked with expat and -# configured for the correct architecture, so the files are again kept -# in the GDB repository. To generate C files: +# XML master copies. This relies on a GDB linked with expat and that +# is configured to include support for the architecture, so the files +# are kept in the GDB repository. +# +# By default we'll generate all C files, and you must point make at a +# GDB that has been configured with --enable-targets=all: +# +# make GDB=/path/to/gdb cfiles +# +# To regenerate all C files from scratch: +# +# make GDB=/path/to/gdb clean-cfiles cfiles +# +# To generate specific C files, you can override the XMLTOC make +# variable: +# # make GDB=/path/to/gdb XMLTOC="xml files" cfiles WHICH = aarch64 \ @@ -118,7 +131,103 @@ XSLTPROC = xsltproc outdir = ../regformats OUTPUTS = $(patsubst %,$(outdir)/%.dat,$(WHICH)) -XMLTOC = +# The set of xml files we'll generate .c files for GDB from. By +# default we'll build all .c files, which requires an +# --enable-targets=all GDB. You can override this by passing XMLTOC +# to make on the command line. +XMLTOC = \ + aarch64.xml \ + arm-with-iwmmxt.xml \ + arm-with-m-fpa-layout.xml \ + arm-with-m-vfp-d16.xml \ + arm-with-m.xml \ + arm-with-neon.xml \ + arm-with-vfpv2.xml \ + arm-with-vfpv3.xml \ + i386/amd64-avx-linux.xml \ + i386/amd64-avx.xml \ + i386/amd64-avx512-linux.xml \ + i386/amd64-avx512.xml \ + i386/amd64-linux.xml \ + i386/amd64-mpx-linux.xml \ + i386/amd64-mpx.xml \ + i386/amd64.xml \ + i386/i386-avx-linux.xml \ + i386/i386-avx.xml \ + i386/i386-avx512-linux.xml \ + i386/i386-avx512.xml \ + i386/i386-linux.xml \ + i386/i386-mmx-linux.xml \ + i386/i386-mmx.xml \ + i386/i386-mpx-linux.xml \ + i386/i386-mpx.xml \ + i386/i386.xml \ + i386/x32-avx-linux.xml \ + i386/x32-avx.xml \ + i386/x32-avx512-linux.xml \ + i386/x32-avx512.xml \ + i386/x32-linux.xml \ + i386/x32.xml \ + microblaze-with-stack-protect.xml \ + microblaze.xml \ + mips-dsp-linux.xml \ + mips-linux.xml \ + mips64-dsp-linux.xml \ + mips64-linux.xml \ + nios2-linux.xml \ + nios2.xml \ + rs6000/powerpc-32.xml \ + rs6000/powerpc-32l.xml \ + rs6000/powerpc-403.xml \ + rs6000/powerpc-403gc.xml \ + rs6000/powerpc-405.xml \ + rs6000/powerpc-505.xml \ + rs6000/powerpc-601.xml \ + rs6000/powerpc-602.xml \ + rs6000/powerpc-603.xml \ + rs6000/powerpc-604.xml \ + rs6000/powerpc-64.xml \ + rs6000/powerpc-64l.xml \ + rs6000/powerpc-7400.xml \ + rs6000/powerpc-750.xml \ + rs6000/powerpc-860.xml \ + rs6000/powerpc-altivec32.xml \ + rs6000/powerpc-altivec32l.xml \ + rs6000/powerpc-altivec64.xml \ + rs6000/powerpc-altivec64l.xml \ + rs6000/powerpc-cell32l.xml \ + rs6000/powerpc-cell64l.xml \ + rs6000/powerpc-e500.xml \ + rs6000/powerpc-e500l.xml \ + rs6000/powerpc-isa205-32l.xml \ + rs6000/powerpc-isa205-64l.xml \ + rs6000/powerpc-isa205-altivec32l.xml \ + rs6000/powerpc-isa205-altivec64l.xml \ + rs6000/powerpc-isa205-vsx32l.xml \ + rs6000/powerpc-isa205-vsx64l.xml \ + rs6000/powerpc-vsx32.xml \ + rs6000/powerpc-vsx32l.xml \ + rs6000/powerpc-vsx64.xml \ + rs6000/powerpc-vsx64l.xml \ + rs6000/rs6000.xml \ + s390-linux32.xml \ + s390-linux32v1.xml \ + s390-linux32v2.xml \ + s390-linux64.xml \ + s390-linux64v1.xml \ + s390-linux64v2.xml \ + s390-te-linux64.xml \ + s390x-linux64.xml \ + s390x-linux64v1.xml \ + s390x-linux64v2.xml \ + s390x-te-linux64.xml \ + tic6x-c62x-linux.xml \ + tic6x-c62x.xml \ + tic6x-c64x-linux.xml \ + tic6x-c64x.xml \ + tic6x-c64xp-linux.xml \ + tic6x-c64xp.xml + CFILES = $(patsubst %.xml,%.c,$(XMLTOC)) GDB = false @@ -185,5 +294,10 @@ $(outdir)/i386/x32-avx512.dat: i386/x32-core.xml i386/64bit-avx.xml \ $(outdir)/i386/x32-avx512-linux.dat: i386/x32-core.xml i386/64bit-avx.xml \ i386/64bit-mpx.xml i386/64bit-avx512.xml i386/64bit-linux.xml +# 'all' doesn't build the C files, so don't delete them in 'clean' +# either. +clean-cfiles: + rm -f $(CFILES) + clean: rm -f $(OUTPUTS)