-
-
On Configuring Development Tools
- Last Mod Mon Apr 15 10:25:59 PDT 1991, by rich@sendai
+ K. Richard Pixley
+ Cygnus Support
INTRO
-----
This document attempts to describe the general concepts behind
configuration of the Cygnus Support release of the GNU Development
- Tools. It also discusses common usage. For a more in succint
- description, please refer to the man page on "configure" which you
- should have received {FIXME: ALONG WITH LOTS OF OTHER VERY PRETTY
- HARD COPY OR IN A DIFFERENT DISTRIBUTION OR ON THIS TAPE OR SHRINK
- BOX OR SOMETHING}.
+ Tools. It also discusses common usage. Eventually, FIXME, there
+ will also be a man page for "configure", an "info" tree, etc.
BASICS
calculator to compile on a SparcStation, we might configure for
host sun4. With our configuration system:
- cd desk-calculator ; configure sun4
+ cd desk-calculator ; ./configure sun4
does the trick. "configure" is a shell script that sets up
Makefiles, subdirectories, and symbolic links appropriate for
compiler on the sun4 to build a program intended to be run on a
sun3, we would configure the source for sun3.
- cd desk-calculator ; configure sun3
+ cd desk-calculator ; ./configure sun3
The fact that we are actually building the program on a sun4 makes
no difference if the sun3 cross compiler presents an environment
notation or postfix as a configuration option. For a sun3, chosing
infix might be:
- configure sun3 +notation=infix
+ ./configure sun3 +notation=infix
while a sun4 with postfix might be:
- configure sun4 +notation=postfix
+ ./configure sun4 +notation=postfix
If we wanted to build both at the same time, in the same directory
structure, the intermediate pieces used in the build process must
be kept separate.
- configure sun4 +forcesubdirs +notation=postfix
- configure sun3 +forcesubdirs +notation=infix
+ ./configure sun4 +subdirs +notation=postfix
+ ./configure sun3 +subdirs +notation=infix
will create subdirectories for the intermediate pieces of the sun4
and sun3 configurations. This is necessary as previous systems
were only capable of one configuration at a time. A second
configuration overwrote the first. We've chosen to retain this
- behaviour so the "+forcesubdirs" configuration option is necessary
+ behaviour so the "+subdirs" configuration option is necessary
to get the new behaviour. The order of the arguments doesn't
matter. There should be exactly one argument without a leading
'+' sign and that argument will be assumed to be the host name.
From here on the examples will assume that you want to build the
- tools "in place" and won't show the "+forcesubdirs" option, but
+ tools "in place" and won't show the "+subdirs" option, but
remember that it is available.
In order to actually install the program, the configuration system
default location is /usr/local. We refer to this location as
$(destdir). All user visible programs will be installed in
$(destdir)/bin. All other programs and files will be installed in
- a subdirectory of $(destdir)/lib. For the tools in this
- directory, the files not normally user visible will be installed
- in $(destdir)/lib/gcc.
+ a subdirectory of $(destdir)/lib.
You can elect to change $(destdir) only as a configuration time
option.
- configure sun4 +notation=postfix +destdir=/local
+ ./configure sun4 +notation=postfix +destdir=/local
Will configure the source such that:
The GNU Development Tools can be built on a wide variety of hosts.
So, of course, they must be configured. Like the last example,
- configure sun4 +destdir=/local
- configure sun3 +destdir=/local
+ ./configure sun4 +destdir=/local
+ ./configure sun3 +destdir=/local
will configure the source to be built in subdirectories, in order
to keep the intermediate pieces separate, and to be installed in
The development environment produced, is a configuration time
option, just like $(destdir).
- configure sun4 +destdir=/local +target=sun3
- configure sun3 +destdir=/local +target=sun4
+ ./configure sun4 +destdir=/local +target=sun3
+ ./configure sun3 +destdir=/local +target=sun4
In this example, like before, we create two configurations. The
first is intended to be built in a sun4 environment, in
- subdirectories, to be installed in /local. The second is also
- intended to be build in a sun4 environment, in subdirectories, to
- be installed in /local.
+ subdirectories, to be installed in /local. The second is intended
+ to be built in a sun3 environment, in subdirectories, to be
+ installed in /local.
Unlike the previous example, the first configuration will produce
a sun3 development environment, perhaps even suitable for building
machine. The process of using a native development environment to
build native programs is called a "native" build.
- configure sun4
+ ./configure sun4
Will configure this source such that when built in a sun4
development environment, with a development environment that
The Cygnus Support Release of the GNU Development Tools can be
configured for one such emulation at this time.
- configure sun4 +ansi
+ ./configure sun4 +ansi
will configure the source such that when built in a sun4
development environment the resulting development environment is
Simple Cross Environments:
- configure sun4 +target=a29k
+ ./configure sun4 +target=a29k
will configure the tools such that when compiled in a sun4
development environment the resulting development environment can
- be used to create programs intended for a sun3. Again, this does
+ be used to create programs intended for an a29k. Again, this does
not necessarily mean that the new development environment can be
run on a sun4. That would depend on the development environment
used to build these tools.
Crossing Into Targets:
- configure a29k +target=a29k
+ ./configure a29k +target=a29k
will configure the tools such that when compiled in an a29k
development environment, the resulting development environment can
sun4 environment.
If you happen to have an a29k lying around, you could now use
- this fresh development environment on the a29k to three stage
+ this fresh development environment on the a29k to three-stage
these tools all over again. This process would look just like it
did when we built the native sun4 development environment because
we would be building another native development environment, this
Most of the other permutations do exist in some form, but only one
more is interesting to the current discussion.
- configure a29k +target=sun3
+ ./configure a29k +target=sun3
will configure the tools such that when compiled in an a29k
development environment, the resulting development environment can
FINAL NOTES
-----------
-Gdb's config has features not yet present in the uniform configuration
-scheme described here. For this reason, configuration of gdb must
-currently be done separately from that of the rest of this package.
-This will be corrected soon. For more information on the
-configuration of gdb, please refer to the documents in gdb.{your
-target} if it exists, otherwise gdb.
-
By "configures", I mean that links, Makefile, .gdbinit, and
config.status are built. Configuration is always done from the source
directory.
hostname and target is targetname. If a previous configuration
existed, it will be overwritten.
-* "./configure +forcesubdirs hostname +target=targetname" creates a
- subdirectories Host-hostname and Host-hostname/Target-targetname and
- configures Host-hostname/Target-targetname. For now, makes should
- be done from Host-hostname/Target-targetname. "./configure +f name"
- works as expected. That is, it creates Host-name and
- Host-name/Target-name and configures the latter.
+* "./configure +subdirs hostname +target=targetname" creates a
+ subdirectories H-hostname and H-hostname/T-targetname and
+ configures H-hostname/T-targetname. For now, makes should
+ be done from H-hostname/T-targetname. "./configure +sub name"
+ works as expected. That is, it creates H-name and
+ H-name/T-name and configures the latter.
Hacking configurations:
subdirectories or not. The host and target specific Makefile may or
may not exist. If fragments
-* Makefiles can be editted directly, but those changes will eventually
+* Makefiles can be edited directly, but those changes will eventually
be lost. Changes intended to be permanent for a specific host
should be made to the host specific Makefile fragment. This should
be in ./config/hmake-host if it exists. Changes intended to be
these, either use "make Makefile" or re-configure from the source
directory.
-* configure can be editted directly, but those changes will eventually
+* configure can be edited directly, but those changes will eventually
be lost. Changes intended to be permanent for a specific directory
should be made to configure.in. Changes intended to be permanent
for all configure scripts should be made to configure.template.
Propogating changes to configure.in requires the presence of
configure.template which normally resides in the uppermost directory
you received. To propogate changes to either configure.template or
- a configure.in, use "configure +template=absolutepathtothetemplate".
+ a configure.in, use "configure +template=pathtothetemplate".
This will configure the configure scripts themselves, recursively if
appropriate.
-* "configure -srcdir=foo" is not supported yet. At the moment, things
+* "./configure -srcdir=foo" is not supported yet. At the moment, things
will probably be configured correctly only for leaf directories, and
even they will not have paths to libraries set properly.