V
V
Valeriy Solovyov2016-04-20 16:46:54
GCC
Valeriy Solovyov, 2016-04-20 16:46:54

How to compile gcc (Ubuntu Toolchain) with different --prefix?

Hello everyone,
I need to change settings inside the gcc-4.9-multilib source package
I can rebuild the package like this

apt-get build-dep -y gcc-4.9-multilib
apt-get source -y gcc-4.9-multilib
dpkg-source -x gcc-4.9_4.9.2-0ubuntu1~12.04.dsc
cd gcc-4.9-4.9.2
dpkg-buildpackage -rfakeroot -b

I can compile the "vanilla" version of gcc-4.9 with the necessary options like this:
bunzip2 gcc-4.9.3.tar.bz2
  tar -xvf gcc-4.9.3.tar

  cd /root/toolchain_src/gcc-4.9-4.9.2/src

   ./contrib/download_prerequisites

  
   $PWD/../gcc-4.9.3/configure --prefix=/opt/dev-tools-4.9 \
-v --with-pkgversion='Ubuntu/Linaro 4.9.3' \
--program-suffix=-4.9 --enable-shared --enable-linker-build-id --with-system-zlib \
--libexecdir=/opt/rdwr_tools/radware-dev-tools-4.9/lib --without-included-gettext \
--enable-threads=posix --with-gxx-include-dir=/opt/dev-tools-4.9/include/c++/4.9 \
--libdir=/opt/dev-tools-4.9/lib --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes \
--enable-gnu-unique-object --enable-plugin --enable-objc-gc --disable-werror \
--with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64 --with-tune=generic \
--enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu  --with-sysroot=/  --enable-nls
 make;make install

Now how do you combine it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
jcmvbkbc, 2016-04-20
@sumej

The last step is to do this (tested in debian):
PF=opt/dev-tools-4.9 dpkg-buildpackage -rfakeroot -b

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question