Skip to content

Commit c95ac83

Browse files
committed
gitian: fix x86_64 build with static libstdc++
1 parent 0671516 commit c95ac83

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

contrib/gitian-descriptors/gitian-linux.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ packages:
1515
- "faketime"
1616
- "bsdmainutils"
1717
- "binutils-gold"
18+
- "libstdc++6-4.6-pic"
1819
reference_datetime: "2013-06-01 00:00:00"
1920
remotes:
2021
- "url": "https://github.com/bitcoin/bitcoin.git"
@@ -69,6 +70,14 @@ script: |
6970
make ${MAKEOPTS} -C ${BASEPREFIX} HOST="${i}"
7071
done
7172
73+
# Ubuntu precise hack: Not an issue in later versions.
74+
# Precise's libstdc++.a is non-pic. There's an optional libstdc++6-4.6-pic
75+
# package which provides libstdc++_pic.a, but the linker can't find it.
76+
# Symlink it to a path that will be included in our link-line so that the
77+
# linker picks it up before the default libstdc++.a.
78+
# This is only necessary for 64bit.
79+
ln -s /usr/lib/gcc/x86_64-linux-gnu/4.6/libstdc++_pic.a ${BASEPREFIX}/x86_64-unknown-linux-gnu/lib/libstdc++.a
80+
7281
# Create the release tarball using (arbitrarily) the first host
7382
./autogen.sh
7483
./configure --prefix=${BASEPREFIX}/`echo "${HOSTS}" | awk '{print $1;}'`

0 commit comments

Comments
 (0)