harbor run -t LiteCoder/build-multiarch-static-gmpharbor download LiteCoder/build-multiarch-static-gmpBuild GMP 6.3.0 from source for x86_64 (native) and aarch64 (cross-compiled) into static, position-independent archives with aggressive optimization and hardening flags. Produce a structured JSON test report and a final distribution tarball.
/appCreate the following directory structure before building:
/app/builds/x86_64/src/
/app/builds/x86_64/build/
/app/builds/x86_64/dist/
/app/builds/aarch64/src/
/app/builds/aarch64/build/
/app/builds/aarch64/dist/
Each architecture's GMP source should be extracted into its respective src/ directory, configured and built in build/, and installed into dist/.
x86_64 (native) build:
--enable-fat for multi-microarchitecture support--disable-shared --enable-static)-fPIC, -O2, -fstack-protector-strong, -D_FORTIFY_SOURCE=2/app/builds/x86_64/distaarch64 (cross-compiled) build:
aarch64-linux-gnu-gcc as the cross compileraarch64-linux-gnu--disable-shared --enable-static)-fPIC, -O2, -mtune=cortex-a72, -fstack-protector-strong, -D_FORTIFY_SOURCE=2/app/builds/aarch64/distmake check for the x86_64 build and capture the full console output to /app/builds/x86_64/test.logmake check if QEMU user-mode emulation is available; otherwise skip and note it in the report. Save any output to /app/builds/aarch64/test.log (create an empty file if skipped).1. Static libraries:
/app/builds/x86_64/dist/lib/libgmp.a/app/builds/aarch64/dist/lib/libgmp.a2. JSON test report at /app/report.json:
The report must be a JSON object with the following structure:
{
"gmp_version": "6.3.0",
"architectures": [
{
"arch": "x86_64",
"compiler": "<gcc version string>",
"cflags": "<actual CFLAGS used>",
"configure_options": "<configure command line flags>",
"library_path": "/app/builds/x86_64/dist/lib/libgmp.a",
"tests_run": true,
"test_summary": {
"total": <int>,
"passed": <int>,
"failed": <int>
}
},
{
"arch": "aarch64",
"compiler": "<cross-compiler version string>",
"cflags": "<actual CFLAGS used>",
"configure_options": "<configure command line flags>",
"library_path": "/app/builds/aarch64/dist/lib/libgmp.a",
"tests_run": <true|false>,
"test_summary": {
"total": <int>,
"passed": <int>,
"failed": <int>
}
}
]
}
test_summary.total, passed, failed must be integers. If tests were not run, set all to 0.tests_run is a boolean indicating whether make check was executed for that architecture.3. Distribution tarball at /app/gmp-6.3.0-multiarch-optimized.tar.gz:
Must contain:
libgmp.a files (preserving the per-architecture directory structure under builds/)report.json filetest.log filesThe tarball should be created from /app so paths inside are relative (e.g., builds/x86_64/dist/lib/libgmp.a).