Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

src/arch/simddetect.cpp: fix NEON detection on FreeBSD #3782

Merged
merged 6 commits into from
May 29, 2022
Merged

src/arch/simddetect.cpp: fix NEON detection on FreeBSD #3782

merged 6 commits into from
May 29, 2022

Conversation

clausecker
Copy link
Contributor

FreeBSD does not have the <asm/hwcap> header, requiring some slightly different code to check for NEON availability. This code might also apply to other BSD-like operating systems such as NetBSD, OpenBSD, DragonflyBSD, or iOS, but I haven't checked.

src/arch/simddetect.cpp Outdated Show resolved Hide resolved
src/arch/simddetect.cpp Outdated Show resolved Hide resolved
src/arch/simddetect.cpp Outdated Show resolved Hide resolved
@clausecker clausecker marked this pull request as draft April 2, 2022 16:04
@clausecker clausecker marked this pull request as ready for review April 2, 2022 16:11
@clausecker clausecker requested a review from stweil April 2, 2022 20:12
freebsd-git pushed a commit to freebsd/freebsd-ports that referenced this pull request Apr 3, 2022
Tesseract requires the <asm/hwcap.h> header to detect the availability
of NEON instructions on armv7.  This commit adds a patch to use the
appropriate FreeBSD interface for this purpose.  This issue has already
been reported to up stream.

See also:	tesseract-ocr/tesseract#3782
See also:	PR #263003

PR:		263004
Approved by:	portmgr (build fix blanket)
freebsd-git pushed a commit to freebsd/freebsd-ports that referenced this pull request Apr 3, 2022
The bundled version of tesseract requires the <asm/hwcap.h> header
to detect the availability of NEON instructions on armv7.  This
issue has already been reported to up stream.

Reported upstream:	tesseract-ocr/tesseract#3782

PR:		263003
Approved by:	portmgr (build fix blanket)
freebsd-git pushed a commit to freebsd/freebsd-ports that referenced this pull request Apr 3, 2022
The bundled version of tesseract requires the <asm/hwcap.h> header
to detect the availability of NEON instructions on armv7.  This
issue has already been reported to up stream.

Reported upstream:	tesseract-ocr/tesseract#3782

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

(cherry picked from commit 16f0acb)
freebsd-git pushed a commit to freebsd/freebsd-ports that referenced this pull request Apr 3, 2022
Tesseract requires the <asm/hwcap.h> header to detect the availability
of NEON instructions on armv7.  This commit adds a patch to use the
appropriate FreeBSD interface for this purpose.  This issue has already
been reported to up stream.

See also:	tesseract-ocr/tesseract#3782
See also:	PR #263003

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

(cherry picked from commit 31efc7f)
src/arch/simddetect.cpp Outdated Show resolved Hide resolved
configure.ac Show resolved Hide resolved
configure.ac Show resolved Hide resolved
src/arch/simddetect.cpp Outdated Show resolved Hide resolved
src/arch/simddetect.cpp Outdated Show resolved Hide resolved
src/arch/simddetect.cpp Outdated Show resolved Hide resolved
@stweil stweil added this to To do: Bug fixes for release 5 in Tesseract next May 29, 2022
@clausecker
Copy link
Contributor Author

Please consider opening a code review next time so the system doesn't send me one email for each comment you wrote.

@clausecker clausecker changed the title sys/arch/simddetect.cpp: fix NEON detection on FreeBSD src/arch/simddetect.cpp: fix NEON detection on FreeBSD May 29, 2022
src/arch/simddetect.cpp Outdated Show resolved Hide resolved
src/arch/simddetect.cpp Outdated Show resolved Hide resolved
src/arch/simddetect.cpp Outdated Show resolved Hide resolved
Copy link
Contributor

@stweil stweil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@stweil stweil merged commit 2e7ae6e into tesseract-ocr:main May 29, 2022
@clausecker clausecker deleted the hwcap_freebsd branch May 29, 2022 22:16
@stweil
Copy link
Contributor

stweil commented Nov 14, 2022

While this pull request was an important fix for ARM hosts, we had a similar severe problem for amd64 / x86_64 host. See issue #3964.

@stweil stweil moved this from To do: Bug fixes for release 5 to Done in Tesseract next Nov 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants