Skip to content

Commit

Permalink
Linux: force 'new' C++11 ABI compliance
Browse files Browse the repository at this point in the history
  • Loading branch information
lovell committed Mar 8, 2021
1 parent a1dfa09 commit 07de78c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion build/lin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,10 @@ mkdir ${TARGET}
# Overriden to performance (-O3) for select dependencies that benefit
export FLAGS+=" -Os -fPIC"

# Force "new" C++11 ABI compliance
# Allow linker to remove unused sections
if [ "$LINUX" = true ]; then
export FLAGS+=" -ffunction-sections -fdata-sections"
export FLAGS+=" -D_GLIBCXX_USE_CXX11_ABI=1 -ffunction-sections -fdata-sections"
fi

# Common build paths and flags
Expand Down
2 changes: 1 addition & 1 deletion linux-arm64v8/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ ENV \
PLATFORM="linux-arm64v8" \
CHOST="aarch64-linux-gnu" \
RUST_TARGET="aarch64-unknown-linux-gnu" \
FLAGS="-march=armv8-a -D_GLIBCXX_USE_CXX11_ABI=0" \
FLAGS="-march=armv8-a" \
MESON="--cross-file=/root/meson.ini"

COPY Toolchain.cmake /root/
Expand Down
2 changes: 1 addition & 1 deletion linux-armv6/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ ENV \
PLATFORM="linux-armv6" \
CHOST="arm-rpi-linux-gnueabihf" \
RUST_TARGET="arm-unknown-linux-gnueabihf" \
FLAGS="-marm -mcpu=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard -D_GLIBCXX_USE_CXX11_ABI=0" \
FLAGS="-marm -mcpu=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard" \
WITHOUT_NEON="true" \
MESON="--cross-file=/root/meson.ini"

Expand Down
2 changes: 1 addition & 1 deletion linux-armv7/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ ENV \
PLATFORM="linux-armv7" \
CHOST="arm-linux-gnueabihf" \
RUST_TARGET="arm-unknown-linux-gnueabihf" \
FLAGS="-marm -march=armv7-a -mfpu=neon-vfpv4 -mfloat-abi=hard -D_GLIBCXX_USE_CXX11_ABI=0" \
FLAGS="-marm -march=armv7-a -mfpu=neon-vfpv4 -mfloat-abi=hard" \
MESON="--cross-file=/root/meson.ini"

COPY Toolchain.cmake /root/
Expand Down

0 comments on commit 07de78c

Please sign in to comment.