Bug 239181 - adapt x11/cool-retro-term for clang-on-powerpc
Summary: adapt x11/cool-retro-term for clang-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: Mark Linimon
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-07-13 00:12 UTC by Mark Linimon
Modified: 2019-10-23 12:12 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (danfe)


Attachments
patch to x11/cool-retro-term/Makefile (645 bytes, patch)
2019-07-13 00:12 UTC, Mark Linimon
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Linimon freebsd_committer freebsd_triage 2019-07-13 00:12:21 UTC
Created attachment 205742 [details]
patch to x11/cool-retro-term/Makefile

Prepare for powerpc-on-clang by deleting hard-coded tests for architecture
as a stand-in for "are we running on gcc".
Comment 1 commit-hook freebsd_committer 2019-10-04 22:40:44 UTC
A commit references this bug:

Author: linimon
Date: Fri Oct  4 22:40:29 UTC 2019
New revision: 513793
URL: https://svnweb.freebsd.org/changeset/ports/513793

Log:
  Prepare for powerpc-on-clang by deleting hard-coded tests for architecture
  as a stand-in for "are we running on gcc".  (PR 239181)

  As a side-effect, adding the stanza

    MAKE_ENV= LLVM_CONFIG=${LOCALBASE}/bin/llvm-config${LLVM_DEFAULT}

  obviates the need for hardcoding definitions for CC, CXX, and CPP
  (later linimon testing).

  PR:		239181
  Approved by:	danfe (maintainer-timeout, > 2 months)

Changes:
  head/x11/cool-retro-term/Makefile
Comment 2 Alexey Dokuchaev freebsd_committer 2019-10-08 07:40:00 UTC
Sorry, this PR somehow went off my radar.  I don't quite understand the patch, especially why did you have to pessimize most common case of clang-based tier-1 arches by pulling devel/llvmXX from ports instead of using system compiler (like it was before).

No need to take any action, I'll fix this mess soonish.
Comment 3 Mark Linimon freebsd_committer freebsd_triage 2019-10-08 07:57:15 UTC
(In reply to Alexey Dokuchaev from comment #2)

There is currently no way to tell e.g. Mk/Uses/compiler.mk "use clang from base if available, otherwise use clang from ports".  This would be the correct fix here.  Patches welcome.

Hardcoding CC etc. is always wrong:

 a) it overrides possible user changes for testing;
 b) it issues a useless warning message on GCC-based systems.

Please see https://wiki.freebsd.org/HardcodedLLVMVersions#Ports_That_Redefine_CC_.2F_CPP_.2F_CXX .
Comment 4 Alexey Dokuchaev freebsd_committer 2019-10-08 08:04:43 UTC
> "use clang from base if available, otherwise use clang from ports"
Ah, OK, now I see why you got carried away in that direction. :-)

No, AFAIR it never needed specifically Clang.  Those "FOO=clang" were remnants from the early 9.X-ish times to avoid pulling external compiler, and Clang just hit the base system but was not named cc/c++ yet.  This is ugly and should had been fixed long ago.

I suspect something simple like compiler:c++11-lang would suffice here, in case patching the source code to make it gcc-4.2.1 friendly would not be feasible.
Comment 5 commit-hook freebsd_committer 2019-10-23 12:12:10 UTC
A commit references this bug:

Author: danfe
Date: Wed Oct 23 12:11:24 UTC 2019
New revision: 515252
URL: https://svnweb.freebsd.org/changeset/ports/515252

Log:
  - Switch to USES+=compiler:c++11-lang to unbreak on PowerPC instead
    of the approach taken in r513793 (Clang was never required for this
    port, any not-so-ancient compiler would suffice)
  - Sort the values on the USES list; avoid hardcoding version numbers
  - Pluralize the noun in the COMMENT line and make it a bit shorter

  Reviewed by:	pkubaj
  PR:		239181

Changes:
  head/x11/cool-retro-term/Makefile