Bug 208908 - lang/beignet: Fix build with libc++ 3.8.0
Summary: lang/beignet: Fix build with libc++ 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: freebsd-x11 (Nobody)
Depends on:
Blocks: 208158
  Show dependency treegraph
Reported: 2016-04-18 20:15 UTC by Dimitry Andric
Modified: 2016-11-30 08:31 UTC (History)
1 user (show)

See Also:

Replace abs() on unsigned arguments in lang/beignet (987 bytes, patch)
2016-04-18 20:15 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 2016-04-18 20:15:34 UTC
Created attachment 169455 [details]
Replace abs() on unsigned arguments in lang/beignet

During the exp-run in bug 208158, it was found that lang/beignet gives errors with libc++ 3.8.0 [1]:

/wrkdirs/usr/ports/lang/beignet/work/Beignet-1.1.1-Source/backend/src/backend/gen_insn_selection.cpp:1156:27: error: call to 'abs' is ambiguous
    insn->extra.longjmp = abs(index - origin) > 800;

This is because abs() is being called with unsigned arguments.  Fix this by calculating the unsigned difference in a safe manner.

[1] http://package18.nyi.freebsd.org/data/headamd64PR208158-default/2016-03-22_18h30m05s/logs/errors/beignet-1.1.1.log
Comment 1 Jan Beich freebsd_committer 2016-11-30 08:31:20 UTC
Obsoleted by ports r416855.