Skip to content

Commit 6611136

Browse files
committed
Merge branch 'master' into asap7_grt_config
2 parents b42438c + 4e81220 commit 6611136

File tree

3 files changed

+30
-4
lines changed

3 files changed

+30
-4
lines changed

.dockerignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ flow/reports
1010
flow/objects
1111
flow/tech
1212

13+
bazel-bin/
14+
bazel-obj/
15+
bazel-OpenROAD-flow-scripts/
16+
bazel-testlogs/
17+
1318
# Tar archives
1419
flow/*tar.gz
1520
flow/run-me*.sh

docker/Dockerfile.builder

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,23 @@ COPY --link build_openroad.sh build_openroad.sh
1515
1616
FROM orfs-base AS orfs-builder-base
1717
18+
# Inject compiler wrapper scripts that append the macros
19+
RUN mkdir -p /usr/local/bin/wrapped-cc && \
20+
echo '#!/bin/sh' > /usr/local/bin/wrapped-cc/gcc && \
21+
echo 'exec /usr/bin/gcc -D__TIME__="\"0\"" -D__DATE__="\"0\"" -D__TIMESTAMP__="\"0\"" -Wno-builtin-macro-redefined "$@"' >> /usr/local/bin/wrapped-cc/gcc && \
22+
chmod +x /usr/local/bin/wrapped-cc/gcc && \
23+
ln -s /usr/local/bin/wrapped-cc/gcc /usr/local/bin/wrapped-cc/cc && \
24+
echo '#!/bin/sh' > /usr/local/bin/wrapped-cc/g++ && \
25+
echo 'exec /usr/bin/g++ -D__TIME__="\"0\"" -D__DATE__="\"0\"" -D__TIMESTAMP__="\"0\"" -Wno-builtin-macro-redefined "$@"' >> /usr/local/bin/wrapped-cc/g++ && \
26+
chmod +x /usr/local/bin/wrapped-cc/g++
27+
28+
# Prepend wrapper directory to PATH so they override system compilers
29+
ENV PATH="/usr/local/bin/wrapped-cc:$PATH"
30+
1831
COPY --link tools tools
1932
ARG numThreads=$(nproc)
2033

2134
RUN echo "" > tools/yosys/abc/.gitcommit && \
22-
env CFLAGS="-Wno-builtin-macro-redefined" \
23-
CXXFLAGS="-Wno-builtin-macro-redefined" \
2435
./build_openroad.sh --no_init --local --threads ${numThreads}
2536

2637
FROM orfs-base

docker/Dockerfile.dev

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,18 @@ COPY InstallerOpenROAD.sh \
1515
ARG options=""
1616
ARG constantBuildDir="-constant-build-dir"
1717

18-
ENV CFLAGS="-Wno-builtin-macro-redefined"
19-
ENV CXXFLAGS="-Wno-builtin-macro-redefined"
18+
# add compiler wrapper scripts
19+
# inject the macro definitions during compilation only
20+
RUN mkdir -p /usr/local/bin/wrapped-cc && \
21+
echo '#!/bin/sh' > /usr/local/bin/wrapped-cc/gcc && \
22+
echo 'exec /usr/bin/gcc -D__TIME__="\"0\"" -D__DATE__="\"0\"" -D__TIMESTAMP__="\"0\"" -Wno-builtin-macro-redefined "$@"' >> /usr/local/bin/wrapped-cc/gcc && \
23+
chmod +x /usr/local/bin/wrapped-cc/gcc && \
24+
ln -s /usr/local/bin/wrapped-cc/gcc /usr/local/bin/wrapped-cc/cc && \
25+
echo '#!/bin/sh' > /usr/local/bin/wrapped-cc/g++ && \
26+
echo 'exec /usr/bin/g++ -D__TIME__="\"0\"" -D__DATE__="\"0\"" -D__TIMESTAMP__="\"0\"" -Wno-builtin-macro-redefined "$@"' >> /usr/local/bin/wrapped-cc/g++ && \
27+
chmod +x /usr/local/bin/wrapped-cc/g++
28+
29+
ENV PATH="/usr/local/bin/wrapped-cc:$PATH"
2030

2131
RUN ./DependencyInstaller.sh -base $options $constantBuildDir \
2232
&& ./DependencyInstaller.sh -common $options $constantBuildDir \

0 commit comments

Comments
 (0)