Bug 267593 - devel/qt6-base: fails to build with -march=bdver2
Summary: devel/qt6-base: fails to build with -march=bdver2
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Many People
Assignee: freebsd-kde (group)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-11-06 12:49 UTC by Piotr Kubaj
Modified: 2023-10-23 23:44 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (kde)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Piotr Kubaj freebsd_committer freebsd_triage 2022-11-06 12:49:49 UTC
src/corelib/global/qsimd_p.h has the following check:
    214 #  define ARCH_HASWELL_MACROS       (__AVX2__ + __BMI__ + __BMI2__ + __F16C__ + __FMA__ + __LZCNT__)
    215 #  if ARCH_HASWELL_MACROS != 0
    216 #    if ARCH_HASWELL_MACROS != 6
    217 #      error "Please enable all x86-64-v3 extensions; you probably want to use -march=haswell or -march=x86-64-v3 instead of -mavx2"
    218 #    endif

On bdver2 chips, __BMI__, __F16C__, __FMA__ and __LZCNT__ are defined. __AVX2__ and __BMI2__ are not. This causes the build with -march=bdver2 to fail.
Comment 1 Jason E. Hale freebsd_committer freebsd_triage 2023-10-23 23:44:18 UTC
This has been fixed upstream since Qt 6.5.3 [1] and was previously addressed locally in [2] in response to [3]. For future reference, [2] and [3] were both fixes for Qt 6.5.2.

[1] https://code.qt.io/cgit/qt/qtbase.git/commit/?h=6.5.3&id=0290ee0d6f59caa6d7a6eccebc9f66edd5722e62
[2] https://cgit.freebsd.org/ports/commit/devel/qt6-base?id=5d569342f960a5229be3f8007bfcc6208d0a0621
[3] https://cgit.freebsd.org/ports/commit/devel/qt6-base?id=d2283436a461abadb2c18c91644fe17d187fbda9