Add `-O2` in armv7 Docker build following bug fix Changelog-None
What changed, and why it matters
This commit changes the compiler optimization level for the ARMv7 Docker build from -O1 to -O2. It removes a TODO comment that referenced a prior bug (GitHub issue #8501) which had been worked around by using lower optimization. The change itself is a build-configuration cleanup after a bug was fixed elsewhere; it does not contain any direct security flaw, but it re-enables a higher optimization level that had previously been disabled due to a bug.
Treat as a routine build maintenance commit. If reviewing for security, verify that the referenced bug (#8501) was indeed unrelated to security and that -O2 does not reintroduce any miscompilation or runtime instability in armv7 builds. No immediate security response is indicated by this commit alone.
Security signals we found
Build configuration change for a single architecture (armv7)
Re-enables higher compiler optimization (-O2) previously avoided due to a bug
No source code changes to Core Lightning logic
No explicit security relevance stated by vendor
Evidence from the diff
The Dockerfile for armv7 builds previously used COPTFLAGS=”-O1 …” with a TODO referencing issue #8501 about a bug with -O2 in armv7. The commit replaces -O1 with -O2 and removes the TODO. This is a build-hardening/cleanup change following a bug fix. There is no code change in Core Lightning itself, only the Docker build configuration for one architecture. The prior bug is not described in the commit, and no verified references are supplied.
Changed components
Dockerfile armv7 build configurationARMv7 Docker image build pipelineInspect captured patch +1 / −2
diff --git a/Dockerfile b/Dockerfile
index 42f45773..97053739 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -91,8 +91,7 @@ ARG target_arch=arm-linux-gnueabihf
ARG target_arch_gcc=arm-linux-gnueabihf
ARG target_arch_dpkg=armhf
ARG target_arch_rust=armv7-unknown-linux-gnueabihf
-#TODO: bug with -O2 in armv7, see https://github.com/ElementsProject/lightning/issues/8501
-ARG COPTFLAGS="-O1 -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard"
+ARG COPTFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard"
FROM base-builder-${TARGETOS}-${TARGETARCH} AS builder
Why this scored 13/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.