Bug 240540 - mail/milter-callback: don't add -fnested-functions on head on powerpc*
Summary: mail/milter-callback: don't add -fnested-functions on head on powerpc*
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Piotr Kubaj
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-09-12 15:09 UTC by Piotr Kubaj
Modified: 2019-10-17 02:09 UTC (History)
2 users (show)

See Also:
ehaupt: maintainer-feedback+


Attachments
patch (846 bytes, patch)
2019-09-12 15:09 UTC, Piotr Kubaj
pkubaj: maintainer-approval? (ehaupt)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Piotr Kubaj freebsd_committer freebsd_triage 2019-09-12 15:09:30 UTC
Created attachment 207423 [details]
patch

With powerpc* soon switching to clang on head, GCC from ports will be used and it doesn't accept -fnested-functions.
Comment 1 Emanuel Haupt freebsd_committer freebsd_triage 2019-09-12 17:25:26 UTC
Feel free to commit such changes to all my ports.
Comment 2 Mark Linimon freebsd_committer freebsd_triage 2019-09-12 22:35:51 UTC
Fails to build on ppcports:

/wrkdirs/usr/ports/mail/milter-callback/work/milter-callback-1.6.0/cache.c -o /wrkdirs/usr/ports/mail/milter-callback/work/milter-callback-1.6.0/cache.o
/wrkdirs/usr/ports/mail/milter-callback/work/milter-callback-1.6.0/cache.c: In function 'extendCache':
/wrkdirs/usr/ports/mail/milter-callback/work/milter-callback-1.6.0/cache.c:338: error: nested functions are disabled, use -fnested-functions to re-enable

Wouldn't a better approach be to make the flag conditional on CHOSEN_COMPILER_TYPE ?
Comment 3 Piotr Kubaj freebsd_committer freebsd_triage 2019-09-13 05:54:35 UTC
(In reply to Mark Linimon from comment #2)
It fails, because base gcc needs it, but we are switching to clang soon and may commit this patch right after the switch.

Checking CHOSEN_COMPILER_TYPE won't help, because there's USE_GCC=any.
Comment 4 Mark Linimon freebsd_committer freebsd_triage 2019-10-17 02:09:52 UTC
See r514519.