Skip to content

Commit 7b6d96e

Browse files
author
Jason Mobarak
committed
Oops, generate something that runs on x86, but generates arm
1 parent c03217f commit 7b6d96e

File tree

3 files changed

+17
-11
lines changed

3 files changed

+17
-11
lines changed

Dockerfile.base

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,21 @@ FROM ubuntu:16.04
33
RUN mkdir /work
44
WORKDIR /work
55

6+
# g++-4.8-arm-linux-gnueabihf \
7+
# gcc-4.8-arm-linux-gnueabihf \
8+
# gcc-4.8-multilib-arm-linux-gnueabihf \
9+
# binutils-arm-linux-gnueabihf \
10+
# libgcc1-armhf-cross \
11+
# libsfgcc1-armhf-cross \
12+
# libstdc++6-armhf-cross \
13+
14+
615
RUN apt-get update \
716
&& apt-get install -y build-essential \
817
bison \
918
flex \
1019
cmake \
1120
ninja-build \
12-
g++-4.8-arm-linux-gnueabihf \
13-
gcc-4.8-arm-linux-gnueabihf \
14-
gcc-4.8-multilib-arm-linux-gnueabihf \
15-
binutils-arm-linux-gnueabihf \
16-
libgcc1-armhf-cross \
17-
libsfgcc1-armhf-cross \
18-
libstdc++6-armhf-cross \
1921
llvm-4.0 \
2022
llvm-4.0-dev \
2123
clang-4.0 \

build.bash

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,21 @@
33
mkdir -p build
44
mkdir -p output/opt
55

6+
#-DCMAKE_CROSSCOMPILING=True \
7+
#-DCMAKE_CXX_FLAGS='-march=armv7-a -mcpu=cortex-a9 -mfloat-abi=hard -DENDIAN_LITTLE=1' \
8+
#-DCMAKE_C_COMPILER=/usr/bin/arm-linux-gnueabihf-gcc-4.8 \
9+
610
CMAKE_COMMAND="\
711
cmake -G Ninja \
812
/work/obfuscator-llvm \
9-
-DCMAKE_CROSSCOMPILING=True \
1013
-DCMAKE_INSTALL_PREFIX=/opt/llvm-obfuscator \
1114
-DLLVM_TABLEGEN=/usr/bin/llvm-tblgen-4.0 \
1215
-DCLANG_TABLEGEN=/usr/bin/clang-tblgen-4.0 \
1316
-DLLVM_DEFAULT_TARGET_TRIPLE=arm-linux-gnueabihf \
1417
-DLLVM_TARGET_ARCH=ARM \
1518
-DLLVM_TARGETS_TO_BUILD=ARM \
16-
-DCMAKE_CXX_FLAGS='-march=armv7-a -mcpu=cortex-a9 -mfloat-abi=hard -DENDIAN_LITTLE=1' \
17-
-DCMAKE_C_COMPILER=/usr/bin/arm-linux-gnueabihf-gcc-4.8 \
19+
-DCMAKE_CXX_FLAGS='-DENDIAN_LITTLE=1' \
20+
-DCMAKE_C_COMPILER=/usr/bin/gcc \
1821
-DCMAKE_CXX_COMPILER=/bin/cpp_wrapper.py \
1922
-DCMAKE_BUILD_TYPE=Release \
2023
-DLLVM_INCLUDE_TESTS=OFF"

cpp_wrapper.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
import os
44
import sys
55

6-
cpp_path = "/usr/bin/arm-linux-gnueabihf-g++-4.8"
6+
#cpp_path = "/usr/bin/arm-linux-gnueabihf-g++-4.8"
7+
cpp_path = "/usr/bin/g++"
78

89
new_argv = sys.argv[:]
910
new_argv[0] = cpp_path

0 commit comments

Comments
 (0)