source: rtems/cpukit/score/cpu/sh/include/rtems/asm.h @ 2afb22b

5
Last change on this file since 2afb22b was 2afb22b, checked in by Chris Johns <chrisj@…>, on Dec 23, 2017 at 7:18:56 AM

Remove make preinstall

A speciality of the RTEMS build system was the make preinstall step. It
copied header files from arbitrary locations into the build tree. The
header files were included via the -Bsome/build/tree/path GCC command
line option.

This has at least seven problems:

  • The make preinstall step itself needs time and disk space.
  • Errors in header files show up in the build tree copy. This makes it hard for editors to open the right file to fix the error.
  • There is no clear relationship between source and build tree header files. This makes an audit of the build process difficult.
  • The visibility of all header files in the build tree makes it difficult to enforce API barriers. For example it is discouraged to use BSP-specifics in the cpukit.
  • An introduction of a new build system is difficult.
  • Include paths specified by the -B option are system headers. This may suppress warnings.
  • The parallel build had sporadic failures on some hosts.

This patch removes the make preinstall step. All installed header
files are moved to dedicated include directories in the source tree.
Let @RTEMS_CPU@ be the target architecture, e.g. arm, powerpc, sparc,
etc. Let @RTEMS_BSP_FAMILIY@ be a BSP family base directory, e.g.
erc32, imx, qoriq, etc.

The new cpukit include directories are:

  • cpukit/include
  • cpukit/score/cpu/@RTEMS_CPU@/include
  • cpukit/libnetworking

The new BSP include directories are:

  • bsps/include
  • bsps/@RTEMS_CPU@/include
  • bsps/@RTEMS_CPU@/@RTEMS_BSP_FAMILIY@/include

There are build tree include directories for generated files.

The include directory order favours the most general header file, e.g.
it is not possible to override general header files via the include path
order.

The "bootstrap -p" option was removed. The new "bootstrap -H" option
should be used to regenerate the "headers.am" files.

Update #3254.

  • Property mode set to 100644
File size: 3.2 KB
Line 
1/**
2 * @file
3 *
4 * @brief Address the Problems Caused by Incompatible Flavor of
5 * Assemblers and Toolsets
6 *
7 * This include file attempts to address the problems
8 * caused by incompatible flavors of assemblers and
9 * toolsets.  It primarily addresses variations in the
10 * use of leading underscores on symbols and the requirement
11 * that register names be preceded by a %.
12 *
13 * @note The spacing in the use of these macros
14 *       is critical to them working as advertised.
15 */
16
17/*
18 *  Authors: Ralf Corsepius (corsepiu@faw.uni-ulm.de) and
19 *           Bernd Becker (becker@faw.uni-ulm.de)
20 *
21 *  COPYRIGHT:
22 *
23 *  This file is based on similar code found in newlib available
24 *  from ftp.cygnus.com.  The file which was used had no copyright
25 *  notice.  This file is freely distributable as long as the source
26 *  of the file is noted.  This file is:
27 *
28 *
29 *  COPYRIGHT (c) 1997-1998, FAW Ulm, Germany
30 *
31 *  This program is distributed in the hope that it will be useful,
32 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
33 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34 *
35 *
36 *  COPYRIGHT (c) 1998-2001.
37 *  On-Line Applications Research Corporation (OAR).
38 *
39 *  The license and distribution terms for this file may be
40 *  found in the file LICENSE in this distribution or at
41 *  http://www.rtems.org/license/LICENSE.
42 */
43
44#ifndef _RTEMS_ASM_H
45#define _RTEMS_ASM_H
46
47/*
48 *  Indicate we are in an assembly file and get the basic CPU definitions.
49 */
50
51#ifndef ASM
52#define ASM
53#endif
54
55#include <rtems/score/cpuopts.h>
56#include <rtems/score/sh.h>
57
58/*
59 *  Recent versions of GNU cpp define variables which indicate the
60 *  need for underscores and percents.  If not using GNU cpp or
61 *  the version does not support this, then you will obviously
62 *  have to define these as appropriate.
63 */
64
65#ifndef __USER_LABEL_PREFIX__
66#define __USER_LABEL_PREFIX__ _
67#endif
68
69#ifndef __REGISTER_PREFIX__
70#define __REGISTER_PREFIX__
71#endif
72
73#include <rtems/concat.h>
74
75/* Use the right prefix for global labels.  */
76
77#define SYM(x) CONCAT1 (__USER_LABEL_PREFIX__, x)
78
79/* Use the right prefix for registers.  */
80
81#define REG(x) CONCAT1 (__REGISTER_PREFIX__, x)
82
83/*
84 *  define macros for all of the registers on this CPU
85 *
86 *  EXAMPLE:     #define d0 REG (d0)
87 */
88#define r0 REG (r0)
89#define r1 REG (r1)
90#define r2 REG (r2)
91#define r3 REG (r3)
92#define r4 REG (r4)
93#define r5 REG (r5)
94#define r6 REG (r6)
95#define r7 REG (r7)
96#define r8 REG (r8)
97#define r9 REG (r9)
98#define r10 REG (r10)
99#define r11 REG (r11)
100#define r12 REG (r12)
101#define r13 REG (r13)
102#define r14 REG (r14)
103#define r15 REG (r15)
104#define vbr REG (vbr)
105#define gbr REG (gbr)
106#define pr REG (pr)
107#define mach REG (mach)
108#define macl REG (macl)
109#define sr REG (sr)
110#define pc REG (pc)
111
112/*
113 *  Define macros to handle section beginning and ends.
114 */
115
116
117#define BEGIN_CODE_DCL .text
118#define END_CODE_DCL
119#define BEGIN_DATA_DCL .data
120#define END_DATA_DCL
121#define BEGIN_CODE .text
122#define END_CODE
123#define BEGIN_DATA
124#define END_DATA
125#define BEGIN_BSS
126#define END_BSS
127#define END
128
129/*
130 *  Following must be tailor for a particular flavor of the C compiler.
131 *  They may need to put underscores in front of the symbols.
132 */
133
134#define PUBLIC(sym) .global SYM (sym)
135#define EXTERN(sym) .global SYM (sym)
136
137#endif
Note: See TracBrowser for help on using the repository browser.