source: rtems/README.configure @ bf4cdb70

4.104.114.84.95
Last change on this file since bf4cdb70 was e81ef51, checked in by Joel Sherrill <joel.sherrill@…>, on 02/17/98 at 14:12:01

Patch from Ralf Corsepius <corsepiu@…>:

Yep, I have a bunch of bug-fixes and additions pending (Yet another monster
patch, ... I can hear you scream :-).

1) configure.in : one AC_CONFIG_HEADER(...) line too much.

2) configure.in: gcc28 support is enabled by default, i.e. if no
--enable-gcc28 option is passed on the command line. I am not sure if this
is intentional.

IMO, AC_ARG_ENABLE for --enable-gcc28 should look like:

AC_ARG_ENABLE(gcc28, \
[ --enable-gcc28 enable use of gcc 2.8.x features], \
[case "${enableval}" in

yes) RTEMS_USE_GCC272=no ;;
no) RTEMS_USE_GCC272=yes ;;
*) AC_MSG_ERROR(bad value ${enableval} for gcc-28 option) ;;

esac],[RTEMS_USE_GCC272=yes])

3) At the end of c/src/exec/score/cpu/m68k/m68k.h

#ifdef cplusplus
}
#endif

#endif /* !ASM */

in my opinion these two statements should be swapped:

#endif /* !ASM */

#ifdef cplusplus
}
#endif

I didn't try to compile for m68k, but does't this give an error? Is it
compensated somewhere else - or didn't I look carefully enough?

5) configure.in: --enable-cpp should probably be renamed to --enable-cxx, as
gnu-programs use "cxx" to specify C++ specific configure options, while cpp
is used for the preprocessor (e.g egcs uses --with-cxx-includedir, autoconf
internally uses $CXX),

6) The macro files from aclocal/*.m4 contain the buggy sed-rules formerly
contained in aclocal..m4, i.e. the sed/sort-bug fix to aclocal.m4 didn't
make it to aclocal/*.m4. I think I should feel guilty for that - Obviously I
submitted the contents of an old aclocal-directory last time. - Sorry.

7) For sh-rtems, we currently need to add additional managers to
MANAGERS_REQUIRED (from inside of custom/*.cfg). Currently MANAGERS_REQUIRED
is defined in make/compilers/*.cfg. This seems to prevent overriding
MANAGERS_REQUIRED from custom/*.cfg files - Obviously the files are included
in such a way that the settings from compilers/*cfg always override settings
from custom/*.cfg files.

Furthermore, I think, defining MANAGERS_* inside gcc-<target>.cfg files is
not correct - MANAGERS are not gcc-variant-dependent, but depend
on targets/bsps and therefore should be defined in a bsp/target dependent
file, e.g. in custom/*.cfg or target.cfg.in.

I think defining default settings for MANAGERS* in custom/default.cfg could
be an appropriate location. But this requires all custom/*.cfg files to
include default.cfg, which *-posix.cfg files don't seem to do.

Therefore I would like propose to move MANAGERS* to target.cfg.in - they are
included by all custom/*.cfg files. Perhaps we/you should use this
opportunity to merge parts from custom/default.cfg into target.cfg.in. This
ensures to have the setting included once per target makefile and will open
the opportunity to have autoconf doing additional work on
bsp-configurations.

Peanuts sofar, ... but here it comes ... (:-)

8) I am preparing a major enhancement to autoconf support for
gnutools/compilers. It is not yet finished, but usable and I'll therefore
attach a preliminary version to this mail.

Motivation:

  • Fix problems with --enable-gcc28, if target-cc is not gcc28 compatible
  • Fix -pipe problems
  • Fix problems with hard-coded paths in configuration files (esp. posix)
  • Fix consistency problems with explictly given gnutools and gcc's gnutools

Currently included:

  • detection and checking of host and target compiler (gcc/g++)
  • checking if target gnutools are in path
  • checking if <target>-gcc -specs works (autodisabling gcc28 if not)
  • checking if <target>-gcc -pipe works

Todo :

  • *posix.cfg files are not yet adapted => The hard-coded paths for these systems are still in use.
  • Check if the host compiler $CC is properly propagated to the Makefiles (I doubt it, but this should not matter)
  • Check if rtems' generic tools still work properly (It looks like, but who knows)
  • Integrate CXX support into default.cfg or gcc-target-default.cfg (It looks like C++ support is only used by posix BSPs)
  • Automatically handle RANLIB/MKLIB for targets
  • Plenty ... (:-)

Open problems:

  • Untested for non-gcc compatible host and target compilers. This should be no problem if the tools are named follow gnutool's naming convention and are included in $PATH while running configure.
  • Intentionally using different tools than that gcc has been configured for, e.g. use a different assembler ? This should be still possible if XX_FOR_TARGET is hard-coded into custom/*.cfg. I don't see why anybody should want to do this, but who knows?

I have tested this version on linux and solaris hosts, with gcc's
directories mounted at weird non-standard mount points, using egcs
(linux/sh-rtemscoff), gcc-2.7.2.2 using native tools (solaris), gcc-2.7.2.3
w/ gnutools (solaris/linux). I don't expect it to break anything, but of
cause I can't promise it. It will break most/all *-posix.cfg configuration
almost for certain, but not more as rtems' current *posix.cfg configurations
already do (hard-coded configurations).

I am not sure if this is ready to be included into the next snapshot or not.
Perhaps you might try this on your systems and if it you don't notice
serious bugs you might put it into the snapshot for public testing (I don't
like this, but I don't see another possiblity to test generality).

I enclose a patch for configure.in and some configuration files which
comprizes fixes for all items mentioned except of #3 . Don't forget to run
"aclocal -I aclocal; autoconf;" after applying the patch (:-).

  • Property mode set to 100644
File size: 7.9 KB
Line 
1#
2#  $Id$
3#
4
51. Autoconf support
6===================
7
8This version of RTEMS is configured with GNU autoconf. RTEMS can be
9configured and built either standalone or together with the compiler
10tools in the Cygnus one-tree structure. Using autoconf also means
11that RTEMS now can be built in a separate build directory.
12
132. Installation
14===============
15
162.1 Standalone build
17
18To configure RTEMS for a specific target, run configure in the build
19directory. In addition to the standard configure options, the following
20RTEMS-specific option are supported:
21
22        --disable-rtems-inlines
23        --disable-posix
24        --disable-tests
25        --disable-ka9q
26        --enable-cxx
27        --enable-gcc28               (also use enable-libcdir when disabled)
28        --enable-gmake-print-directory
29        --enable-libcdir=<DIRECTORY>      (do not use if gcc 2.8 is enabled)
30        --enable-rtemsbsp="bsp1 bsp2 ..."
31
32In addition, the following standard autoconf options are frequently
33used when configuring RTEMS installations:
34
35        --prefix=INSTALL_DIRECTORY
36        --program-prefix=
37
38By default, the RTEMS posix interface is built for targets that support
39it. It can be disabled with the --disable-posix option.
40
41By default, the RTEMS port of the KA9Q TCP/IP stack is build for targets
42that support it.  It can be disabled with the --disable-ka9q option.
43
44By default, the RTEMS support of C++ is disabled.  It can be enabled
45with the --enable-cxx option. If the rtems++ C++ library is installed
46it will also be build.
47
48By default, the RTEMS test suites are configured.  The --disable-tests
49will not configure the RTEMS test suite. This is used only to speed-up
50configuration in case building the tests are not necessary.
51
52By default, RTEMS is built using arguments and build rules which are
53compatible with gcc 2.7.2.2.  This requires that the user specify
54the location of the Standard C Library with the --enable-libcdir
55option.  If using a gcc which supports the -specs option, then
56the --enable-gcc28 option may be used to enable this feature.
57You should use the --enable-gcc28 option when using either the
58egcs source tree, testgcc snapshots, or gcc 2.8.0 or newer.
59
60By default, all bsps for a target are built. There are  two ways of
61changing this:
62
63  + use the --enable-rtemsbsp otion which will set the specified
64    bsps as the default bsps, or
65  + set the RTEMS_BSP variable during make (see below).
66
67The --enable-rtemsbsp= option configures RTEMS for a specific target
68architecture.  The following targets are supported:
69
70        (none)                  will build the host-based version on Linux,
71                                Solaris and HPUX.
72
73        a29k-rtems              only standalone, uses non-gnu compiler
74        i386-rtems
75        i386-go32-rtems         see notes
76        i960-rtems
77        hppa1_1-rtems
78        m68k-rtems
79        mips64orion-rtems
80        no_cpu-rtems
81        powerpc-rtems
82        sparc-rtems
83       
84The cross-compiler is set to $(target)-gcc by default. This can be
85overriden by:
86
87  + using the --program-prefix option to configure to specify the
88    string which will prepended to the tool names.  Be sure to include
89    a trailing "-".  For example, to use a m68k-coff toolset, use the
90    --program-prefix=m68k-coff- option.
91
92To build, run make in the build directory. To specify which bsps to build,
93add the RTEMS_BSP="bsp1 bsp2 .." to the make command.  Specifying multiple
94BSPs to build only works from the top level build directory.
95
96Installation is done under $(prefix)/rtems.
97
98As an example, to build and install the mvme136 and dmv152 bsps for m68k do:
99
100        (path_to_rtems_src)/configure --target=m68k-rtems
101
102        make RTEMS_BSP="mvme136 dmv152"
103       
104        make install RTEMS_BSP="mvme136 dmv152"
105
106The sample tests are built by 'make all', do a 'make test' to build the full
107test suite.
108
1092.2 Build with Cygnus one-tree release
110
111To build and install RTEMS with the one-tree structure, just copy the rtems
112directory to the tree. The one-tree configure.in and Makefile.in has to be
113replaced with the RTEMS-aware versions. The build options are the same as
114for the standalone build.
115
1162.3 Target Dependent Notes
117
118i386-go32-rtems:
119
120  1.  This is based on djgpp v1.xx.  It needs to be updated to v2.xx.
121  2.  This cannot be built one-tree style since RTEMS requires some
122      files which must be obtained from the binary distribution of the
123      djgpp library.  DJGPP can be obtained from
124      http://www.delorie.com/djgpp/dl/ofc.
125  3.  You will need to manually install a number of files from the
126      binary distribution of the DJGPP library doing something
127      like the following:
128
129      # unzip the djgpp distribution
130      cd include
131      cp dpmi.h INSTALL_POINT/lib/gcc-lib/i386-go32-rtems/2.7.2/include
132      cp go32.h INSTALL_POINT/lib/gcc-lib/i386-go32-rtems/2.7.2/include
133      cp dos.h INSTALL_POINT/lib/gcc-lib/i386-go32-rtems/2.7.2/include
134      cp pc.h INSTALL_POINT/lib/gcc-lib/i386-go32-rtems/2.7.2/include
135
136      cd ../lib
137      cp crt* INSTALL_POINT/lib/gcc-lib/i386-go32-rtems/2.7.2
138      cp libpc* INSTALL_POINT/lib/gcc-lib/i386-go32-rtems/2.7.2
139
140      # Make sure about destination on the next lines.  It keeps the newlib
141      # libc.a and the binary djgpp libc.a from conflicting.
142      cp libc.a INSTALL_POINT/lib/gcc-lib/i386-go32-rtems/2.7.2/libcgo32.a
143      cp libc_p.a INSTALL_POINT/lib/gcc-lib/i386-go32-rtems/2.7.2/libcgo32_p.a
144
145
1463. To use the installed RTEMS library
147=====================================
148
149To use the installed RTEMS bsps to build applications, the application
150makefile has to include a bsp-specific makefile that will define the
151RTEMS variables necessary to find include files and libraries. The
152bsp-specific makefile is installed at
153
154        $(RTEMS_MAKEFILE_PATH)/Makefile.inc
155
156For the erc32 bsp installed at /usr/local/cross, the environment
157variable RTEMS_MAKEFILE_PATH would be set as follows to the
158following:
159
160/usr/local/cross/sparc-rtems/rtems/erc32/Makefile.inc
161
1624. Supported target bsps
163========================
164
165The following bsps are supported:
166
167host-based      : posix (on linux, solaris and hpux)
168
169a29k            : portsw
170i386            : force386 i386ex
171i386-go32       : go32 go32_p5
172i960            : cvme961
173hppa1_1         : simhppa
174m68k            : dmv152 efi332 efi68k gen68302 gen68360 gen68360_040 idp
175                  mvme136 mvme147 mvme147s mvme162 ods68302
176no_cpu          : no_bsp
177mips64orion     : p4600 p4650 (p4000 port with either R4600 or R4650)
178powerpc         : papyrus
179sparc           : erc32
180
1815. Makefile structure
182=====================
183
184The makefiles have been re-organised. Most gnu-based bsps now use three
185main makefiles:
186    + custom/default.cfg,
187    + custom/bsp.cfg and
188    + ompilers/gcc-target-default.cfg.
189
190Default.cfg sets the deafult values of certain common build options.
191
192Bsp.cfg set bsp-specific build options and can also override the
193default settings.
194
195Gcc-target-default.cfg contains the common gcc definitions. Some targets
196(a29k, no_cpu, and posix) still use the old structure.
197
1986. Adding a bsp
199===============
200
201The top-level configure.in has to be modified if a new target is added
202or if a new bsp is to be built by default. The additions required is
203basically to add which makefiles are to be created by configure and
204to add the target to the selection statement. To re-generate
205configure, autoconf-2.12 is needed.
206
2077. Tested configurations
208========================
209
210All gnu-based bsps have been built on Linux.
211The native (posix) ports have been built and run only on Linux.
212
213The following configurations have NOT been tested:
214
215    + Anything on Nextstep, HPUX and Irix.
216    + The a29k port.
217
2188. Pre-requisites
219=================
220
221Gawk version 2 or higher.
222GNU make version 3.72 or higher.
223Bash.
224gcc version ???
225
226TODO
227====
228
229The install-if-change script requires bash. On solaris systems, this should
230be changed to ksh, since ksh is provided with solaris (bash not).
231
232A fairly rescent version of gawk is needed to build RTEMS. This should be
233changed so that a plain vanilla awk also works. [NOTE: This dependency
234should disappear when the "gcc 2.8 -specs" is finished.]
235
236'make install' should only install necessary files, not the full
237PROJECT_RELEASE directory as now.
238
239Posix port on solaris-2.5 fails due to undefined built-in functions
240(gcc-2.7.2, might be my installation).
241
242Improve support for 'make CFLAGS=xxx'.
243
Note: See TracBrowser for help on using the repository browser.