Bug 259447 - devel/volk: fix build on armv7
Summary: devel/volk: fix build on armv7
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: Mikael Urankar
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-25 22:06 UTC by Robert Clausecker
Modified: 2021-11-08 11:54 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (hamradio)
fuz: merge-quarterly?


Attachments
devel/volk: fix build on armv7 (782 bytes, patch)
2021-10-25 22:06 UTC, Robert Clausecker
fuz: maintainer-approval? (hamradio)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Clausecker 2021-10-25 22:06:39 UTC
Created attachment 229033 [details]
devel/volk: fix build on armv7

This port does not build on armv7 due to inline assembly unsupported by clang.  Armv6 does not seem to be affected.

Fix the build by compiling with gcc on armv7.

Tested with Poudriere on armv7 FreeBSD 13.

Please MFH if possible.

Note that a version 2.5.0 of devel/volk has been made available in the meanwhile.  it might be a good idea to update the port on the main branch in addition to fixing the build.
Comment 1 Mikael Urankar freebsd_committer 2021-10-26 08:53:27 UTC
Have you tried to build the port with binutils?

BTW the "raw unified diff" looks weird, what do you use to generate the diff?
Comment 2 Robert Clausecker 2021-10-26 12:05:04 UTC
(In reply to Mikael Urankar from comment #1)

Hi Mikael,

Just using binutils (i.e. -no-integrated-as) won't cut it in this case as generating the assembly from an extended inline assembly template is what fails.  So the failure occurs before the assembler gets to look at the compiler output.

As for the diff, this is what git-format-patch(1) gave me.  It is supposed to be applied using git-am(1), giving you a ready-made commit (perhaps with some changes to the commit message).
Comment 3 Mikael Urankar freebsd_committer 2021-10-26 12:16:57 UTC
(In reply to Robert Clausecker from comment #2)
There is a weird header https://bz-attachments.freebsd.org/attachment.cgi?id=229033&action=diff&format=raw&headers=1
@@ -, +, @@ 
---

It's probably bugzilla being broken then:
fetch -o 1.patch 'https://bz-attachments.freebsd.org/attachment.cgi?id=229033&action=diff&format=raw&headers=1'
fetch: https://bz-attachments.freebsd.org/attachment.cgi?id=229033&action=diff&format=raw&headers=1: size of remote file is not known
1.patch                                                498  B  239 kBps    00s
root@honeycomb: /usr/ports git am 1.patch 
Patch format detection failed.

There is a weird header (https://bz-attachments.freebsd.org/attachment.cgi?id=229033&action=diff&format=raw&headers=1)
@@ -, +, @@ 
---
Comment 4 Robert Clausecker 2021-10-26 12:20:41 UTC
(In reply to Mikael Urankar from comment #3)

Hi Mikael,

Just fetch the file I uploaded, i.e. click on the patch name.  The URL is

    https://bugs.freebsd.org/bugzilla/attachment.cgi?id=229033
Comment 5 commit-hook freebsd_committer 2021-11-08 07:39:06 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=79ede500f770ed197458e9ae7cf87b2961c4dc16

commit 79ede500f770ed197458e9ae7cf87b2961c4dc16
Author:     Robert Clausecker <fuz@fuz.su>
AuthorDate: 2021-10-25 22:05:14 +0000
Commit:     Mikael Urankar <mikael@FreeBSD.org>
CommitDate: 2021-11-08 07:26:22 +0000

    devel/volk: Fix build on armv7.

    This port does not build on armv7 due to inline assembly unsupported by clang.
    Fix the build by compiling with gcc on armv7.

    PR:             259447
    Approved by:    portmgr (build fix blanket)

 devel/volk/Makefile | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
Comment 6 commit-hook freebsd_committer 2021-11-08 11:52:57 UTC
A commit in branch 2021Q4 references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=ee93a2ebb651edbbf0408ddd93b61db831a2c4b1

commit ee93a2ebb651edbbf0408ddd93b61db831a2c4b1
Author:     Robert Clausecker <fuz@fuz.su>
AuthorDate: 2021-10-25 22:05:14 +0000
Commit:     Mikael Urankar <mikael@FreeBSD.org>
CommitDate: 2021-11-08 11:52:01 +0000

    devel/volk: Fix build on armv7.

    This port does not build on armv7 due to inline assembly unsupported by clang.
    Fix the build by compiling with gcc on armv7.

    PR:             259447
    Approved by:    portmgr (build fix blanket)

    (cherry picked from commit 79ede500f770ed197458e9ae7cf87b2961c4dc16)

 devel/volk/Makefile | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)