Skip to content

Commit

Permalink
build: fix qemu-user-static to really be static
Browse files Browse the repository at this point in the history
Since qemu 5.0 qemu-user-static is no more "fully static" due to the usage
of --static-pie since [1]. They are static in regard to e.g. ldd, but
they are a dynamic pie executable and thereby need glibc to match.

[1]: https://git.qemu.org/?p=qemu.git;a=commit;h=12781462

Change-type: patch
Connects-to: #21
Signed-off-by: Kyle Harding <[email protected]>
  • Loading branch information
klutchell committed Feb 5, 2021
1 parent b911004 commit a25890c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Dockerfile.build
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ COPY . /usr/src/qemu


ARG TARGET_ARCH=arm-linux-user
RUN ./configure --target-list=$TARGET_ARCH --static --extra-cflags="-DCONFIG_RTNETLINK"
RUN ./configure --target-list=$TARGET_ARCH --static --disable-pie --extra-cflags="-DCONFIG_RTNETLINK"

RUN make -j $(nproc)
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ for TARGET in $TARGETS; do
BINARY_NAME="qemu-$TARGET-static"
PACKAGE_NAME="qemu-$QEMU_VERSION-$TARGET"

./configure --target-list="$TARGET-linux-user" --static --extra-cflags="-DCONFIG_RTNETLINK" \
./configure --target-list="$TARGET-linux-user" --static --disable-pie --extra-cflags="-DCONFIG_RTNETLINK" \
&& make -j $(nproc) \
&& strip "build/$TARGET-linux-user/qemu-$TARGET" \
&& mkdir -p "$PACKAGE_NAME" \
Expand Down

0 comments on commit a25890c

Please sign in to comment.