Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin
Warning

This is an unapproved draft. It is currently in progress and under review.

Include Page
StyleSheet
StyleSheet

7.1 Introduction

rce modules and binary objects for host systems are compiled and linked with the gnu compiler and binutils collections. The build tool is gmake.

This chapter covers:

...

A set of repository-level makefiles allows gmake to be invoked at the top level to build all packages and projects locally, or build a full release of rce software. A set of makefile templates is used to clone new projects and packages. See Figure 4.

Image Modified

Building all projects at once is the exception. Typically, development iterations involve building and re-building individual packages and constituents. Figure 5 depicts the makefiles relevant to package and constituent builds.

Hierarchy of package- and constituent-level makefilesImage Added

Makefile search path

Under construction
[ Note: How "export library symbols...just like symbols in module sources."]
Inter-package and inter-project dependencies
Must be handled manually
If A depends on B, build B first
Order of projects in projects.mk
Order of packages in packages.mk
Library search order
When linking each library is searched once
In lists of libraries put the lower-level libs first
The search order will be the reverse of that listed

Build product hierarchy

TBW.

Directory structure for rce build productsImage Added

Anchor
globals
globals

7.4 Global make variables

-Under construction-

The repository-level makefiles define a set of global make variables that can be useful to cite in package- and constituent-level makefiles, and which set compiler options for various targets.

...

Rule

Description

Example

modsneeded_<modname>

Used to record any indirect dependencies the client module may have on other modules at run time, which the dynamic linker cannot infer.
Specify the project and soname of the required module(s). Wildcards are not allowed; the dynamic linker will insist on the specified module. Compatibility requirements can be relaxed by including an rce_isCompatible function in the client module, per Chapter X.

modsneeded_transport := \
rceusr/output.2.1.prod \
rce/core.1.1.test
*Is core under rce project?

Wiki Markup
{span:class=steve}Is core under rce project?{span}

modincs_<modname>

Header file include directories for headers inside the RCE release tree.

modincs_transport := \
rce/ethernet\
rce/fci

modsinc_<modname>

Header file include directories for headers outside the RCE release tree.
Full system pathname required.

modsinc_transport :\
/usr/include/net

...

7.6 Packages and project makefiles

Under construction

This section describes the most common make rules and option flags for packages.mk and project.mk. See Chapter Z for definitions of all options.

...

Code Block
ppc-linux
ppc-rtems-rce405
ppc-rtems-ml405
i386-linux
x86_64-linux
sparc-solaris

Make actions

If a rule is not specified, then what is built?

Wiki Markup
{span:class=steve}Steve: If an action is not specified, then what is built?{span}

Make action Make rule

Description

all

Build 'bin' and user-defined

dir

Create build directories, but do not build.

obj

Compile sources

lib

Build libraries from object files

bin

Build libraries, executables and modules

clean

Remove all built products

cleanall

Same as 'clean', but removes some tmp directories as well

print

List what is built and where it goes

...

-shared and -nostdlib
as for g++.
-z combreloc
Makes sure that all relocation table entries go into a single contiguous sub-region of the shared object, even if by mischance they end up in more than one output section. This option also causes the linker to sort the entries so that those reference the same symbol occur together. This allows the dynamic linker to use a one-entry symbol lookup cache.
-T scriptname
Use the custom linker script.
-Map filename
to make a link map.
-soname modulename.major.minor.branch
to set the soname field to the module's name with version numbers and development branch appended.
*-o modulename.major.minor.branch.so *
Module filename.
-fhash-style=sysv
to suppress generation of a GNU-style hash table.

Each module that the one being constructed depends on should be named on the linker command line so that each of their sonames will be recorded in a DT_NEEDED entry in the elf dynamic section. This defines a minimum set of compatbility requirements; compatibility requirements can be expanded by implementing an rce_isCompatible function, as described in Chapter Y.

Wiki Markup
{span:class=steve}Steve: Can set rce core comaptibility here? Is this optional, only for cases where the dependency is not direct? Won't dynalink try to resolve?{span}