Page MenuHomeFreeBSD

Use .pieo extension for WITH_PIE bsd.prog.mk output
Needs ReviewPublic

Authored by dim on Tue, Apr 22, 6:40 PM.

Details

Summary

When object files for programs are built using bsd.prog.mk, and WITH_PIE
is enabled, the extension used is still plain ".o". To be consistent
with bsd.lib.mk, and to allow changes in WITH_PIE settings to propagate
correctly, the extension should be ".pieo" instead.

Requires D49965 to be committed first.

MFC after: 1 week

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 63644
Build 60528: arc lint + arc unit

Event Timeline

dim requested review of this revision.Tue, Apr 22, 6:40 PM
share/mk/bsd.prog.mk
55

As an aside, I wonder if Makefiles, tools, etc., would work if we made this OBJ_EXT=pie.o

share/mk/bsd.prog.mk
55

As an aside, I wonder if Makefiles, tools, etc., would work if we made this OBJ_EXT=pie.o

With other make implementations there is typically a $(suffix ...) function that splits on the rightmost dot, so that wouldn't work for that case.

In bmake I think it will depend on whether it understands the following notation for a suffix-transformation rule:

.c.pie.o:
      <recipe>