Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
f0c2da32
Commit
f0c2da32
authored
Jun 11, 2017
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
3rdparty: cpufeatures workaround
parent
3dee87b6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
cpu-features.c
3rdparty/cpufeatures/cpu-features.c
+20
-0
No files found.
3rdparty/cpufeatures/cpu-features.c
View file @
f0c2da32
...
...
@@ -515,6 +515,25 @@ cpulist_read_from(CpuList* list, const char* filename)
// its implementation does not parse /proc/self/auxv. Instead it depends
// on values that are passed by the kernel at process-init time to the
// C runtime initialization layer.
#if 1
// OpenCV calls CPU features check during library initialization stage
// (under other dlopen() call).
// Unfortunatelly, calling dlopen() recursively is not supported on some old
// Android versions. Android fix is here:
// - https://android-review.googlesource.com/#/c/32951/
// - GitHub mirror: https://github.com/android/platform_bionic/commit/e19d702b8e330cef87e0983733c427b5f7842144
__attribute__
((
weak
))
unsigned
long
getauxval
(
unsigned
long
);
// Lets linker to handle this symbol
static
uint32_t
get_elf_hwcap_from_getauxval
(
int
hwcap_type
)
{
uint32_t
ret
=
0
;
if
(
getauxval
!=
0
)
{
ret
=
(
uint32_t
)
getauxval
(
hwcap_type
);
}
else
{
D
(
"getauxval() is not available
\n
"
);
}
return
ret
;
}
#else
static
uint32_t
get_elf_hwcap_from_getauxval
(
int
hwcap_type
)
{
typedef
unsigned
long
getauxval_func_t
(
unsigned
long
);
...
...
@@ -539,6 +558,7 @@ get_elf_hwcap_from_getauxval(int hwcap_type) {
return
ret
;
}
#endif
#endif
#if defined(__arm__)
// Parse /proc/self/auxv to extract the ELF HW capabilities bitmap for the
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment