Skip to content

Commit f17195e

Browse files
author
Jason Mobarak
committed
Add back libs/includes needed for cross compilation
1 parent 3a88447 commit f17195e

File tree

4 files changed

+29
-8
lines changed

4 files changed

+29
-8
lines changed

Dockerfile.base

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,6 @@ 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-
146

157
RUN apt-get update \
168
&& apt-get install -y build-essential \
@@ -22,6 +14,13 @@ RUN apt-get update \
2214
llvm-4.0-dev \
2315
clang-4.0 \
2416
git \
17+
g++-4.8-arm-linux-gnueabihf \
18+
gcc-4.8-arm-linux-gnueabihf \
19+
gcc-4.8-multilib-arm-linux-gnueabihf \
20+
binutils-arm-linux-gnueabihf \
21+
libgcc1-armhf-cross \
22+
libsfgcc1-armhf-cross \
23+
libstdc++6-armhf-cross \
2524
python
2625

2726
RUN git clone --depth=1 --single-branch -b llvm-4.0 https://github.com/obfuscator-llvm/obfuscator.git obfuscator-llvm

example/Makefile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
all: normal obfuscated
2+
3+
normal:
4+
clang++ test.cc -o test-cxx -I /usr/arm-linux-gnueabihf/include -L /usr/arm-linux-gnueabi/libhf -ccc-gcc-name arm-linux-gnueabihf-gcc --target=arm-linux-gnueabihf -mfloat-abi=hard -mcpu=cortex-a9 -I /usr/arm-linux-gnueabihf/include/c++/4.8.5/ -L /usr/lib/gcc-cross/arm-linux-gnueabihf/4.8/ -I /usr/arm-linux-gnueabihf/include/c++/4.8.5/arm-linux-gnueabihf
5+
clang test.c -o test-c -I /usr/arm-linux-gnueabihf/include -L /usr/arm-linux-gnueabi/libhf -ccc-gcc-name arm-linux-gnueabihf-gcc --target=arm-linux-gnueabihf -mfloat-abi=hard -mcpu=cortex-a9
6+
7+
obfuscated:
8+
clang++ test.cc -o test-cxx-obf -I /usr/arm-linux-gnueabihf/include -L /usr/arm-linux-gnueabi/libhf -ccc-gcc-name arm-linux-gnueabihf-gcc --target=arm-linux-gnueabihf -mfloat-abi=hard -mcpu=cortex-a9 -mllvm -sub -mllvm -bcf -mllvm -fla -I /usr/arm-linux-gnueabihf/include/c++/4.8.5/ -L /usr/lib/gcc-cross/arm-linux-gnueabihf/4.8/ -I /usr/arm-linux-gnueabihf/include/c++/4.8.5/arm-linux-gnueabihf
9+
clang test.c -o test-c-obf -I /usr/arm-linux-gnueabihf/include -L /usr/arm-linux-gnueabi/libhf -ccc-gcc-name arm-linux-gnueabihf-gcc --target=arm-linux-gnueabihf -mfloat-abi=hard -mcpu=cortex-a9 -mllvm -sub -mllvm -bcf -mllvm -fla

example/test.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#include <stdio.h>
2+
3+
int main(int argc, const char* argv[]) {
4+
printf("Hello World!\n");
5+
return 0;
6+
}

example/test.cc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#include <iostream>
2+
3+
int main(int argc, const char* argv[]) {
4+
5+
std::cout << "Hello World!" << std::endl;
6+
return 0;
7+
}

0 commit comments

Comments
 (0)