Skip to content

Commit 4ab86f3

Browse files
Fixes for aarch64 build (#474)
1 parent f1514ba commit 4ab86f3

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ Then you need to install 32-bit libstdc++ headers and libraries. On a Debian/Ubu
170170
```sh
171171
sudo dpkg --add-architecture i386
172172
sudo apt-get update
173-
sudo apt-get install libc6-dev:i386 install libstdc++-10-dev:i386 g++-multilib
173+
sudo apt-get install libc6-dev:i386 libstdc++-10-dev:i386 g++-multilib
174174
```
175175

176176
This error happens because the SPARC32 runtime semantics (the bitcode library which lives in `<install directory>/share/remill/<version>/semantics/sparc32.bc`) are built as 32-bit code, but 32-bit development libraries are not installed by default.

tests/AArch64/CMakeLists.txt

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,14 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
find_package(gtest REQUIRED)
16-
17-
# google gtest
18-
find_package(gtest REQUIRED)
19-
list(APPEND PROJECT_LIBRARIES ${gtest_LIBRARIES})
20-
list(APPEND PROJECT_INCLUDEDIRECTORIES ${gtest_INCLUDE_DIRS})
15+
if (DEFINED ENV{TRAILOFBITS_LIBRARIES})
16+
find_package(gtest REQUIRED)
17+
list(APPEND PROJECT_LIBRARIES ${gtest_LIBRARIES})
18+
list(APPEND PROJECT_INCLUDEDIRECTORIES ${gtest_INCLUDE_DIRS})
19+
else()
20+
find_package(GTest CONFIG REQUIRED)
21+
list(APPEND PROJECT_LIBRARIES GTest::gtest)
22+
endif()
2123

2224
enable_testing()
2325
enable_language(ASM)

0 commit comments

Comments
 (0)