Page MenuHomeFreeBSD

share/mk: pass SHARED_CFLAGS to PIC and PIE from assembly
ClosedPublic

Authored by brooks on May 22 2025, 3:02 PM.
Tags
None
Referenced Files
F168331247: D50466.id155897.diff
Thu, Aug 27, 3:59 PM
F168329134: D50466.id155959.diff
Thu, Aug 27, 3:47 PM
F168329083: D50466.id155868.diff
Thu, Aug 27, 3:47 PM
F168323148: D50466.diff
Thu, Aug 27, 3:12 PM
Unknown Object (File)
Thu, Aug 13, 2:34 PM
Unknown Object (File)
Wed, Aug 12, 7:17 PM
Unknown Object (File)
Wed, Aug 12, 7:16 PM
Unknown Object (File)
Wed, Aug 12, 5:15 PM

Details

Summary

This mirrors what we do for C code.

PR: 286975

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

I wish we had these documented somewhere, so we could include a note that ${SHARED_CFLAGS} (along with ${CFLAGS} and ${PIEO_CFLAGS}/${PICO_CFLAGS} etc.).

I see three SHARED_CFLAGS references: in lib/libc/sys/Makefile.inc (noted in the PR), share/mk/bsd.sanitizer.mk, and lib/libarchive/Makefile.inc. I'm not sure why libarchive's addition of ICONV-related flags are in SHARED_CFLAGS not CFLAGS.

  • Drop PICO_CFLAGS, and friends
  • Document SHARED_CFLAGS
This revision is now accepted and ready to land.May 22 2025, 11:28 PM