From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8070 invoked by alias); 13 Jun 2003 18:16:05 -0000 Mailing-List: contact cgen-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cgen-owner@sources.redhat.com Received: (qmail 8038 invoked from network); 13 Jun 2003 18:16:04 -0000 Received: from unknown (HELO neon-gw.transmeta.com) (63.209.4.196) by sources.redhat.com with SMTP; 13 Jun 2003 18:16:04 -0000 Received: (from root@localhost) by neon-gw.transmeta.com (8.9.3/8.9.3) id LAA05116; Fri, 13 Jun 2003 11:16:00 -0700 Received: from mailhost.transmeta.com(10.1.1.15) by neon-gw.transmeta.com via smap (V2.1) id xma005059; Fri, 13 Jun 03 11:15:49 -0700 Received: from casey.transmeta.com (casey.transmeta.com [10.10.25.22]) by deepthought.transmeta.com (8.11.6/8.11.6) with ESMTP id h5DIFqB17147; Fri, 13 Jun 2003 11:15:52 -0700 (PDT) Received: (from dje@localhost) by casey.transmeta.com (8.9.3/8.7.3) id LAA32180; Fri, 13 Jun 2003 11:15:52 -0700 From: Doug Evans MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <16106.5336.275159.592263@casey.transmeta.com> Date: Fri, 13 Jun 2003 18:16:00 -0000 To: Michael Meissner Cc: cgen@sources.redhat.com Subject: Exact sequences for running cgen In-Reply-To: <20030613170851.GA31204@tiktok.the-meissners.org> References: <20030613170851.GA31204@tiktok.the-meissners.org> X-SW-Source: 2003-q2/txt/msg00110.txt.bz2 Michael Meissner writes: > Ok, I must be doing something wrong. Could somebody give me an exact > walk-through of how to set up the cgen environment. I have tried using the cvs > sources, and the snapshot. I have tried building cgen in place, as well as my > usual preference of building it in a separate build directory. The last time I > asked this question, I was told just run the make in place, but neither the > snapshot nor the cvs sources have a Makefile. I have tried using a Red Hat 8.0 > system, as well as Red Hat 9 (using a 1.4.3 guile compiled since > > Here is one attempt: > > $ tar -xvjf snapshot-20030607.tar.bz2 > $ cd cgen/cgen > $ ./configure --target=m32r-unknown-elf > $ make desc > > At this point it runs, but if you look at the tmp-desc.h and tmp-desc.c files, > you see that it has not substituted M32R for @ARCH@ and m32r for @arch@ as I > would expect. See the attachments for the tmp-desc.h and tmp-desc.c files. The tmp-desc.[ch] files get subsequently fed through sed to s/@ARCH@/FOO/ and this happens when you run the generators from the opcodes directory. "Final" versions of the generated files are always built from the application dir (pedantic: except html since there is no app. dir). The rules in cgen/Makefile exist just so one can generate something and have a gander at them to see if they look correct. In normal production work, one configures with --enable-cgen-maint, and builds in the opcodes directory and lets the dependencies in opcodes/Makefile regenerate the files whenever the .cpu file changes. Ditto for sim, sid, etc. So, exact walk-through: 1) mkdir obj 2) cd obj 3) /path/to/binutils+cgen/configure --target=m32r-elf --enable-cgen-maint 4) touch /path/to/binutils+cgen/cgen/cpu/m32r.cpu # ensure files get rebuilt 5) cd opcodes 6) make stamp-m32r i.e. Regarding: > The last time I > asked this question, I was told just run the make in place, but neither the > snapshot nor the cvs sources have a Makefile I should have made clear that "in place" means in the opcodes build directory, not cgen.