Skip to content

Commit

Permalink
Revert "update pahole and elfutils (#899)"
Browse files Browse the repository at this point in the history
This reverts commit 8b74dfc.
  • Loading branch information
mattgodbolt committed Dec 16, 2022
1 parent c02242e commit 033dd85
Showing 1 changed file with 41 additions and 34 deletions.
75 changes: 41 additions & 34 deletions update_compilers/install_binaries.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,40 +8,47 @@ DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"

#########################
# pahole
PAHOLE_INSTALL_DIR=$OPT/pahole

## install elfutils for libelf and libdwarf
ELFUTILS_VERSION=0.188
rm -Rf /tmp/elfutils-$ELFUTILS_VERSION
fetch https://sourceware.org/elfutils/ftp/$ELFUTILS_VERSION/elfutils-$ELFUTILS_VERSION.tar.bz2 | tar jxf - -C /tmp/
pushd /tmp/elfutils-$ELFUTILS_VERSION
./configure --prefix="$PAHOLE_INSTALL_DIR" --program-prefix="eu-" --enable-deterministic-archives --disable-debuginfod --disable-libdebuginfod
make "-j$(nproc)"
make install
popd
rm -Rf /tmp/elfutils-$ELFUTILS_VERSION

## cleanup before build
PAHOLE_BUILD_DIR=/tmp/build/pahole
rm -rf $PAHOLE_BUILD_DIR
mkdir -p $PAHOLE_BUILD_DIR
pushd $PAHOLE_BUILD_DIR

## download and install
git clone --branch master --single-branch -q https://git.kernel.org/pub/scm/devel/pahole/pahole.git pahole
pushd pahole
git submodule sync
git submodule update --init
"${OPT}/cmake/bin/cmake" \
-D CMAKE_INSTALL_PREFIX:PATH="$PAHOLE_INSTALL_DIR" \
-D__LIB=lib \
-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE \
.
make "-j$(nproc)"
make install
popd
popd
rm -rf $PAHOLE_BUILD_DIR

TARGET_PAHOLE_VERSION=v1.19
CURRENT_PAHOLE_VERSION=""
if [[ -f "${OPT}/pahole/bin/pahole" ]]; then
CURRENT_PAHOLE_VERSION=$("${OPT}/pahole/bin/pahole" --version)
fi

if [[ "$TARGET_PAHOLE_VERSION" != "$CURRENT_PAHOLE_VERSION" ]]; then
rm -Rf "${OPT}/pahole"
mkdir -p "${OPT}/pahole"

mkdir -p /tmp/build
pushd /tmp/build

# Install elfutils for libelf and libdwarf
fetch https://sourceware.org/elfutils/ftp/0.182/elfutils-0.182.tar.bz2 | tar jxf -
pushd elfutils-0.182
./configure --prefix=/opt/compiler-explorer/pahole --program-prefix="eu-" --enable-deterministic-archives --disable-debuginfod --disable-libdebuginfod
make "-j$(nproc)"
make install
popd

rm -Rf /tmp/build/pahole

git clone -q https://git.kernel.org/pub/scm/devel/pahole/pahole.git pahole
git -C pahole checkout v1.19
git -C pahole submodule sync
git -C pahole submodule update --init
pushd pahole
"${OPT}/cmake/bin/cmake" \
-D CMAKE_INSTALL_PREFIX:PATH="${OPT}/pahole" \
-D__LIB=lib \
-DCMAKE_INSTALL_RPATH_USE_LINK_PATH=TRUE \
.
make "-j$(nproc)"
make install
popd

popd
rm -rf /tmp/build
fi

#########################
# x86-to-6502 old version
Expand Down

0 comments on commit 033dd85

Please sign in to comment.