diff --git a/NEWS.rst b/NEWS.rst index eaa578b..5875977 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -6,7 +6,7 @@ every change, see the Git log. Latest ------ -* tbd +* Patch: Fixed compilation error on ARM64 FreeBSD. 9.0.1 ----- diff --git a/lock_version_resolve.json b/lock_version_resolve.json new file mode 100644 index 0000000..f791f89 --- /dev/null +++ b/lock_version_resolve.json @@ -0,0 +1,32 @@ +{ + "cli11": { + "commit_id": "b1003a44f018255c409c43d5f35e71ab8f7eef62", + "resolver_info": "2.0.1", + "sha1": "fdd606a277e537302216420bd3e9070c6f0df861" + }, + "cli11-source": { + "commit_id": "f862849488557eeee0397814a47449ecfdae0383", + "resolver_info": "f862849488557eeee0397814a47449ecfdae0383", + "sha1": "c907ae8559530944e520e22d1382be32d290ca77" + }, + "gtest": { + "commit_id": "da24468d2c5deb601d0f67196abe83d78a00f972", + "resolver_info": "5.0.0", + "sha1": "11e35e3559b3844fbe2fa6f045854cd2dcdf0f86" + }, + "gtest-source": { + "commit_id": "e2239ee6043f73722e7aa812a459f54a28552929", + "resolver_info": "release-1.11.0", + "sha1": "ca969a1500e88a09de1cbfb8d8d3307a7773abfd" + }, + "platform": { + "commit_id": "c2543dd5e613fb86d8dee530c0f1c142a310e1f0", + "resolver_info": "5.1.1", + "sha1": "f6bc772cf920c024726ebd12a5a38f123d057adb" + }, + "waf-tools": { + "commit_id": "6379b83992885dcb148e2c8bf3677f315d623e8f", + "resolver_info": "5.4.0", + "sha1": "9dd4ab1d52c916572f45237d4e7450abc7c19a14" + } +} \ No newline at end of file diff --git a/src/cpuid/detail/init_linux_gcc_arm.hpp b/src/cpuid/detail/init_linux_gcc_arm.hpp index 2895ac4..5f8f394 100644 --- a/src/cpuid/detail/init_linux_gcc_arm.hpp +++ b/src/cpuid/detail/init_linux_gcc_arm.hpp @@ -11,9 +11,17 @@ #include #include -#include #include +// The following includes are needed for the runtime detection of NEON +#ifdef PLATFORM_FREEBSD +// FreeBSD uses sys/auxv.h +#include +#else +// Linux uses linux/auxvec.h +#include +#endif + #include "cpuinfo_impl.hpp" namespace cpuid @@ -30,11 +38,16 @@ void init_cpuinfo(cpuinfo::impl& info) info.m_has_neon = true; #else // Runtime detection of NEON is necessary on 32-bit ARM CPUs - // + +#ifdef PLATFORM_FREEBSD + // On FreeBSD we use the elf_aux_info function to get the HWCAP + long hwcap = 0; + elf_aux_info(AT_HWCAP, &hwcap, sizeof hwcap); + info.m_has_neon = hwcap & HWCAP_NEON; +#else // Follow recommendation from Cortex-A Series Programmer's guide // in Section 20.1.7 Detecting NEON. The guide is available at // Steinwurf's Google drive: steinwurf/technical/experimental/cpuid - auto cpufile = open("/proc/self/auxv", O_RDONLY); assert(cpufile); @@ -59,6 +72,7 @@ void init_cpuinfo(cpuinfo::impl& info) info.m_has_neon = false; } #endif +#endif } } }