source: rtems/c/src/lib/libbsp/i386/pc386/configure.ac @ 4f0dca3a

5
Last change on this file since 4f0dca3a was 2afb22b, checked in by Chris Johns <chrisj@…>, on 12/23/17 at 07:18:56

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: 5.8 KB
Line 
1## Process this file with autoconf to produce a configure script.
2
3AC_PREREQ([2.69])
4AC_INIT([rtems-c-src-lib-libbsp-i386-pc386],[_RTEMS_VERSION],[https://devel.rtems.org/newticket])
5AC_CONFIG_SRCDIR([make/custom/pc386.cfg])
6RTEMS_TOP(../../../../../..)
7RTEMS_SOURCE_TOP
8RTEMS_BUILD_TOP
9RTEMS_BSP_LINKCMDS
10
11RTEMS_CANONICAL_TARGET_CPU
12AM_INIT_AUTOMAKE([no-define nostdinc foreign 1.12.2])
13RTEMS_BSP_CONFIGURE
14
15RTEMS_PROG_CC_FOR_TARGET
16RTEMS_CANONICALIZE_TOOLS
17RTEMS_CHECK_TOOL(OBJCOPY,objcopy,:)
18RTEMS_PROG_CCAS
19
20RTEMS_CHECK_NETWORKING
21RTEMS_CHECK_SMP
22
23RTEMS_BSPOPTS_SET([BSP_ENABLE_VGA],[*],[1])
24RTEMS_BSPOPTS_HELP([BSP_ENABLE_VGA],
25[Set if the VGA and keyboard console support is enabled.])
26AM_CONDITIONAL(RTEMS_VGA,[test "$BSP_ENABLE_VGA" = "1"])
27
28RTEMS_BSPOPTS_SET([BSP_ENABLE_COM1_COM4],[*],[1])
29RTEMS_BSPOPTS_HELP([BSP_ENABLE_COM1_COM4],
30[Set if COM1..COM4 support is enabled.])
31
32RTEMS_BSPOPTS_SET([BSP_ENABLE_IDE],[*],[1])
33RTEMS_BSPOPTS_HELP([BSP_ENABLE_IDE],
34[Set if IDE support is enabled.])
35AM_CONDITIONAL(HAS_IDE,[test "$BSP_ENABLE_IDE" = "1"])
36
37RTEMS_BSPOPTS_SET([USE_COM1_AS_CONSOLE],[*],[0])
38RTEMS_BSPOPTS_HELP([USE_COM1_AS_CONSOLE],
39[Determines, whether the console will be associated with the standard
40 VGA display or with the COM1 serial port.  Currently only the VGA
41 display and COM1 support printk.])
42
43RTEMS_BSPOPTS_SET([IDE_USE_PRIMARY_INTERFACE],[*],[1])
44RTEMS_BSPOPTS_HELP([IDE_USE_PRIMARY_INTERFACE],
45[Determines, whether RTEMS will try to use the primary IDE interface.
46 Disable it, if:
47 - you have no primary IDE interface
48 - or you have no disk attached to this interface
49 - or you do not want to access disks attached to this interface])
50
51RTEMS_BSPOPTS_SET([IDE_USE_SECONDARY_INTERFACE],[*],[0])
52RTEMS_BSPOPTS_HELP([IDE_USE_SECONDARY_INTERFACE],
53[Determines, whether RTEMS will try to use the secondary IDE interface.
54 Enable it, if:
55 - you have a secondary IDE interface
56 - and you have at least one disk attached to this interface
57 - and you do want to access disks attached to this interface])
58
59RTEMS_BSPOPTS_SET([BSP_VIDEO_80x50],[*],[0])
60RTEMS_BSPOPTS_HELP([BSP_VIDEO_80x50],
61[If defined, set the VGA display to 80x50.])
62
63RTEMS_BSPOPTS_SET([CLOCK_DRIVER_USE_TSC],[*],[0])
64RTEMS_BSPOPTS_HELP([CLOCK_DRIVER_USE_TSC],
65[If enabled, the clock driver will use the TSC register available
66 with Pentium-class CPUs to report close to nanosecond-accuracy
67 clock times.
68 Enable it, if:
69 - you have nanosecond timing enabled (you do NOT have
70   USE_TICKS_FOR_CPU_USAGE_STATISTICS enabled)
71 - you do NOT have CLOCK_DRIVER_USE_8254 enabled (use one, the other,
72   or neither)
73 - you have a Pentium which supports TSC (all Intels, and probably
74   all or most clones)
75 - you do not have a variable-speed CPU clock. Note that some
76   motherboard BIOS will automatically vary clock speed for thermal
77   control. Note also, however, that really new Pentium-class chips
78   from Intel and AMD will maintain a constant-rate TSC regardless.
79])
80
81#define CLOCK_DRIVER_USE_8254 $CLOCK_DRIVER_USE_8254
82RTEMS_BSPOPTS_SET([CLOCK_DRIVER_USE_8254],[*],[0])
83RTEMS_BSPOPTS_HELP([CLOCK_DRIVER_USE_8254],
84[If enabled, the clock driver will use the good old 8254 chip
85 to report microsecond-accuracy clock times.
86 Enable it, if:
87 - you have nanosecond timing enabled (you do NOT have
88   USE_TICKS_FOR_CPU_USAGE_STATISTICS enabled)
89 - you do NOT have CLOCK_DRIVER_USE_TSC enabled (use one, the other,
90   or neither)
91 - you do not mind adding roughly 5 microseconds to each context switch.
92])
93
94if test "${USE_CIRRUS_GD5446}" != "1" -a "${USE_VGA}" != "1"; then
95  USE_VBE_RM=1;
96  if test -z "${NUM_APP_DRV_GDT_DESCRIPTORS}"; then
97      NUM_APP_DRV_GDT_DESCRIPTORS=2 ;
98  else
99      NUM_APP_DRV_GDT_DESCRIPTORS+=2 ;
100  fi
101fi
102RTEMS_BSPOPTS_SET([NUM_APP_DRV_GDT_DESCRIPTORS],[*],[0])
103RTEMS_BSPOPTS_HELP([NUM_APP_DRV_GDT_DESCRIPTORS],
104[Defines how many descriptors in GDT may be allocated for application or
105 driver usage.])
106
107RTEMS_BSPOPTS_SET([USE_CIRRUS_GD5446],[*],[0])
108RTEMS_BSPOPTS_HELP([USE_CIRRUS_GD5446],
109[If defined, enables use of the Cirrus GD5446 controller rather than the
110 controller utilizing Vesa Bios Extensions - real mode interface.
111
112 NOTE: This has only been tested on Qemu.])
113AM_CONDITIONAL(USE_CIRRUS_GD5446,test "$USE_CIRRUS_GD5446" = "1")
114
115RTEMS_BSPOPTS_SET([USE_VGA],[*],[0])
116RTEMS_BSPOPTS_HELP([USE_VGA],
117[If defined, enables use of the very basic VGA driver for framebuffer support
118 rather than the controller utilizing Vesa Bios Extensions - real mode
119 interface.])
120AM_CONDITIONAL(USE_VGA,test "$USE_VGA" = "1")
121
122RTEMS_BSPOPTS_SET([USE_VBE_RM],[*],[0])
123RTEMS_BSPOPTS_HELP([USE_VBE_RM],
124[Defined by default. Enables use of the Vesa Bios Extensions - real mode
125 interface, which enables graphical mode and introduce it upon bootup.])
126AM_CONDITIONAL(USE_VBE_RM,test "$USE_VBE_RM" = "1")
127
128if test X${CLOCK_DRIVER_USE_TSC} = X1 -a X${CLOCK_DRIVER_USE_8254} = X1 ; then
129  AC_MSG_ERROR([pc386 both TSC and 8254 specified for clock driver])
130fi
131
132## The PC386 BSP supports SMP configurations if this is enabled.
133RTEMS_BSPOPTS_SET([BSP_HAS_SMP],[*],[1])
134RTEMS_BSPOPTS_HELP([BSP_HAS_SMP],
135[Always defined when on a pc386 to enable the pc386 support for
136 determining the CPU core number in an SMP configuration.])
137
138RTEMS_BSPOPTS_SET([BSP_GDB_STUB],[*],[1])
139RTEMS_BSPOPTS_HELP([BSP_GDB_STUB],
140[Defined by default. Enables use of the GDB stub for debugging via a
141 serial port.])
142AM_CONDITIONAL(BSP_GDB_STUB, test "$BSP_GDB_STUB" = "1")
143
144## if this is an i386, does gas have good code16 support?
145RTEMS_I386_GAS_CODE16
146AM_CONDITIONAL(RTEMS_GAS_CODE16,[test "$RTEMS_GAS_CODE16" = "yes"])
147
148AM_CONDITIONAL(HAS_NETWORKING,[test "$HAS_NETWORKING" = "yes"])
149AM_CONDITIONAL(HAS_SMP,[test "$rtems_cv_HAS_SMP" = "yes"])
150
151AC_SUBST([RTEMS_ROOT],[${rtems_updir}'$(top_builddir)'])
152
153RTEMS_CONFIG_BUILD_SUBDIRS(tools)
154
155AC_SUBST(RTEMS_BSP)
156
157RTEMS_BSP_CLEANUP_OPTIONS
158
159# Explicitly list all Makefiles here
160AC_CONFIG_FILES([Makefile])
161AC_OUTPUT
Note: See TracBrowser for help on using the repository browser.