Commit 8ce08241 authored by Ben Avison's avatar Ben Avison
Browse files

Enable GitLab CI/CD

Detail:
* Enable GitLab CI
* Address issues identified by CI jobs, excluding those related to cppcheck
* Enable GitLab CD for stubs (used implicitly when linker is invoked by cc)
parent a73b64b5
Pipeline #5468 passed with stages
in 37 seconds
variables:
COPYRIGHT_WHITELIST: "./rlib/h/README"
WHITESPACE_WHITELIST: "./Doc/fwrite ./test/!TboxCalc/Makefile ./BlackLog"
SUPPRESS_JOBS: "cppcheck softload_gnu"
include:
- project: 'Support/CI'
file: '/RISC_OSLib.yml'
deploy_to_runner:
stage: deploy
only:
refs: [ master ]
tags: [ cross ]
script:
# Depending on whether the pipeline is launched by the merge request or
# manually, VersionNum may or may not have been updated. Switch to the
# tip of master to ensure consistency.
- git checkout origin/master
- 'curl --location --output ~/cache/common/BuildHost.zip -z ~/cache/common/BuildHost.zip "https://gitlab.riscosopen.org/Products/BuildHost/-/jobs/artifacts/master/download?job=latest_package_tree"'
- unzip -q ~/cache/common/BuildHost.zip
- source RiscOS/Env/ROOL/BuildHost.sh
- COMPONENT=SharedCLibrary mk all_libs
# Upload binary
- chmod 400 $SSH_PRIVATE_KEY
- rsync -avc -e "ssh -i $SSH_PRIVATE_KEY" --chown rool:rool --chmod=644 objs/stubs.a root@localhost:/opt/rool/lib/
...@@ -1328,7 +1328,7 @@ extern void *aligned_alloc(size_t align, size_t size) ...@@ -1328,7 +1328,7 @@ extern void *aligned_alloc(size_t align, size_t size)
return (e != NULL) ? NULL : ptr; return (e != NULL) ? NULL : ptr;
} else { /* overallocate to ensure alignment, then return the subset */ } else { /* overallocate to ensure alignment, then return the subset */
if (align < sizeof(RMABlock)) align = sizeof(RMABlock); if (align < sizeof(RMABlock)) align = sizeof(RMABlock);
oversize = size + align - 1 + sizeof(RMABlock); oversize = size + align - 1 + sizeof(RMABlock);
ptr = _kernel_RMAalloc(oversize); ptr = _kernel_RMAalloc(oversize);
if (ptr != NULL) { if (ptr != NULL) {
RMABlock *bp; RMABlock *bp;
...@@ -1357,7 +1357,7 @@ extern void *aligned_alloc(size_t align, size_t size) ...@@ -1357,7 +1357,7 @@ extern void *aligned_alloc(size_t align, size_t size)
_alloc_die(_kernel_getmessage("malloc failed", "C12"), CORRUPT); _alloc_die(_kernel_getmessage("malloc failed", "C12"), CORRUPT);
else return NULL; else return NULL;
} else { } else {
BlockP keepBlock, tempBlock; BlockP keepBlock, tempBlock;
uintptr_t user = (uintptr_t)ptr; uintptr_t user = (uintptr_t)ptr;
user = (user + (align - 1)) & ~(align - 1); /* aligned as the user wished */ user = (user + (align - 1)) & ~(align - 1); /* aligned as the user wished */
user += excess; /* doubly aligned to ensure excess */ user += excess; /* doubly aligned to ensure excess */
......
...@@ -727,7 +727,7 @@ static FILE *freopen_common(const char *name, const char *mode, FILE *iob, int f ...@@ -727,7 +727,7 @@ static FILE *freopen_common(const char *name, const char *mode, FILE *iob, int f
case 'b': flag |= _IOBIN, openmode |= OPEN_B; case 'b': flag |= _IOBIN, openmode |= OPEN_B;
continue; continue;
case 'x': if (*mode != '\0' || /* must be last and writing */ case 'x': if (*mode != '\0' || /* must be last and writing */
!(openmode & OPEN_W)) return NULL; !(openmode & OPEN_W)) return NULL;
openmode |= OPEN_X; break; openmode |= OPEN_X; break;
} }
break; break;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment