Fix libtool archive reproducibility

This makes the order of objects in archives created by libtool
consistent.

It is known to affect cases where the *_LIBADD automake variable is
used to add extra objects from a separate archive.

Fixing this allows us to remove a few workarounds.
This commit is contained in:
Dor Askayo 2022-05-14 15:01:13 +03:00
parent 3ed5daa5aa
commit 24e3fa3601
5 changed files with 144 additions and 27 deletions

View file

@ -119,16 +119,6 @@ src_compile() {
make -C build/libstdc++-v3 PATH="${PATH}:${PWD}/build/gcc" \
CXXFLAGS="-I${PWD}/build/gcc/include -I ${PREFIX}/include"
# Fix ordering of libstdc++.a
pushd build/libstdc++-v3/src
mkdir order-a
pushd order-a
ar x ../.libs/libstdc++.a
rm ../.libs/libstdc++.a
ar cru ../.libs/libstdc++.a ./*.o
popd
popd
}
src_install() {

View file

@ -61,16 +61,4 @@ src_compile() {
# Now proceed with the build
default
# Ordering of libguile.a is messed up
mkdir libguile/.libs/order
pushd libguile/.libs/order
ar x ../libguile-3.0.a
rm ../libguile-3.0.a
ar cr ../libguile-3.0.a ./*.o
popd
# Recompile guile with fixed libguile
rm libguile/guile
make
}