Page MenuHomeFreeBSD

CFT: conditionalize -mminimal-toc flag on powerpc64 on elfv1
AbandonedPublic

Authored by linimon on Aug 9 2019, 2:04 PM.
Tags
None
Referenced Files
F81613691: D21197.diff
Thu, Apr 18, 11:45 PM
Unknown Object (File)
Dec 20 2023, 12:03 AM
Unknown Object (File)
Nov 9 2023, 12:55 PM
Unknown Object (File)
Oct 8 2023, 11:47 AM
Unknown Object (File)
Sep 11 2023, 4:56 AM
Unknown Object (File)
Aug 27 2023, 2:30 PM

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
Tests Skipped

Event Timeline

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

After including bsd.port.pre.mk, C{,XX}FLAGS_${ARCH} no longer works.

This isn't true.

bsd.port.post.mk starts at line 1551 in Mk/bsd.port.mk. The *FLAGS_<arch> assignment is done at line 2029.

The reason the posted patch did not work was the typo OVERSION for OSVERSION. I will upload a newer patch shortly.

Fix typo: s/OVERSION/OSVERSION/

OK, good to know.

When you commit the final version of the patch, please add science/qwalk to it too. It needs the same fix.