Changeset 2afb22b in rtems for c/src/lib/libbsp/i386


Ignore:
Timestamp:
Dec 23, 2017, 7:18:56 AM (2 years ago)
Author:
Chris Johns <chrisj@…>
Branches:
master
Children:
d8de6b9
Parents:
9704efb4
git-author:
Chris Johns <chrisj@…> (12/23/17 07:18:56)
git-committer:
Sebastian Huber <sebastian.huber@…> (01/25/18 07:45:26)
Message:

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.

Location:
c/src/lib/libbsp/i386
Files:
1 deleted
5 edited
1 moved

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/i386/Makefile.am

    r9704efb4 r2afb22b  
    2828include $(top_srcdir)/../../../automake/subdirs.am
    2929include $(top_srcdir)/../../../automake/local.am
     30include $(srcdir)/../../../../../bsps/i386/headers.am
  • c/src/lib/libbsp/i386/configure.ac

    r9704efb4 r2afb22b  
    55AC_CONFIG_SRCDIR([pc386])
    66RTEMS_TOP(../../../../..)
     7RTEMS_SOURCE_TOP
     8RTEMS_BUILD_TOP
    79
    810RTEMS_CANONICAL_TARGET_CPU
  • c/src/lib/libbsp/i386/pc386/Makefile.am

    r9704efb4 r2afb22b  
    1313include $(top_srcdir)/../../bsp.am
    1414
    15 include_bspdir = $(includedir)/bsp
    16 
    17 dist_project_lib_DATA = bsp_specs
    18 
    19 include_HEADERS = include/bsp.h
    20 include_HEADERS += include/tm27.h
    21 
    22 nodist_include_HEADERS = include/bspopts.h
    23 nodist_include_bsp_HEADERS = ../../shared/include/bootcard.h
     15dist_project_lib_DATA = startup/bsp_specs
     16
    2417DISTCLEANFILES = include/bspopts.h
    2518
     
    2821_SUBDIRS = . tools
    2922
    30 nodist_include_bsp_HEADERS += include/bspimpl.h
    31 include_bsp_HEADERS  = ../../i386/shared/irq/irq.h
    32 include_bsp_HEADERS += ../../i386/shared/irq/irq_asm.h
    33 include_bsp_HEADERS += ../../i386/shared/comm/tty_drv.h
    34 include_bsp_HEADERS += ../../i386/shared/realmode_int/realmode_int.h
    35 include_bsp_HEADERS += ../../shared/include/irq-generic.h
    36 include_bsp_HEADERS += ../../shared/include/irq-info.h
    37 include_bsp_HEADERS += console/rtd316.h
    38 include_bsp_HEADERS += console/exar17d15x.h
    39 include_bsp_HEADERS += include/tblsizes.h
    40 
    41 if HAS_SMP
    42 include_bsp_HEADERS += ../../i386/shared/irq/apic.h
    43 include_bsp_HEADERS += ../../i386/shared/smp/smp-imps.h
    44 endif
    45 
    46 include_HEADERS += include/crt.h
     23TMPINSTALL_FILES =
    4724
    4825EXTRA_DIST += start/start.S
     
    6441CLEANFILES += start16.bin
    6542
     43$(PROJECT_LIB)/start16.bin: start16.bin $(PROJECT_LIB)/$(dirstamp)
     44        $(INSTALL_DATA) $< $(PROJECT_LIB)/start16.bin
     45TMPINSTALL_FILES += $(PROJECT_LIB)/start16.bin
     46
    6647project_lib_DATA += start16.bin
    6748
    68 dist_project_lib_DATA += startup/linkcmds
     49project_lib_DATA += linkcmds
    6950
    7051noinst_LIBRARIES = libbsp.a
     
    7758libbsp_a_SOURCES += ../../shared/tod.c
    7859
    79 include_rtemsdir = $(includedir)/rtems
    80 include_rtems_HEADERS  =
    81 
    8260if RTEMS_VGA
    83 include_rtems_HEADERS += console/keyboard.h
    84 include_rtems_HEADERS += console/kd.h
    85 include_rtems_HEADERS += console/ps2_drv.h
    86 include_rtems_HEADERS += console/vgacons.h
    8761libbsp_a_SOURCES += console/inch.c
    8862libbsp_a_SOURCES += console/outch.c
     
    9670libbsp_a_SOURCES += console/kbd_parser.c
    9771libbsp_a_SOURCES += console/vgacons.c
    98 include_bsp_HEADERS += console/fb_default_mode.h
    9972if USE_VGA
    10073libbsp_a_SOURCES += console/fb_vga.c
     
    10477endif
    10578if USE_VBE_RM
    106 include_bsp_HEADERS += include/vbe3.h
    107 include_HEADERS += include/edid.h
    108 include_bsp_HEADERS += include/fb_vesa.h
    10979libbsp_a_SOURCES += console/fb_vesa_rm.c
    11080endif
     
    11282
    11383# console (non-graphics support)
    114 include_HEADERS += ../../i386/shared/comm/i386_io.h
    11584libbsp_a_SOURCES += console/serial_mouse_config.c
    11685libbsp_a_SOURCES += ../../i386/shared/comm/uart.c
     
    143112libbsp_a_SOURCES += ../../shared/pci/pci_find_device.c
    144113
    145 include_HEADERS += ../../i386/shared/comm/uart.h
    146114# startup
    147115libbsp_a_SOURCES += ../../shared/bsppredriverhook.c
     
    247215EXTRA_DIST += times_p5
    248216
    249 include $(srcdir)/preinstall.am
    250217include $(top_srcdir)/../../../../automake/local.am
    251218include $(top_srcdir)/../../../../automake/subdirs.am
     219include $(srcdir)/../../../../../../bsps/i386/pc386/headers.am
  • c/src/lib/libbsp/i386/pc386/configure.ac

    r9704efb4 r2afb22b  
    55AC_CONFIG_SRCDIR([make/custom/pc386.cfg])
    66RTEMS_TOP(../../../../../..)
     7RTEMS_SOURCE_TOP
     8RTEMS_BUILD_TOP
     9RTEMS_BSP_LINKCMDS
    710
    811RTEMS_CANONICAL_TARGET_CPU
  • c/src/lib/libbsp/i386/pc386/tools/configure.ac

    r9704efb4 r2afb22b  
    55AC_CONFIG_SRCDIR([Spec.doc])
    66RTEMS_TOP(../../../../../../..)
     7RTEMS_SOURCE_TOP
     8RTEMS_BUILD_TOP
    79
    810CFLAGS="-g -O2 -Wall"
Note: See TracChangeset for help on using the changeset viewer.