public inbox for cgen@sourceware.org
 help / color / mirror / Atom feed
From: Doug Evans <dje@transmeta.com>
To: Michael Meissner <cgen-mail@the-meissners.org>
Cc: cgen@sources.redhat.com
Subject: Exact sequences for running cgen
Date: Fri, 13 Jun 2003 18:16:00 -0000	[thread overview]
Message-ID: <16106.5336.275159.592263@casey.transmeta.com> (raw)
In-Reply-To: <20030613170851.GA31204@tiktok.the-meissners.org>

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.

  reply	other threads:[~2003-06-13 18:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-13 17:46 Michael Meissner
2003-06-13 18:16 ` Doug Evans [this message]
2003-06-15 16:55   ` Michael Meissner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=16106.5336.275159.592263@casey.transmeta.com \
    --to=dje@transmeta.com \
    --cc=cgen-mail@the-meissners.org \
    --cc=cgen@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).