Page MenuHomeFreeBSD

CFT: conditionalize -mminimal-toc flag on powerpc64 on elfv1
Needs ReviewPublic

Authored by linimon on Fri, Aug 9, 2:04 PM.
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
Summary

When we switch powerpc64 to clang/elfv2 by default, several ports will break due to the -mminimal-toc flag being no longer accepted.

This preliminary patch conditionalizes the setting of the flag.

As of yet, the switch it uncommitted. So, a dummy OSVERSION is used. This will allow the existing tree to be regression-tested before the switch. Interested testers should set the bogus OSVERSION to a real value.

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

linimon created this revision.Fri, Aug 9, 2:04 PM
pkubaj added a comment.Fri, Aug 9, 8:23 PM

After including bsd.port.pre.mk, C{,XX}FLAGS_${ARCH} no longer works.
So you should do instead:

if ${OVERSION} < 9999999 && ${ARCH} == powerpc64
CFLAGS+=-mminimal-toc
CXXFLAGS+=-mminimal-toc
.endif