Skip to content

Commit eff4a93

Browse files
committed
Fix include directory for the patch
1 parent 82f3e59 commit eff4a93

File tree

6 files changed

+30
-48
lines changed

6 files changed

+30
-48
lines changed

platforms/switch/clang-3.9.1/linux/Dockerfile

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,11 @@ RUN unzip patches.zip -d /tmp
3535
RUN mv /tmp/switch-clang-patches-${PATCH_BRANCH} /tmp/patches
3636

3737
# apply patches to clang
38-
WORKDIR /compilers/switch/clang-3.9.1
39-
RUN patch_dir="/tmp/patches/clang-3.9.1/include/c++/v1" && \
40-
if [ -d "$patch_dir" ]; then \
41-
find "$patch_dir" -type f -name '*.diff' -print0 | while IFS= read -r -d '' patch; do \
42-
echo "Applying patch: $patch"; \
43-
patch -p1 < "$patch"; \
44-
done; \
45-
fi
38+
RUN patch_dir="/tmp/patches/clang-3.9.1" && \
39+
find "$patch_dir" -type f -name '*.diff' -print0 | while IFS= read -r -d '' patch; do \
40+
echo "Applying patch: $patch"; \
41+
patch -d "/compilers/switch/clang-3.9.1" -p0 < "$patch"; \
42+
done;
4643

4744
RUN chown -R root:root /compilers/switch/clang-3.9.1/
4845

platforms/switch/clang-4.0.1/darwin/Dockerfile

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,11 @@ RUN unzip patches.zip -d /tmp
3535
RUN mv /tmp/switch-clang-patches-${PATCH_BRANCH} /tmp/patches
3636

3737
# apply patches to clang
38-
WORKDIR /compilers/switch/clang-4.0.1
39-
RUN patch_dir="/tmp/patches/clang-4.0.1/include/c++/v1" && \
40-
if [ -d "$patch_dir" ]; then \
41-
find "$patch_dir" -type f -name '*.diff' -print0 | while IFS= read -r -d '' patch; do \
42-
echo "Applying patch: $patch"; \
43-
patch -p1 < "$patch"; \
44-
done; \
45-
fi
38+
RUN patch_dir="/tmp/patches/clang-4.0.1" && \
39+
find "$patch_dir" -type f -name '*.diff' -print0 | while IFS= read -r -d '' patch; do \
40+
echo "Applying patch: $patch"; \
41+
patch -d "/compilers/switch/clang-4.0.1" -p0 < "$patch"; \
42+
done;
4643

4744
RUN chown -R root:root /compilers/switch/clang-4.0.1/
4845

platforms/switch/clang-4.0.1/linux/Dockerfile

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,11 @@ RUN unzip patches.zip -d /tmp
3535
RUN mv /tmp/switch-clang-patches-${PATCH_BRANCH} /tmp/patches
3636

3737
# apply patches to clang
38-
WORKDIR /compilers/switch/clang-4.0.1
39-
RUN patch_dir="/tmp/patches/clang-4.0.1/include/c++/v1" && \
40-
if [ -d "$patch_dir" ]; then \
41-
find "$patch_dir" -type f -name '*.diff' -print0 | while IFS= read -r -d '' patch; do \
42-
echo "Applying patch: $patch"; \
43-
patch -p1 < "$patch"; \
44-
done; \
45-
fi
38+
RUN patch_dir="/tmp/patches/clang-4.0.1" && \
39+
find "$patch_dir" -type f -name '*.diff' -print0 | while IFS= read -r -d '' patch; do \
40+
echo "Applying patch: $patch"; \
41+
patch -d "/compilers/switch/clang-4.0.1" -p0 < "$patch"; \
42+
done;
4643

4744
RUN chown -R root:root /compilers/switch/clang-4.0.1/
4845

platforms/switch/clang-8.0.0/darwin/Dockerfile

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,11 @@ RUN unzip patches.zip -d /tmp
3535
RUN mv /tmp/switch-clang-patches-${PATCH_BRANCH} /tmp/patches
3636

3737
# apply patches to clang
38-
WORKDIR /compilers/switch/clang-8.0.0
39-
RUN patch_dir="/tmp/patches/clang-8.0.0/include/c++/v1" && \
40-
if [ -d "$patch_dir" ]; then \
41-
find "$patch_dir" -type f -name '*.diff' -print0 | while IFS= read -r -d '' patch; do \
42-
echo "Applying patch: $patch"; \
43-
patch -p1 < "$patch"; \
44-
done; \
45-
fi
38+
RUN patch_dir="/tmp/patches/clang-8.0.0" && \
39+
find "$patch_dir" -type f -name '*.diff' -print0 | while IFS= read -r -d '' patch; do \
40+
echo "Applying patch: $patch"; \
41+
patch -d "/compilers/switch/clang-8.0.0" -p0 < "$patch"; \
42+
done;
4643

4744
RUN chown -R root:root /compilers/switch/clang-8.0.0/
4845

platforms/switch/clang-8.0.0/linux/Dockerfile

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,11 @@ RUN unzip patches.zip -d /tmp
3535
RUN mv /tmp/switch-clang-patches-${PATCH_BRANCH} /tmp/patches
3636

3737
# apply patches to clang
38-
WORKDIR /compilers/switch/clang-8.0.0
39-
RUN patch_dir="/tmp/patches/clang-8.0.0/include/c++/v1" && \
40-
if [ -d "$patch_dir" ]; then \
41-
find "$patch_dir" -type f -name '*.diff' -print0 | while IFS= read -r -d '' patch; do \
42-
echo "Applying patch: $patch"; \
43-
patch -p1 < "$patch"; \
44-
done; \
45-
fi
38+
RUN patch_dir="/tmp/patches/clang-8.0.0" && \
39+
find "$patch_dir" -type f -name '*.diff' -print0 | while IFS= read -r -d '' patch; do \
40+
echo "Applying patch: $patch"; \
41+
patch -d "/compilers/switch/clang-8.0.0" -p0 < "$patch"; \
42+
done;
4643

4744
RUN chown -R root:root /compilers/switch/clang-8.0.0/
4845

templates/switch/clang.j2

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,11 @@ RUN unzip patches.zip -d /tmp
3434
RUN mv /tmp/switch-clang-patches-${PATCH_BRANCH} /tmp/patches
3535

3636
# apply patches to clang
37-
WORKDIR /compilers/{{ platform }}/{{ id }}
38-
RUN patch_dir="/tmp/patches/{{ id }}/include/c++/v1" && \
39-
if [ -d "$patch_dir" ]; then \
40-
find "$patch_dir" -type f -name '*.diff' -print0 | while IFS= read -r -d '' patch; do \
41-
echo "Applying patch: $patch"; \
42-
patch -p1 < "$patch"; \
43-
done; \
44-
fi
37+
RUN patch_dir="/tmp/patches/{{ id }}" && \
38+
find "$patch_dir" -type f -name '*.diff' -print0 | while IFS= read -r -d '' patch; do \
39+
echo "Applying patch: $patch"; \
40+
patch -d "/compilers/{{ platform }}/{{ id }}" -p0 < "$patch"; \
41+
done;
4542

4643
RUN chown -R root:root /compilers/{{ platform }}/{{ id }}/
4744

0 commit comments

Comments
 (0)