Bug 196505 - security/nettle broken with clang 3.5 for ARM
Summary: security/nettle broken with clang 3.5 for ARM
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: arm Any
: --- Affects Only Me
Assignee: Johan van Selst
URL:
Keywords:
: 196506 196507 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-01-05 11:58 UTC by Sean Bruno
Modified: 2015-01-06 20:56 UTC (History)
2 users (show)

See Also:


Attachments
patch for asm fix (1.31 KB, patch)
2015-01-05 11:58 UTC, Sean Bruno
sbruno: maintainer-approval?
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sean Bruno freebsd_committer freebsd_triage 2015-01-05 11:58:11 UTC
Created attachment 151351 [details]
patch for asm fix

clang3.5 does not support asm calls like this:

/nxb-bin/usr/bin/cc -I. -I/usr/local/include -DHAVE_CONFIG_H -O -pipe  -fno-strict-aliasing -ggdb3 -Wall -W   -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes   -Wpointer-arith -Wbad-function-cast -Wnested-externs -fpic -MT sha256-compress.o -MD -MP -MF sha256-compress.o.d -fpic -c sha256-compress.s
cc: warning: argument unused during compilation: '-I .'
cc: warning: argument unused during compilation: '-I /usr/local/include'
cc: warning: argument unused during compilation: '-D HAVE_CONFIG_H'
cc: warning: argument unused during compilation: '-fno-strict-aliasing'
cc: warning: argument unused during compilation: '-fpic'
cc: warning: argument unused during compilation: '-MT sha256-compress.o'
cc: warning: argument unused during compilation: '-MD'
cc: warning: argument unused during compilation: '-MP'
cc: warning: argument unused during compilation: '-MF sha256-compress.o.d'
cc: warning: argument unused during compilation: '-fpic'
sha256-compress.s:81:16: error: register expected
        str     r0, [sp, +#64]
                          ^
sha256-compress.s:946:16: error: register expected
        ldr     r0, [sp, +#64]
                          ^
Makefile:332: recipe for target 'sha256-compress.o' failed


failure log:
http://tasty.ysv.freebsd.org/data/11-armv6-11-armv6-ports/2015-01-05_05h10m36s/logs/errors/nettle-2.7.1.log

with patch log:
http://tasty.ysv.freebsd.org/data/11-armv6-11-armv6-ports/2015-01-05_05h13m54s/logs/nettle-2.7.1.log
Comment 1 Kurt Jaeger freebsd_committer freebsd_triage 2015-01-05 14:58:38 UTC
*** Bug 196506 has been marked as a duplicate of this bug. ***
Comment 2 Andrew Turner freebsd_committer freebsd_triage 2015-01-05 20:13:17 UTC
The patch is correct, although the "+" is optional in ldr and str instructions as it is the default.
Comment 3 Mark Linimon freebsd_committer freebsd_triage 2015-01-06 01:37:46 UTC
*** Bug 196507 has been marked as a duplicate of this bug. ***
Comment 4 commit-hook freebsd_committer freebsd_triage 2015-01-06 20:55:49 UTC
A commit references this bug:

Author: johans
Date: Tue Jan  6 20:54:56 UTC 2015
New revision: 376440
URL: https://svnweb.freebsd.org/changeset/ports/376440

Log:
  Fix build on arm, by correcting asm code for clang

  PR:		196505
  Submitted by:	sbruno

Changes:
  head/security/nettle/files/
  head/security/nettle/files/patch-arm__v6__sha256-compress.asm
Comment 5 Johan van Selst freebsd_committer freebsd_triage 2015-01-06 20:56:31 UTC
Committed, thanks