Building full gcc-3.3 on Trusty from deb-src
In Ubuntu Trusty there is a source package for gcc-3.3 which only builds libstdc++5.
Is there a way to build the corresponding gcc and g++ deb files to share or install the dpkg -i
way?
debian ubuntu-14.04 gcc
add a comment |
In Ubuntu Trusty there is a source package for gcc-3.3 which only builds libstdc++5.
Is there a way to build the corresponding gcc and g++ deb files to share or install the dpkg -i
way?
debian ubuntu-14.04 gcc
add a comment |
In Ubuntu Trusty there is a source package for gcc-3.3 which only builds libstdc++5.
Is there a way to build the corresponding gcc and g++ deb files to share or install the dpkg -i
way?
debian ubuntu-14.04 gcc
In Ubuntu Trusty there is a source package for gcc-3.3 which only builds libstdc++5.
Is there a way to build the corresponding gcc and g++ deb files to share or install the dpkg -i
way?
debian ubuntu-14.04 gcc
debian ubuntu-14.04 gcc
edited Dec 31 '18 at 18:41
user866830
asked Dec 31 '18 at 18:26
user866830user866830
313
313
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
Yes, you may use the bash snippet and patch below. It was tested using trusty on amd64 but may work with later revisions of ubuntu as well. It sucessfully compiled a legacy qemu 0.9 version from 2007 here.
gcc-3.3_3.3.6ds1_reenable_full_deb_pkgs_build.patch
# decode gcc-3.3_3.3.6ds1_reenable_full_deb_pkgs_build.patch
# (contains hard tabs which are unsupported by markdown)
cat <<EOF | uudecode
begin-base64-encoded 664 Z2NjLTMuM18zLjMuNmRzMV9yZWVuYWJsZV9mdWxsX2RlYl9wa2dzX2J1aWxkLnBhdGNo
VGhpcyBwYXRjaCByZWVuYWJsZXMgZGViIHBrZyBidWlsZGluZyBvZiBnY2Mg
YW5kIGcrKyBhbmQgb3RoZXJzCmluIGdjYy0zLjMtMy4zLjZkczEtMTZ1YnVu
dHUqIChhbmQgbGF0ZXIpIHNvdXJjZSBwYWNrYWdlcy4KCiMgZmV0Y2ggZ2Nj
IHNvdXJjZSB1c2luZyB3Z2V0IGFuZCB1bnBhY2sgLi4KREVCU1JDPWh0dHA6
Ly9hcmNoaXZlLnVidW50dS5jb20v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LS0tLS0tLS0t
LS0tCiAjIGdjYy1iYXNlCi0tLSBnY2MtMy4zLTMuMy42ZHMxL2RlYmlhbi9y
dWxlcy5kL2JpbmFyeS1nY2MubWsKKysrIGdjYy0zLjMtMy4zLjZkczEvZGVi
aWFuL3J1bGVzLmQvYmluYXJ5LWdjYy5tawpAQCAtODUsNiArODUsOSBAQAog
CiAJcm0gLWYgJChkKS8kKFBGKS8kKGxpYmRpcikvbGliZ2NjX3Muc28KIAls
biAtc2YgLyQobGliZGlyKS9saWJnY2Nfcy5zby4kKEdDQ19TT05BTUUpICQo
ZCkvJChnY2NfbGliX2RpcikvbGliZ2NjX3Muc28KKwlsbiAtc2YgL3Vzci8k
KGxpYmRpcikvY3J0MS5vICQoZCkvJChnY2NfbGliX2RpcikvY3J0MS5vCisJ
bG4gLXNmIC91c3IvJChsaWJkaXIpL2NydGkubyAkKGQpLyQoZ2NjX2xpYl9k
aXIpL2NydGkubworCWxuIC1zZiAvdXNyLyQobGliZGlyKS9jcnRuLm8gJChk
KS8kKGdjY19saWJfZGlyKS9jcnRuLm8KIGlmZXEgKCQoYmlhcmNoKSx5ZXMp
CiAJcm0gLWYgJChkKS8kKFBGKS8kKGxpYjY0KS9saWJnY2Nfcy5zbwogCWxu
IC1zZiAvJChsaWI2NCkvbGliZ2NjX3Muc28uJChHQ0NfU09OQU1FKSAkKGQp
LyQoZ2NjX2xpYl9kaXIpL2xpYmdjY19zXzY0LnNvCg==
====
EOF
bash snippet
# fetch gcc source using wget and unpack ..
DEBSRC=http://archive.ubuntu.com/ubuntu/pool/universe/
VB=gcc-3.3_3.3.6ds1
VP=24ubuntu5
wget --no-check-certificate $DEBSRC/g/gcc-3.3/$VB.orig.tar.gz
wget --no-check-certificate $DEBSRC/g/gcc-3.3/$VB-$VP.diff.gz
wget --no-check-certificate $DEBSRC/g/gcc-3.3/$VB-$VP.dsc
dpkg-source -x $VB-$VP.dsc
# .. alternatively, if you have deb-src set up in sources.list
#apt-get source gcc-3.3
# reenable deb pkg building
cd gcc-3.3*/
patch -p1 < ../gcc-3.3_3.3.6ds1_reenable_full_deb_pkgs_build.patch
# fix dh_movefiles wildcard globbing
# (cmdline param glob works only with DH_COMPAT=2)
for f in debian/rules.d/binary-*.mk
do sed -i -e 's/dh_movefiles/DH_COMPAT=2 /' $f
done
# compile and build deb packages
debian/rules control
debuild clean
debuild -uc -us
cd ..
# install results
sudo dpkg -i {cpp,gcc,g++}-3.3*.deb libstdc++5{_3.3.6,-3.3-dev}*.deb
Do not install libgcc1_3.3.6*deb
. It may conflict with the version already installed on your host and it is not needed for gcc-3.3 to work, because a libgcc_s.so
present on the host is symbolically linked to. The same is true for crtn.o
. crti.o
and crt1.o
. gcc-3.3 needs these when linking the built objects, i.e. when ld
is called. They are part of libc6 package (here). The build process will install links below /usr/lib/gcc-lib/x86_64-linux-gnu/3.3.6/
(host triplet x86_64-linux-gnu
may be different on your system) to let ld
discover the libc6 versions installed.
You should not need to change any of this, but if you need to adjust these links to your likings, you can modify them before deb packages are built. Have a look at the end of the supplied patch file. The relevant file for such changes is debian/rules.d/binary-gcc.mk
.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1389351%2fbuilding-full-gcc-3-3-on-trusty-from-deb-src%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Yes, you may use the bash snippet and patch below. It was tested using trusty on amd64 but may work with later revisions of ubuntu as well. It sucessfully compiled a legacy qemu 0.9 version from 2007 here.
gcc-3.3_3.3.6ds1_reenable_full_deb_pkgs_build.patch
# decode gcc-3.3_3.3.6ds1_reenable_full_deb_pkgs_build.patch
# (contains hard tabs which are unsupported by markdown)
cat <<EOF | uudecode
begin-base64-encoded 664 Z2NjLTMuM18zLjMuNmRzMV9yZWVuYWJsZV9mdWxsX2RlYl9wa2dzX2J1aWxkLnBhdGNo
VGhpcyBwYXRjaCByZWVuYWJsZXMgZGViIHBrZyBidWlsZGluZyBvZiBnY2Mg
YW5kIGcrKyBhbmQgb3RoZXJzCmluIGdjYy0zLjMtMy4zLjZkczEtMTZ1YnVu
dHUqIChhbmQgbGF0ZXIpIHNvdXJjZSBwYWNrYWdlcy4KCiMgZmV0Y2ggZ2Nj
IHNvdXJjZSB1c2luZyB3Z2V0IGFuZCB1bnBhY2sgLi4KREVCU1JDPWh0dHA6
Ly9hcmNoaXZlLnVidW50dS5jb20vdWJ1bnR1L3Bvb2wvdW5pdmVyc2UvClZC
PWdjYy0zLjNfMy4zLjZkczEKVlA9MjV1YnVudHU0CndnZXQgLS1uby1jaGVj
ay1jZXJ0aWZpY2F0ZSAkREVCU1JDL2cvZ2NjL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i
aWFuL3J1bGVzLmQvYmluYXJ5LWdjYy5tawpAQCAtODUsNiArODUsOSBAQAog
CiAJcm0gLWYgJChkKS8kKFBGKS8kKGxpYmRpcikvbGliZ2NjX3Muc28KIAls
biAtc2YgLyQobGliZGlyKS9saWJnY2Nfcy5zby4kKEdDQ19TT05BTUUpICQo
ZCkvJChnY2NfbGliX2RpcikvbGliZ2NjX3Muc28KKwlsbiAtc2YgL3Vzci8k
KGxpYmRpcikvY3J0MS5vICQoZCkvJChnY2NfbGliX2RpcikvY3J0MS5vCisJ
bG4gLXNmIC91c3IvJChsaWJkaXIpL2NydGkubyAkKGQpLyQoZ2NjX2xpYl9k
aXIpL2NydGkubworCWxuIC1zZiAvdXNyLyQobGliZGlyKS9jcnRuLm8gJChk
KS8kKGdjY19saWJfZGlyKS9jcnRuLm8KIGlmZXEgKCQoYmlhcmNoKSx5ZXMp
CiAJcm0gLWYgJChkKS8kKFBGKS8kKGxpYjY0KS9saWJnY2Nfcy5zbwogCWxu
IC1zZiAvJChsaWI2NCkvbGliZ2NjX3Muc28uJChHQ0NfU09OQU1FKSAkKGQp
LyQoZ2NjX2xpYl9kaXIpL2xpYmdjY19zXzY0LnNvCg==
====
EOF
bash snippet
# fetch gcc source using wget and unpack ..
DEBSRC=http://archive.ubuntu.com/ubuntu/pool/universe/
VB=gcc-3.3_3.3.6ds1
VP=24ubuntu5
wget --no-check-certificate $DEBSRC/g/gcc-3.3/$VB.orig.tar.gz
wget --no-check-certificate $DEBSRC/g/gcc-3.3/$VB-$VP.diff.gz
wget --no-check-certificate $DEBSRC/g/gcc-3.3/$VB-$VP.dsc
dpkg-source -x $VB-$VP.dsc
# .. alternatively, if you have deb-src set up in sources.list
#apt-get source gcc-3.3
# reenable deb pkg building
cd gcc-3.3*/
patch -p1 < ../gcc-3.3_3.3.6ds1_reenable_full_deb_pkgs_build.patch
# fix dh_movefiles wildcard globbing
# (cmdline param glob works only with DH_COMPAT=2)
for f in debian/rules.d/binary-*.mk
do sed -i -e 's/dh_movefiles/DH_COMPAT=2 /' $f
done
# compile and build deb packages
debian/rules control
debuild clean
debuild -uc -us
cd ..
# install results
sudo dpkg -i {cpp,gcc,g++}-3.3*.deb libstdc++5{_3.3.6,-3.3-dev}*.deb
Do not install libgcc1_3.3.6*deb
. It may conflict with the version already installed on your host and it is not needed for gcc-3.3 to work, because a libgcc_s.so
present on the host is symbolically linked to. The same is true for crtn.o
. crti.o
and crt1.o
. gcc-3.3 needs these when linking the built objects, i.e. when ld
is called. They are part of libc6 package (here). The build process will install links below /usr/lib/gcc-lib/x86_64-linux-gnu/3.3.6/
(host triplet x86_64-linux-gnu
may be different on your system) to let ld
discover the libc6 versions installed.
You should not need to change any of this, but if you need to adjust these links to your likings, you can modify them before deb packages are built. Have a look at the end of the supplied patch file. The relevant file for such changes is debian/rules.d/binary-gcc.mk
.
add a comment |
Yes, you may use the bash snippet and patch below. It was tested using trusty on amd64 but may work with later revisions of ubuntu as well. It sucessfully compiled a legacy qemu 0.9 version from 2007 here.
gcc-3.3_3.3.6ds1_reenable_full_deb_pkgs_build.patch
# decode gcc-3.3_3.3.6ds1_reenable_full_deb_pkgs_build.patch
# (contains hard tabs which are unsupported by markdown)
cat <<EOF | uudecode
begin-base64-encoded 664 Z2NjLTMuM18zLjMuNmRzMV9yZWVuYWJsZV9mdWxsX2RlYl9wa2dzX2J1aWxkLnBhdGNo
VGhpcyBwYXRjaCByZWVuYWJsZXMgZGViIHBrZyBidWlsZGluZyBvZiBnY2Mg
YW5kIGcrKyBhbmQgb3RoZXJzCmluIGdjYy0zLjMtMy4zLjZkczEtMTZ1YnVu
dHUqIChhbmQgbGF0ZXIpIHNvdXJjZSBwYWNrYWdlcy4KCiMgZmV0Y2ggZ2Nj
IHNvdXJjZSB1c2luZyB3Z2V0IGFuZCB1bnBhY2sgLi4KREVCU1JDPWh0dHA6
Ly9hcmNoaXZlLnVidW50dS5jb20vdWJ1bnR1L3Bvb2wvdW5pdmVyc2UvClZC
PWdjYy0zLj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tMy4zLTMuMy42ZHMxL2RlYmlhbi9y
dWxlcy5kL2JpbmFyeS1nY2MubWsKKysrIGdjYy0zLjMtMy4zLjZkczEvZGVi
aWFuL3J1bGVzLmQvYmluYXJ5LWdjYy5tawpAQCAtODUsNiArODUsOSBAQAog
CiAJcm0gLWYgJChkKS8kKFBGKS8kKGxpYmRpcikvbGliZ2NjX3Muc28KIAls
biAtc2YgLyQobGliZGlyKS9saWJnY2Nfcy5zby4kKEdDQ19TT05BTUUpICQo
ZCkvJChnY2NfbGliX2RpcikvbGliZ2NjX3Muc28KKwlsbiAtc2YgL3Vzci8k
KGxpYmRpcikvY3J0MS5vICQoZCkvJChnY2NfbGliX2RpcikvY3J0MS5vCisJ
bG4gLXNmIC91c3IvJChsaWJkaXIpL2NydGkubyAkKGQpLyQoZ2NjX2xpYl9k
aXIpL2NydGkubworCWxuIC1zZiAvdXNyLyQobGliZGlyKS9jcnRuLm8gJChk
KS8kKGdjY19saWJfZGlyKS9jcnRuLm8KIGlmZXEgKCQoYmlhcmNoKSx5ZXMp
CiAJcm0gLWYgJChkKS8kKFBGKS8kKGxpYjY0KS9saWJnY2Nfcy5zbwogCWxu
IC1zZiAvJChsaWI2NCkvbGliZ2NjX3Muc28uJChHQ0NfU09OQU1FKSAkKGQp
LyQoZ2NjX2xpYl9kaXIpL2xpYmdjY19zXzY0LnNvCg==
====
EOF
bash snippet
# fetch gcc source using wget and unpack ..
DEBSRC=http://archive.ubuntu.com/ubuntu/pool/universe/
VB=gcc-3.3_3.3.6ds1
VP=24ubuntu5
wget --no-check-certificate $DEBSRC/g/gcc-3.3/$VB.orig.tar.gz
wget --no-check-certificate $DEBSRC/g/gcc-3.3/$VB-$VP.diff.gz
wget --no-check-certificate $DEBSRC/g/gcc-3.3/$VB-$VP.dsc
dpkg-source -x $VB-$VP.dsc
# .. alternatively, if you have deb-src set up in sources.list
#apt-get source gcc-3.3
# reenable deb pkg building
cd gcc-3.3*/
patch -p1 < ../gcc-3.3_3.3.6ds1_reenable_full_deb_pkgs_build.patch
# fix dh_movefiles wildcard globbing
# (cmdline param glob works only with DH_COMPAT=2)
for f in debian/rules.d/binary-*.mk
do sed -i -e 's/dh_movefiles/DH_COMPAT=2 /' $f
done
# compile and build deb packages
debian/rules control
debuild clean
debuild -uc -us
cd ..
# install results
sudo dpkg -i {cpp,gcc,g++}-3.3*.deb libstdc++5{_3.3.6,-3.3-dev}*.deb
Do not install libgcc1_3.3.6*deb
. It may conflict with the version already installed on your host and it is not needed for gcc-3.3 to work, because a libgcc_s.so
present on the host is symbolically linked to. The same is true for crtn.o
. crti.o
and crt1.o
. gcc-3.3 needs these when linking the built objects, i.e. when ld
is called. They are part of libc6 package (here). The build process will install links below /usr/lib/gcc-lib/x86_64-linux-gnu/3.3.6/
(host triplet x86_64-linux-gnu
may be different on your system) to let ld
discover the libc6 versions installed.
You should not need to change any of this, but if you need to adjust these links to your likings, you can modify them before deb packages are built. Have a look at the end of the supplied patch file. The relevant file for such changes is debian/rules.d/binary-gcc.mk
.
add a comment |
Yes, you may use the bash snippet and patch below. It was tested using trusty on amd64 but may work with later revisions of ubuntu as well. It sucessfully compiled a legacy qemu 0.9 version from 2007 here.
gcc-3.3_3.3.6ds1_reenable_full_deb_pkgs_build.patch
# decode gcc-3.3_3.3.6ds1_reenable_full_deb_pkgs_build.patch
# (contains hard tabs which are unsupported by markdown)
cat <<EOF | uudecode
begin-base64-encoded 664 Z2NjLTMuM18zLjMuNmRzMV9yZWVuYWJsZV9mdWxsX2RlYl9wa2dzX2J1aWxkLnBhdGNo
VGhpcyBwYXRjaCByZWVuYWJsZXMgZGViIHBrZyBidWlsZGluZyBvZiBnY2Mg
YW5kIGcrKyBhbmQgb3RoZXJzCmluIGdjYy0zLjMtMy4zLjZkczEtMTZ1YnVu
dHUqIChhbmQgbGF0ZXIpIHNvdXJjZSBwYWNrYWdlcy4KCiMgZmV0Y2ggZ2Nj
IHNvdXJjZSB1c2luZyB3Z2V0IGFuZCB1bnBhY2sgLi4K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0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t
LS0tCiAjIGdjYy1iYXNlCi0tLSBnY2MtMy4zLTMuMy42ZHMxL2RlYmlhbi9y
dWxlcy5kL2JpbmFyeS1nY2MubWsKKysrIGdjYy0zLjMtMy4zLjZkczEvZGVi
aWFuL3J1bGVzLmQvYmluYXJ5LWdjYy5tawpAQCAtODUsNiArODUsOSBAQAog
CiAJcm0gLWYgJChkKS8kKFBGKS8kKGxpYmRpcikvbGliZ2NjX3Muc28KIAls
biAtc2YgLyQobGliZGlyKS9saWJnY2Nfcy5zby4kKEdDQ19TT05BTUUpICQo
ZCkvJChnY2NfbGliX2RpcikvbGliZ2NjX3Muc28KKwlsbiAtc2YgL3Vzci8k
KGxpYmRpcikvY3J0MS5vICQoZCkvJChnY2NfbGliX2RpcikvY3J0MS5vCisJ
bG4gLXNmIC91c3IvJChsaWJkaXIpL2NydGkubyAkKGQpLyQoZ2NjX2xpYl9k
aXIpL2NydGkubworCWxuIC1zZiAvdXNyLyQobGliZGlyKS9jcnRuLm8gJChk
KS8kKGdjY19saWJfZGlyKS9jcnRuLm8KIGlmZXEgKCQoYmlhcmNoKSx5ZXMp
CiAJcm0gLWYgJChkKS8kKFBGKS8kKGxpYjY0KS9saWJnY2Nfcy5zbwogCWxu
IC1zZiAvJChsaWI2NCkvbGliZ2NjX3Muc28uJChHQ0NfU09OQU1FKSAkKGQp
LyQoZ2NjX2xpYl9kaXIpL2xpYmdjY19zXzY0LnNvCg==
====
EOF
bash snippet
# fetch gcc source using wget and unpack ..
DEBSRC=http://archive.ubuntu.com/ubuntu/pool/universe/
VB=gcc-3.3_3.3.6ds1
VP=24ubuntu5
wget --no-check-certificate $DEBSRC/g/gcc-3.3/$VB.orig.tar.gz
wget --no-check-certificate $DEBSRC/g/gcc-3.3/$VB-$VP.diff.gz
wget --no-check-certificate $DEBSRC/g/gcc-3.3/$VB-$VP.dsc
dpkg-source -x $VB-$VP.dsc
# .. alternatively, if you have deb-src set up in sources.list
#apt-get source gcc-3.3
# reenable deb pkg building
cd gcc-3.3*/
patch -p1 < ../gcc-3.3_3.3.6ds1_reenable_full_deb_pkgs_build.patch
# fix dh_movefiles wildcard globbing
# (cmdline param glob works only with DH_COMPAT=2)
for f in debian/rules.d/binary-*.mk
do sed -i -e 's/dh_movefiles/DH_COMPAT=2 /' $f
done
# compile and build deb packages
debian/rules control
debuild clean
debuild -uc -us
cd ..
# install results
sudo dpkg -i {cpp,gcc,g++}-3.3*.deb libstdc++5{_3.3.6,-3.3-dev}*.deb
Do not install libgcc1_3.3.6*deb
. It may conflict with the version already installed on your host and it is not needed for gcc-3.3 to work, because a libgcc_s.so
present on the host is symbolically linked to. The same is true for crtn.o
. crti.o
and crt1.o
. gcc-3.3 needs these when linking the built objects, i.e. when ld
is called. They are part of libc6 package (here). The build process will install links below /usr/lib/gcc-lib/x86_64-linux-gnu/3.3.6/
(host triplet x86_64-linux-gnu
may be different on your system) to let ld
discover the libc6 versions installed.
You should not need to change any of this, but if you need to adjust these links to your likings, you can modify them before deb packages are built. Have a look at the end of the supplied patch file. The relevant file for such changes is debian/rules.d/binary-gcc.mk
.
Yes, you may use the bash snippet and patch below. It was tested using trusty on amd64 but may work with later revisions of ubuntu as well. It sucessfully compiled a legacy qemu 0.9 version from 2007 here.
gcc-3.3_3.3.6ds1_reenable_full_deb_pkgs_build.patch
# decode gcc-3.3_3.3.6ds1_reenable_full_deb_pkgs_build.patch
# (contains hard tabs which are unsupported by markdown)
cat <<EOF | uudecode
begin-base64-encoded 664 Z2NjLTMuM18zLjMuNmRzMV9yZWVuYWJsZV9mdWxsX2RlYl9wa2dzX2J1aWxkLnBhdGNo
VGhpcyBwYXRjaCByZWVuYWJsZXMgZGViIHBrZyBidWlsZGluZyBvZiBnY2Mg
YW5kIGcrKyBhbmQgb3RoZXJzCmluIGdjYy0zLjMtMy4zLjZkczEtMTZ1YnVu
dHUqIChhbmQgbGF0ZXIpIHNvdXJj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gYmFzZSAkKGFy
Y2hfYmluYXJpZXMpCiAKICMgLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t
LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t
LS0tCiAjIGdjYy1iYXNlCi0tLSBnY2MtMy4zLTMuMy42ZHMxL2RlYmlhbi9y
dWxlcy5kL2JpbmFyeS1nY2MubWsKKysrIGdjYy0zLjMtMy4zLjZkczEvZGVi
aWFuL3J1bGVzLmQvYmluYXJ5LWdjYy5tawpAQCAtODUsNiArODUsOSBAQAog
CiAJcm0gLWYgJChkKS8kKFBGKS8kKGxpYmRpcikvbGliZ2NjX3Muc28KIAls
biAtc2YgLyQobGliZGlyKS9saWJnY2Nfcy5zby4kKEdDQ19TT05BTUUpICQo
ZCkvJChnY2NfbGliX2RpcikvbGliZ2NjX3Muc28KKwlsbiAtc2YgL3Vzci8k
KGxpYmRpcikvY3J0MS5vICQoZCkvJChnY2NfbGliX2RpcikvY3J0MS5vCisJ
bG4gLXNmIC91c3IvJChsaWJkaXIpL2NydGkubyAkKGQpLyQoZ2NjX2xpYl9k
aXIpL2NydGkubworCWxuIC1zZiAvdXNyLyQobGliZGlyKS9jcnRuLm8gJChk
KS8kKGdjY19saWJfZGlyKS9jcnRuLm8KIGlmZXEgKCQoYmlhcmNoKSx5ZXMp
CiAJcm0gLWYgJChkKS8kKFBGKS8kKGxpYjY0KS9saWJnY2Nfcy5zbwogCWxu
IC1zZiAvJChsaWI2NCkvbGliZ2NjX3Muc28uJChHQ0NfU09OQU1FKSAkKGQp
LyQoZ2NjX2xpYl9kaXIpL2xpYmdjY19zXzY0LnNvCg==
====
EOF
bash snippet
# fetch gcc source using wget and unpack ..
DEBSRC=http://archive.ubuntu.com/ubuntu/pool/universe/
VB=gcc-3.3_3.3.6ds1
VP=24ubuntu5
wget --no-check-certificate $DEBSRC/g/gcc-3.3/$VB.orig.tar.gz
wget --no-check-certificate $DEBSRC/g/gcc-3.3/$VB-$VP.diff.gz
wget --no-check-certificate $DEBSRC/g/gcc-3.3/$VB-$VP.dsc
dpkg-source -x $VB-$VP.dsc
# .. alternatively, if you have deb-src set up in sources.list
#apt-get source gcc-3.3
# reenable deb pkg building
cd gcc-3.3*/
patch -p1 < ../gcc-3.3_3.3.6ds1_reenable_full_deb_pkgs_build.patch
# fix dh_movefiles wildcard globbing
# (cmdline param glob works only with DH_COMPAT=2)
for f in debian/rules.d/binary-*.mk
do sed -i -e 's/dh_movefiles/DH_COMPAT=2 /' $f
done
# compile and build deb packages
debian/rules control
debuild clean
debuild -uc -us
cd ..
# install results
sudo dpkg -i {cpp,gcc,g++}-3.3*.deb libstdc++5{_3.3.6,-3.3-dev}*.deb
Do not install libgcc1_3.3.6*deb
. It may conflict with the version already installed on your host and it is not needed for gcc-3.3 to work, because a libgcc_s.so
present on the host is symbolically linked to. The same is true for crtn.o
. crti.o
and crt1.o
. gcc-3.3 needs these when linking the built objects, i.e. when ld
is called. They are part of libc6 package (here). The build process will install links below /usr/lib/gcc-lib/x86_64-linux-gnu/3.3.6/
(host triplet x86_64-linux-gnu
may be different on your system) to let ld
discover the libc6 versions installed.
You should not need to change any of this, but if you need to adjust these links to your likings, you can modify them before deb packages are built. Have a look at the end of the supplied patch file. The relevant file for such changes is debian/rules.d/binary-gcc.mk
.
edited Dec 31 '18 at 18:58
answered Dec 31 '18 at 18:26
user866830user866830
313
313
add a comment |
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1389351%2fbuilding-full-gcc-3-3-on-trusty-from-deb-src%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown