Support cross-compilation

While this component is stored in pre-compiled form, we need the header
filenames to be converted to postfix-extension form during the export phase
so that compilers and other code analysis tools will find them. Because this
is a somewhat unusual component, this is achieved with a custom makefile for
cross-compilation use. Support is also included for converting the object
files to ELF format when exporting, if `${TOOLCHAIN}` is `GNU`.

Enable GitLab CI (native `Makefile` given partial GNU make compatibility to
facilite some of the CI jobs, and as a side-effect will enable correct syntax
colouring in GitLab).

`NOT_USED` macro refactored to avoid `cppcheck` warnings in clients. It now
evaluates its argument only once, so is more function-lilke, but sadly has
to remain a compound statement because a few components use it without a
trailing semicolon.
2 jobs for !2 with CrossCompilationSupport in 3 seconds (queued for 3 seconds)
latest detached
Status Job ID Name Coverage
  Static Analysis
failed #22386
cross allowed to fail
merge_log

00:00:01

failed #22387
cross allowed to fail
merge_whitesp

00:00:01

 
Name Stage Failure
failed
merge_whitesp Static Analysis
Makefile line 244 only removes whitespace error
Makefile line 245 only removes whitespace error
Makefile line 246 only removes whitespace error
Makefile line 247 only removes whitespace error
Makefile line 248 only removes whitespace error
Makefile line 249 only removes whitespace error
Makefile line 252 only removes whitespace error
Cleaning up file based variables
ERROR: Job failed: exit status 1
failed
merge_log Static Analysis
Skipping Git submodules setup
Executing "step_script" stage of the job script
$ git remote show | grep target > /dev/null && git remote remove target || true; git remote add -t $CI_MERGE_REQUEST_TARGET_BRANCH_NAME -f target $CI_MERGE_REQUEST_PROJECT_URL.git; has_versionnum=1; custom_versionnum=0; if test -f VersionNum; then grep -q "This file is automatically maintained by srccommit, do not edit manually." VersionNum || custom_versionnum=1; else has_versionnum=0; fi; h=$(git rev-parse HEAD); for r in $(git rev-list --reverse $(git merge-base HEAD target/$CI_MERGE_REQUEST_TARGET_BRANCH_NAME)..HEAD); do git log -1 --pretty=format:%B $r | awk ' BEGIN { keywords=0; nochange=0; notag=0; tag=""; printf("\033[91m") } /!NoChange|!NoTag|!Tag\([^)]+\)/ { ++keywords } /!NoChange/ { if ("'$r'"=="'$h'") nochange=1; else { print "Commit '$r' is not tip of merge request and uses !NoChange keyword in log"; result=1 } } /!NoTag/ { if ("'$r'"=="'$h'") notag=1; else { print "Commit '$r' is not tip of merge request and uses !NoTag keyword in log"; result=1 } } /!Tag\([^)]+\)/ { if ("'$r'"=="'$h'") tag=gensub(/^.*!Tag\(([^)]+)\).*$/, "\\1", "g"); else { print "Commit '$r' is not tip of merge request and uses !Tag keyword in log"; result=1 } } NR==1 && length($0)>70 { print "Commit '$r' log summary line exceeds 70 characters"; result=1 } NR==2 && length($0)>0 { print "Commit '$r' log requires a single-line summary followed by a blank line"; result=1 } NR>=2 && length($0)>80 { print "Commit '$r' log line "NR" exceeds 80 characters"; result=1 } END { if (keywords > 1) { print "Commit '$r' uses multiple keywords in log"; result = 1 } if ("'$r'"=="'$h'") { if (!'$has_versionnum' && tag=="") { print "Either create a VersionNum file or use !Tag keyword in log"; result=1 } if ('$custom_versionnum' && tag=="" && notag==0) { print "Non-standard VersionNum file requires either !Tag or !NoTag keyword in log"; result=1 } if (tag!="") { if ('$has_versionnum' && !'$custom_versionnum') { print "!Tag keyword must not be used with standard VersionNum file"; result=1 } if (system("git check-ref-format \"tags/" tag "\"")) { print "Invalid tag name"; result = 1 } else if (!system("git ls-remote --exit-code --tags target " tag " > /dev/null")) { print "Tag already exists in destination repository"; result=1 } } printf("\033[39m") } exit result; }'; done
Updating target
From https://gitlab.riscosopen.org/RiscOS/Sources/Lib/OSLib
* [new branch] master -> target/master
Non-standard VersionNum file requires either !Tag or !NoTag keyword in log
Cleaning up file based variables
ERROR: Job failed: exit status 1