Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision Next revisionBoth sides next revision | ||
internal:abi [2016/10/30 17:37] – created tema | internal:abi [2016/11/14 14:48] – sbs | ||
---|---|---|---|
Line 2: | Line 2: | ||
===== Concept separation ===== | ===== Concept separation ===== | ||
+ | '' | ||
==== First level ==== | ==== First level ==== | ||
Line 51: | Line 52: | ||
* on SBIs without the PHM API, both '' | * on SBIs without the PHM API, both '' | ||
* on SBIs with the PHM API, '' | * on SBIs with the PHM API, '' | ||
+ | |||
+ | |||
+ | ===== Naming ===== | ||
+ | |||
+ | On one filesystem root, there may be one or more host environments (multiple binary installs of the same version of sac2c). So we identify the host environment like everyone else does, using a canonical specifier string. | ||
+ | |||
+ | We can have multiple versions. | ||
+ | |||
+ | So we adopt the naming scheme used by '' | ||
+ | < | ||
+ | $prefix | ||
+ | `--- bin | ||
+ | | | ||
+ | `--- share | ||
+ | | `------ doc | ||
+ | | | `---- sac2c | ||
+ | | `------ man | ||
+ | | | `---- man1 | ||
+ | | | `----- sac2c.1 | ||
+ | | `------ sac2c | ||
+ | | `---- VERSION1 | ||
+ | | | ||
+ | | `---- VERSION2 | ||
+ | | | ||
+ | | `---- ... | ||
+ | `--- lib / sac2c / VERSION / modlibs | ||
+ | | `------ target-env1 | ||
+ | | | | ||
+ | | | | ||
+ | | | | ||
+ | | | | ||
+ | | | | ||
+ | | | | ||
+ | | | | ||
+ | | | | ||
+ | | | | ||
+ | | | | ||
+ | | | | ||
+ | | | | ||
+ | | | `--------- libScalarArithMod.so | ||
+ | | `------ target-env2 | ||
+ | | `------ ... | ||
+ | `--- lib / sac2c / VERSION / rt | ||
+ | | `------ target-env1 | ||
+ | | | | ||
+ | | | | ||
+ | | | | ||
+ | | | | ||
+ | | | | ||
+ | | | | ||
+ | | | | ||
+ | | | | ||
+ | | | | ||
+ | | | | ||
+ | | | | ||
+ | | `------ target-env2 | ||
+ | | `------ ... | ||
+ | | | ||
+ | `--- libexec / sac2c / VERSION / | ||
+ | `----- sac2c | ||
+ | `----- sac2c-d | ||
+ | `----- sac2c-p | ||
+ | `----- tree | ||
+ | `--- target-env1 | ||
+ | | ||
+ | | ||
+ | `--- target-env2 | ||
+ | `----- libFibreIOTree.so | ||
+ | `----- ... | ||
+ | </ | ||
+ | |||
+ | ==== Notes ==== | ||
+ | |||
+ | We want to support installing with '' | ||
+ | |||
+ | |||
+ | ===== Search ===== | ||
+ | |||
+ | < | ||
+ | === Alert! === | ||
+ | |||
+ | Needs re-writing by Hans or Artem! | ||
+ | |||
+ | </ | ||
+ | We distinguish between: | ||
+ | |||
+ | - //default// path(s): the directories populated during installation, | ||
+ | - //custom// paths(s): the directories written to by '' | ||
+ | |||
+ | At invocation time, a search path must be decided: | ||
+ | |||
+ | - the search path starts with '' | ||
+ | - if a '' | ||
+ | - '' | ||
+ | - the decided path is written to '' | ||
+ | - '' | ||
+ | - If the user specifies (on the command line) an additional prefix, prepend that to the search path. | ||
+ | - Prepend the directory of -o to the search path. | ||
+ | |||
+ | At invocation time, a output path must be decided: | ||
+ | |||
+ | - if '' | ||
+ | - if '' | ||
+ | - if '' | ||
+ | - the output path is initialized to '' | ||
+ | - if a '' | ||
+ | - '' | ||
+ | - the decided path is written to '' | ||
+ | - '' | ||
+ | |||
+ | ==== Notes ==== | ||
+ | |||
+ | All this is for modules. If we encounter something that is not a module, then -install is not valid. Moreover, if '' | ||
+ | |||
+ | |||
+ | ===== Configuration - sac2crc ===== | ||
+ | |||
+ | We want to reuse the existing " | ||
+ | |||
+ | * inheritance | ||
+ | * flexibility: | ||
+ | |||
+ | ==== To identify configuration sections for environment / SBI / variants ==== | ||
+ | |||
+ | |||
+ | We do this by adding new resources: | ||
+ | |||
+ | * '' | ||
+ | * '' | ||
+ | |||
+ | We also eliminate '' | ||
+ | |||
+ | ==== Structuring sac2crc ==== | ||
+ | |||
+ | The power of the target mechanism at the same time is its weakness. In order to avoid complete chaos we informally distinguish between 3 different types of targets: | ||
+ | |||
+ | - basic targets that define a combination of TARGET_ENV and basis-SBI. For example, we have:< | ||
+ | target default_sbi: | ||
+ | TARGET_ENV | ||
+ | SBI := " | ||
+ | MT_MODE | ||
+ | BACKEND | ||
+ | RC_METHOD | ||
+ | ... | ||
+ | |||
+ | target default_mt :: default_sbi: | ||
+ | SBI := " | ||
+ | MT_MODE | ||
+ | USE_PHM_API | ||
+ | |||
+ | target omp :: default_sbi: | ||
+ | SBI := " | ||
+ | BACKEND | ||
+ | MT_MODE | ||
+ | MT_LIB | ||
+ | CFLAGS | ||
+ | LDFLAGS | ||
+ | </ | ||
+ | - modifier targets that define properties or variants that are mainly orthorgonal to the basic targets. These targets do not inherit from any basic targets. Examples are: < | ||
+ | target add_pth: | ||
+ | LIBS | ||
+ | CFLAGS | ||
+ | SBI += " | ||
+ | MT_LIB | ||
+ | |||
+ | target add_lpel: | ||
+ | SBI += " | ||
+ | MT_LIB | ||
+ | CFLAGS | ||
+ | LIBS : | ||
+ | RC_METHOD | ||
+ | |||
+ | |||
+ | target add_rt: | ||
+ | SBI += " | ||
+ | RTSPEC | ||
+ | </ | ||
+ | - pre-defined final targets that are often-used combinations of one basic target with a set of modifier targets. These should be defined by means of inheritance only. Examples are: < | ||
+ | target seq :: default_sbi: | ||
+ | |||
+ | target mt_pth :: default_mt :: add_pth: | ||
+ | |||
+ | target mt_pth_rt :: mt_pth :: add_rt: | ||
+ | |||
+ | target mt_lpel :: default_mt :: add_lpel: | ||
+ | </ | ||
+ | |||
+ | For better maintainability of the developer version, the monolithic '' | ||