Opened 20 months ago

Closed 20 months ago

Last modified 20 months ago

#67108 closed defect (fixed)

fldigi: variant "native" fails on AppleSilicon

Reported by: vk1kcm (Carl Makin) Owned by: ra1nb0w
Priority: Normal Milestone:
Component: ports Version:
Keywords: haspatch Cc:
Port: fldigi

Description

The AppleSilicon compiler doesn't support -march=native, instead configure uses "nativeARM". Attached patch passes "--enable-optimizations=nativeARM" to configure if os.arch eq "arm", or "--enable-optimizations=native" if it doesn't.

Attachments (1)

Portfile.diff (728 bytes) - added by vk1kcm (Carl Makin) 20 months ago.
Tabs replaced with spaces and just the native patch.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 20 months ago by vk1kcm (Carl Makin)

Ahh, the patch includes the fix for flarq version as well. (Ignore this, removed in the latest patch)

Last edited 20 months ago by vk1kcm (Carl Makin) (previous) (diff)

comment:2 Changed 20 months ago by jmroot (Joshua Root)

Keywords: haspatch added
Owner: set to ra1nb0w
Status: newassigned
Summary: Port variant "native" fails on AppleSiliconfldigi: variant "native" fails on AppleSilicon
Type: enhancementdefect

Needs to check ${configure.build_arch}, not ${os.arch}.

comment:3 Changed 20 months ago by vk1kcm (Carl Makin)

Ok, updated patch to use ${configure.build_arch} instead of ${os.arch}. Replaced old patch.

comment:4 Changed 20 months ago by kencu (Ken)

Another option, newer versions of clang do support -march=native:

% uname -a
Darwin Kens-MBP 22.3.0 Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 arm64

% clang++ -march=native test.cc
clang: error: the clang compiler does not support '-march=native'

% clang++-mp-15  -march=native test.cc
<OK>
Last edited 20 months ago by kencu (Ken) (previous) (diff)

comment:5 Changed 20 months ago by ryandesign (Ryan Carsten Schmidt)

Whitespace in the patch should be spaces, not tabs, to match the rest of the Portfile and its modeline.

Changed 20 months ago by vk1kcm (Carl Makin)

Attachment: Portfile.diff added

Tabs replaced with spaces and just the native patch.

comment:6 Changed 20 months ago by Davide Gerhard <ra1nb0w@…>

Resolution: fixed
Status: assignedclosed

In e13cde0eb6706660d9c3aae66f93ed1af8800475/macports-ports (master):

fldigi: commit flarq version and native build

Closes: #67107
Closes: #67108

comment:7 Changed 20 months ago by ra1nb0w

thank you very much

Note: See TracTickets for help on using tickets.