Bug 158994 - Fix security/libgcrypt 1.5.0 build with clang
Summary: Fix security/libgcrypt 1.5.0 build with clang
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Dimitry Andric
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-17 13:10 UTC by Dimitry Andric
Modified: 2011-07-22 09:52 UTC (History)
0 users

See Also:


Attachments
file.diff (3.06 KB, patch)
2011-07-17 13:10 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 2011-07-17 13:10:10 UTC
Building security/libgcrypt 1.5.0 with clang results in errors similar
to the following:

rijndael.c:846:46: error: ambiguous instructions require an explicit suffix (could be 'cmpb', 'cmpw', 'cmpl', or 'cmpq')
                "movdqa 0xa0(%%esi), %%xmm1\n\t"
                                             ^
<inline asm>:24:2: note: instantiated into assembly here
        cmp $10, -80(%ebp)
        ^

This is because the 'cmp' instruction lacks a type suffix, and is thus
ambiguous.  I will send a fix upstream, but please apply it locally for
now, to let the port build with clang.

Fix: Patch attached with submission follows:
How-To-Repeat: CC=clang CXX=clang++ make -C /usr/ports/security/libgcrypt install
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2011-07-17 13:10:21 UTC
Responsible Changed
From-To: freebsd-ports-bugs->dim

Submitter has GNATS access (via the GNATS Auto Assign Tool)
Comment 2 Edwin Groothuis freebsd_committer freebsd_triage 2011-07-17 13:10:24 UTC
Maintainer of security/libgcrypt,

Please note that PR ports/158994 has just been submitted.

If it contains a patch for an upgrade, an enhancement or a bug fix
you agree on, reply to this email stating that you approve the patch
and a committer will take care of it.

The full text of the PR can be found at:
    http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/158994

-- 
Edwin Groothuis via the GNATS Auto Assign Tool
edwin@FreeBSD.org
Comment 3 Edwin Groothuis freebsd_committer freebsd_triage 2011-07-17 13:10:26 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 4 Hirohisa Yamaguchi 2011-07-20 17:48:07 UTC
Hi,

At Sun, 17 Jul 2011 12:10:24 UT,
Edwin Groothuis wrote:

> Please note that PR ports/158994 has just been submitted.

> The full text of the PR can be found at:
>     http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/158994

I set up an i386 9-CURRENT box, and saw the problem.
The submitted patch looks okay.

I approve it, thanks.

Regards,
--

	Hirohisa Yamaguchi
	  umq@ueo.co.jp
Comment 5 dfilter service freebsd_committer freebsd_triage 2011-07-21 21:18:59 UTC
dim         2011-07-21 20:18:45 UTC

  FreeBSD ports repository (src committer)

  Added files:
    security/libgcrypt/files patch-cipher-rijndael.c 
  Log:
  Building security/libgcrypt 1.5.0 with clang results in errors similar
  to the following:
  
  rijndael.c:846:46: error: ambiguous instructions require an explicit suffix (could be 'cmpb', 'cmpw', 'cmpl', or 'cmpq')
  "movdqa 0xa0(%%esi), %%xmm1\n\t"
  ^
  <inline asm>:24:2: note: instantiated into assembly here
  cmp $10, -80(%ebp)
  ^
  
  This is because the 'cmp' instruction lacks a type suffix, and is thus
  ambiguous.  Fix this by changing these to 'cmpq'.
  
  PR:     ports/158994
  Approved by:    Hirohisa Yamaguchi <umq@ueo.co.jp> (maintainer)
  
  Revision  Changes    Path
  1.1       +61 -0     ports/security/libgcrypt/files/patch-cipher-rijndael.c (new)
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 6 Dimitry Andric freebsd_committer freebsd_triage 2011-07-22 09:51:31 UTC
State Changed
From-To: feedback->closed

Patch has been applied.