Services and Modeling for Embedded Software Development
Embecosm divider strip
Prev  Next

4.1.3.  Updating the Target Specific Machine Directory Configuration files

configure.in and Makefile.am files also be needed for the target specific directory (i.e. libc/machine/target within the newlib directory). These are generally quite standard, and the easiest approach is to copy the versions used for the fr30 architecture. Modern practice is to use the file name configure.ac rather than configure.in, but either will be accepted by autoconf.

Makefile.am should be modified if necessary to specify the source files (for example setjmp.S and longjmp.S). More complex implementations may require modifications to configure.in as well.

For example the OpenRISC 1000  machine directory (libc/machine/or32 within the newlib directory) contains the following.

AUTOMAKE_OPTIONS = cygnus

INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)

AM_CCASFLAGS = $(INCLUDES)

noinst_LIBRARIES = lib.a

lib_a_SOURCES = longjmp.S setjmp.S
lib_a_CCASFLAGS=$(AM_CCASFLAGS)
lib_a_CFLAGS=$(AM_CFLAGS)

ACLOCAL_AMFLAGS = -I ../../.. -I ../../../..
CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
	  

After any changes it will be necessary to run autoconf and/or automake to generate new versions of configure and Makefile.in. autoconf requires a number of newlib specific macros. These can be generated from the main newlib include file (acinclude.m4) by running aclocal. The full set of commands would be.

aclocal -I ../../..
autoconf
automake --cygnus Makefile
	  

aclocal only need to be run the first time the directory is created, or when moving the directory to a new release of newlib. autoconf need only be run each time configure.in (or configure.ac) is changed. automake need only be run each time Makefile.am is changed.

Embecosm divider strip