Bug 206527 - emulators/wine emulators/wine-devel: Fix build with clang 3.8.0
Summary: emulators/wine emulators/wine-devel: Fix build with clang 3.8.0
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Gerald Pfeifer
URL:
Keywords: easy, needs-qa, patch
Depends on:
Blocks: 206074
  Show dependency treegraph
 
Reported: 2016-01-23 15:47 UTC by Dimitry Andric
Modified: 2016-05-15 14:09 UTC (History)
0 users

See Also:
gerald: maintainer-feedback+
gerald: merge-quarterly+


Attachments
Fix emulators/wine and emulators/wine-devel build with clang 3.8.0 (1.12 KB, patch)
2016-01-23 15:47 UTC, Dimitry Andric
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dimitry Andric freebsd_committer freebsd_triage 2016-01-23 15:47:15 UTC
Created attachment 166008 [details]
Fix emulators/wine and emulators/wine-devel build with clang 3.8.0

During the exp-run in bug 206074, it was found that emulators/wine and emulators/wine-devel give errors with a recent clang 3.8.0 snapshot [1]:

eventlog.c:997:5: error: 'va_start' used in Win64 ABI function
    __ms_va_start( valist, number );
    ^
../../include/windef.h:90:35: note: expanded from macro '__ms_va_start'
#  define __ms_va_start(list,arg) __builtin_ms_va_start(list,arg)
                                  ^
<command line>:5:31: note: expanded from here
#define __builtin_ms_va_start __builtin_va_start
                              ^
This is because the port Makefile explicitly defines __builtin_ms_va_list as __builtin_va_list, __builtin_ms_va_start as __builtin_va_start, and so on, for clang.

For clang 3.8.0 and higher this is no longer needed, as it supports the 'native' MS varargs builtins now.  The attached patch adds a version check.

[1] http://package18.nyi.freebsd.org/data/headamd64PR206074-default/2016-01-15_15h26m58s/logs/errors/wine-1.8,1.log
[2] http://package18.nyi.freebsd.org/data/headamd64PR206074-default/2016-01-15_15h26m58s/logs/errors/wine-devel-1.9.1,1.log
Comment 1 commit-hook freebsd_committer freebsd_triage 2016-02-07 21:23:14 UTC
A commit references this bug:

Author: gerald
Date: Sun Feb  7 21:22:15 UTC 2016
New revision: 408456
URL: https://svnweb.freebsd.org/changeset/ports/408456

Log:
  Fix the build with clang 3.8.0 or later which support "native" Windows
  varargs builtins.

  PR:		206527
  Submitted by:	dim

Changes:
  head/emulators/wine-devel/Makefile
Comment 2 Gerald Pfeifer freebsd_committer freebsd_triage 2016-02-07 21:24:27 UTC
Thank you, Dimitry!  I applied your patch to wine-devel for now and
plan on doing the same with wine in a few days.

Appreciate you not just reporting this, but diagnosing it and even
providing a patch.

Koobs, agree this is a good candidate for the quarterly branch if
someone wants to apply it there.
Comment 3 commit-hook freebsd_committer freebsd_triage 2016-02-11 10:58:57 UTC
A commit references this bug:

Author: gerald
Date: Thu Feb 11 10:58:05 UTC 2016
New revision: 408683
URL: https://svnweb.freebsd.org/changeset/ports/408683

Log:
  Fix the build with clang 3.8.0 or later which support "native" Windows
  varargs builtins.

  PR:		206527
  Submitted by:	dim

Changes:
  head/emulators/wine/Makefile
Comment 4 Gerald Pfeifer freebsd_committer freebsd_triage 2016-02-11 11:09:09 UTC
Now also pushed back to the stable emulators/wine port.  Thanks again!
Comment 5 commit-hook freebsd_committer freebsd_triage 2016-02-16 13:56:58 UTC
A commit references this bug:

Author: gerald
Date: Tue Feb 16 13:56:25 UTC 2016
New revision: 408996
URL: https://svnweb.freebsd.org/changeset/ports/408996

Log:
  On FreeBSD 9.x, even when CHOSEN_COMPILER_TYPE from Mk/Uses/compiler.mk
  is set to clang, COMPILER_VERSION is still at 42 from the system compiler
  that is GCC 4.2.

  Work around this for the time being, while retaining the fix from
  PR 206527, by special casing this situation.

  PR:		206527

Changes:
  head/emulators/wine-devel/Makefile
Comment 6 commit-hook freebsd_committer freebsd_triage 2016-04-17 09:53:06 UTC
A commit references this bug:

Author: gerald
Date: Sun Apr 17 09:52:56 UTC 2016
New revision: 413495
URL: https://svnweb.freebsd.org/changeset/ports/413495

Log:
  Force the use of GCC where it is the system compiler since
  COMPILER_VERSION will be 42 (the GCC version) even if clang
  is CHOSEN_COMPILER_TYPE in that case.

  PR:		206527

Changes:
  head/emulators/wine/Makefile
Comment 7 commit-hook freebsd_committer freebsd_triage 2016-04-17 10:04:08 UTC
A commit references this bug:

Author: gerald
Date: Sun Apr 17 10:03:13 UTC 2016
New revision: 413496
URL: https://svnweb.freebsd.org/changeset/ports/413496

Log:
  Fix for old make on FreeBSD 9.x.  USE_GCC=yes instead of USE_GCC=any there.

  PR:		206527

Changes:
  head/emulators/wine/Makefile
Comment 8 commit-hook freebsd_committer freebsd_triage 2016-05-15 14:09:23 UTC
A commit references this bug:

Author: gerald
Date: Sun May 15 14:08:35 UTC 2016
New revision: 415230
URL: https://svnweb.freebsd.org/changeset/ports/415230

Log:
  Fix the build on FreeBSD 9.x by backporting r413495 and r413496 from
  mainline after a month:

    Force the use of GCC where it is the system compiler since
    COMPILER_VERSION will be 42 (the GCC version) even if clang
    is CHOSEN_COMPILER_TYPE in that case.

  PR:		206527
  Approved by:	portmgr (blanket for build fixes)

Changes:
  branches/2016Q2/emulators/wine/Makefile