summaryrefslogtreecommitdiffstats
path: root/faq.html
diff options
authorJeff Johnston <jjohnstn@redhat.com>2011-06-17 18:54:54 +0000
committerJeff Johnston <jjohnstn@redhat.com>2011-06-17 18:54:54 +0000
commitdd46941ef83ee9cceb2e3261e85a25d9f3e2188d (patch)
tree8ed12ff3084b68fbd158ff90f7e07a80a2aad65e /faq.html
parent2010-12-17 Jeff Johnston <jjohnstn@redhat.com> (diff)
2011-06-17 Jeff Johnston <jjohnstn@redhat.com>
* faq.html: Add some new items.
Diffstat (limited to 'faq.html')
-rw-r--r--faq.html34
1 files changed, 34 insertions, 0 deletions
diff --git a/faq.html b/faq.html
index 533aa5b..f457295 100644
--- a/faq.html
+++ b/faq.html
@@ -13,6 +13,9 @@ cross-compiler that it should, based on the --target setting. What is wrong?</a
13<li><a href="#q5">What does newlib do for chips that have optional features such as 13<li><a href="#q5">What does newlib do for chips that have optional features such as
14endianness or has different models with distinct instruction sets?</a> 14endianness or has different models with distinct instruction sets?</a>
15<li><a href="#q6">What is needed to port newlib to a new platform?</a> 15<li><a href="#q6">What is needed to port newlib to a new platform?</a>
16<li><a href="#q7">How do I regenerate various configuration files?</a>
17<li><a href="#q8">What version of autotools should I use to regenerate files?</a>
18<li><a href="#q9">When and how is newlib released?</a>
16</ul> 19</ul>
17<ol> 20<ol>
18<a name="q1"></a> 21<a name="q1"></a>
@@ -195,6 +198,37 @@ other platform-specific files would need to be ported as well.</p>
195 198
196<a href="#top">back to top</a> 199<a href="#top">back to top</a>
197<p> 200<p>
201<a name="q7"></a>
202<li>How do I regenerate various configuration files?
203<p>There are a few things to understand. First of all, aclocal needs to be run first where ever there is a configure.ac or configure.in file. The aclocal tool creates a set of macros that will be used by the generated configure script. This enables the end-user not to have to install autoconf or automake on their systems to run the configuration. The aclocal tool uses the configure.in or configure.ac files to determine what is needed so you need to run this whenever you change these files. The output of running aclocal is the aclocal.m4 file.</p>
204<p>Now, there is a special macro for newlib called NEWLIB_CONFIGURE. It is defined in the top-level newlib directory in acinclude.m4 and it has common logic such that special newlib configuration variables are handled. This macro should be included in every configure.in or configure.ac file in the newlib tree. Every call to aclocal should use a -I parameter that points to the newlib top-level directory. In addition, there are special m4 files in the top-level src directory that is the parent of newlib. This directory should also be specified via a -I parameter.</p>
205<p>The next thing to run is autoconf in a directory where there is a configure.in or configure.ac file. This generates the configure script for that directory. In general, you don't need to specify any parameters when calling autoconf.</p>
206<p>Finally, there is automake. Automake should be run after autoconf and specify a Makefile parameter for every directory that has a Makefile.am file. The role of automake is to take the Makefile.am file plus the configure script and create a Makefile.in which is the template for the configure script to create the final Makefile during configuration. In newlib, we run automake from the directory that contains a configure script and specify all sub-directories that do not have their own configure script. In addition, a special option is used: --cygnus. This determines special targets that will ultimately end up in the final Makefile. For example, the newlib/libc directory has a number of sub-directories that do not have their own configuration (e.g. string, stdlib, ctype). To generate Makefile.in files for each, we specify: automake --cygnus Makefile string/Makefile stdlib/Makefile ctype/Makefile ...).</p>
207<p>So, when do each of the tools need to be run? If you modify configure.in or configure.ac or the top-level acinclude.m4 file, you must run aclocal, then autoconf, and finally automake for that directory and all sub-directories that do not have their own configure.in/configure.ac. If all you change is Makefile.am, then all you need to run is automake. If you change no configuration input files, then you need not regenerate anything.</p>
208<p>The following shows the steps needed to be run in newlib/libc if one changes the configure.in file found in that directory.<xmp>
209 aclocal -I .. -I../..
210 autoconf
211 automake --cygnus Makefile argz/Makefile ctype/Makefile errno/Makefile \
212 iconv/Makefile locale/Makefile misc/Makefile posix/Makefile reent/Makefile \
213 search/Makefile signal/Makefile stdio/Makefile stdio64/Makefile \
214 stdlib/Makefile string/Makefile syscalls/Makefile time/Makefile \
215 unix/Makefile iconv/ccs/Makefile iconv/ces/Makefile iconv/lib/Makefile \
216 iconv/ccs/binary/Makefile
217</xmp>
218<p>Note how we do not specify the machine or sys sub-directories. This is because they both have their own configure.in files. Also note that we must specify a number of subdirectories of iconv. This is because they have Makefile.am files and the closest configure.in/configure.ac parent file for them is the one found in libc.</p>
219<a href="#top">back to top</a>
220<p>
221<a name="q8"></a>
222<li>What version of autotools should I use for regenerating files?
223<p>Newlib doesn't attempt to be bleeding-edge when it comes to autotool usage. Each snapshot release will be made using a set of autotools felt to be stable. You can determine the versions that were used by looking at the generated files (each documents what level was used). For example, to see the level of autoconf, look inside the configure script you wish to regenerate. To see the level of automake, look inside a Makefile.in file. Using the same version of the tool as was used previously is usually recommended, but you may have more recent tools installed on your system. If you do not have commit rights, you should omit submitting generated files and allow a committer to regenerate them for you. In some cases, committers may start using newer versions of autotools for various changes as we approach the date of a snapshot.</p>
224<p>
225<a href="#top">back to top</a>
226<p>
227<a name="q9"></a>
228<li>When and how is newlib released?
229<p>Newlib currently has a yearly snapshot which is taken in December. The snapshot is taken from the source code repository and tar'd. The tar file is made available here through the newlib web-site: http://sourceware.org/newlib. Newlib does not have a formal test cycle so a snapshot is not necessarily more stable than the current repository contents. Testing does occur as a number of consumers of newlib such as Cygwin and RTEMS do extra testing as time draws nearer to a snapshot. In general, one is advised to try using the source repository as it contains the latest fixes. No fixes are posted to snapshot releases.</p>
230<p>
231<a href="#top">back to top</a>
198</ol> 232</ol>
199</body> 233</body>
200</html> 234</html>