Skip to content

Apply CFLAGS to assembly file compilation - #75

Open
michich wants to merge 1 commit into
cornelisnetworks:masterfrom
michich:annocheck
Open

Apply CFLAGS to assembly file compilation#75
michich wants to merge 1 commit into
cornelisnetworks:masterfrom
michich:annocheck

Conversation

@michich

@michich michich commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

The .S → .o build rule used only $(ASFLAGS), which amounted to just "-g3 -fpic". This meant that when building as a Fedora RPM, the hardening flags from %{set_build_flags} (set via CFLAGS) were not applied to assembly files — no annobin, no stack protector specs, etc.

Add $(CFLAGS) $(BASECFLAGS) $(INCLUDES) to match the .c compilation rule and the .S dependency-generation rule.

The .S → .o build rule used only $(ASFLAGS), which amounted to just
"-g3 -fpic". This meant that when building as a Fedora RPM, the
hardening flags from %{set_build_flags} (set via CFLAGS) were not
applied to assembly files — no annobin, no stack protector specs, etc.

Add $(CFLAGS) $(BASECFLAGS) $(INCLUDES) to match the .c compilation
rule and the .S dependency-generation rule.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
@BrendanCunningham

Copy link
Copy Markdown
Contributor

Thanks; we'll try this out and, assuming no issues, approve it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants