From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from beyond.lidskialf.net (lidskialf.net [62.3.233.115]) by robin.gentoo.org (8.13.3/8.13.3) with ESMTP id j331u97F009285 for ; Sun, 3 Apr 2005 01:56:09 GMT Received: from monstrousfish.lidskialf.net (monstrousfish [172.16.1.2]) by beyond.lidskialf.net (Postfix) with ESMTP id 5F273869341 for ; Sun, 3 Apr 2005 02:56:11 +0100 (BST) From: Andrew de Quincey To: gentoo-dev@robin.gentoo.org Subject: [gentoo-dev] Patch for absolute minimal GCC for distcc environment Date: Sun, 3 Apr 2005 02:56:14 +0100 User-Agent: KMail/1.8 Precedence: bulk List-Post: , , List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@gentoo.org Reply-To: gentoo-dev@gentoo.org MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_+00TCfT1kLBOFIw" Message-Id: <200504030256.14492.adq_dvb@lidskialf.net> X-Archives-Salt: 0f91bffb-8d99-425b-b1d7-354f8286a555 X-Archives-Hash: 674f9292db134e25d5dd37d67ba295b1 --Boundary-00=_+00TCfT1kLBOFIw Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi, I hope this is the correct place to send this. I have setup distcc in my network. Most of the hosts are i686, but one of them is x86_64. I wish to distribute tasks to the i686 machines from the x86_64 machine. This involves installing a cross compiler on the i686 machines for x86_64 tasks. Crossdev is overkill for this - I don't actually _need_ glibc and the like on the client machines for a simple distcc environment. It really adds to the upgrade time when emerge sync; emerge worlding. The attached patch makes gcc *only* generate the compilers - no libstdcc++, no libgcc, nothing else - this is all you need for distcc. Likewise, compiling gcc with this patch needs only binutils - no linux-headers, and no glibc. I was considering patching the gcc ebuild to add a new option - e.g. "minimal" to apply this patch - but I've no idea if you would be interested in this feature. Please let me know if you are, and I'll develop it further if so. --Boundary-00=_+00TCfT1kLBOFIw Content-Type: text/x-diff; charset="us-ascii"; name="gcc-3.4.3-nolibgcc.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="gcc-3.4.3-nolibgcc.patch" --- gcc/mklibgcc.in~ 2005-04-03 01:10:15.000000000 +0100 +++ gcc/mklibgcc.in 2005-04-03 01:14:39.000000000 +0100 @@ -623,105 +623,7 @@ done echo "" -echo "all: $all" +echo "all:" echo "" -echo "install: $all" -for ml in $MULTILIBS; do - dir=`echo ${ml} | sed -e 's/;.*$//' -e 's/=/$(EQ)/g'` - flags=`echo ${ml} | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; - if [ $dir != . ]; then - ldir='$(DESTDIR)$(libsubdir)'/$dir - echo " if [ -d $ldir ]; then true; else $mkinstalldirs $ldir; chmod a+rx $ldir; fi;" - else - ldir='$(DESTDIR)$(libsubdir)' - fi - echo ' $(INSTALL_DATA)' ${dir}/libgcc.a ${ldir}/ - echo ' $(RANLIB_FOR_TARGET)' ${ldir}/libgcc.a - echo ' $(INSTALL_DATA)' ${dir}/libgcov.a ${ldir}/ - echo ' $(RANLIB_FOR_TARGET)' ${ldir}/libgcov.a - - if [ "$SHLIB_LINK" ]; then - echo ' $(INSTALL_DATA)' ${dir}/libgcc_eh.a ${ldir}/ - echo ' $(RANLIB_FOR_TARGET)' ${ldir}/libgcc_eh.a - - if [ -z "$SHLIB_MULTILIB" ]; then - if [ "$dir" = . ]; then - shlib_base_name=libgcc_s - shlibunwind_base_name=libunwind - else - shlib_base_name=libgcc_s_`echo $dir | sed s,/,_,g` - shlibunwind_base_name=libunwind_`echo $dir | sed s,/,_,g` - fi - shlib_so_name="$shlib_base_name" - shlibunwind_so_name="$shlibunwind_base_name" - shlib_dir= - shlib_slibdir_qual= - if [ -n "$MULTILIB_OSDIRNAMES" ]; then - gcc_multilib_dir=`./xgcc -B./ $flags --print-multi-directory` - os_multilib_dir=`./xgcc -B./ $flags --print-multi-os-directory` - if [ "$dir" != . ]; then - shlib_dir="$dir"/ - fi - gcc_multilib_sup=`echo $gcc_multilib_dir | sed 's~^[^/]*/~~'` - os_multilib_base=`echo $os_multilib_dir | sed -n "s~/${gcc_multilib_sup}\$~~p"` - if [ -z "$os_multilib_base" ]; then - shlib_so_name=libgcc_s - shlibunwind_so_name=libunwind - if [ "$os_multilib_dir" != "." ]; then - shlib_slibdir_qual="/$os_multilib_dir" - fi - else - shlib_so_name=libgcc_s_`echo $gcc_multilib_sup | sed s,/,_,g` - shlibunwind_so_name=libunwind_`echo $gcc_multilib_sup | sed s,/,_,g` - shlib_slibdir_qual="/$os_multilib_base" - fi - fi - echo " $SHLIB_INSTALL" \ - | sed -e "s%@shlib_base_name@%$shlib_base_name%g" \ - -e "s%@shlib_so_name@%$shlib_so_name%g" \ - -e "s%@shlib_dir@%$shlib_dir%g" \ - -e "s%@shlib_slibdir_qual@%$shlib_slibdir_qual%g" - if [ "$LIBUNWIND" ]; then - echo " $SHLIBUNWIND_INSTALL" \ - | sed -e "s%@shlib_base_name@%$shlibunwind_base_name%g" \ - -e "s%@shlib_so_name@%$shlibunwind_so_name%g" \ - -e "s%@shlib_dir@%$shlib_dir%g" \ - -e "s%@shlib_slibdir_qual@%$shlib_slibdir_qual%g" - libunwinddir='$(DESTDIR)$(slibdir)$(shlib_slibdir_qual)/$(shlib_dir)' - echo ' $(INSTALL_DATA)' ${dir}/libunwind.a ${libunwinddir}/ - echo ' $(RANLIB_FOR_TARGET)' ${libunwinddir}/libunwind.a - fi - elif [ "$SHLIB_MULTILIB" = "$dir" ]; then - shlib_base_name="libgcc_s"; - echo " $SHLIB_INSTALL" \ - | sed -e "s%@shlib_base_name@%$shlib_base_name%g" \ - -e "s%@shlib_so_name@%$shlib_base_name%g" \ - -e "s%@shlib_dir@%%g" \ - -e "s%@shlib_slibdir_qual@%%g" - if [ "$LIBUNWIND" ]; then - echo " $SHLIBUNWIND_INSTALL" \ - | sed -e "s%@shlib_base_name@%$shlibunwind_base_name%g" \ - -e "s%@shlib_so_name@%$shlibunwind_base_name%g" \ - -e "s%@shlib_dir@%%g" \ - -e "s%@shlib_slibdir_qual@%%g" - libunwinddir='$(DESTDIR)$(slibdir)' - echo ' $(INSTALL_DATA)' ${dir}/libunwind.a ${libunwinddir}/ - echo ' $(RANLIB_FOR_TARGET)' ${libunwinddir}/libunwind.a - fi - fi - fi -done -for f in $EXTRA_MULTILIB_PARTS; do - for ml in $MULTILIBS; do - dir=`echo ${ml} | sed -e 's/;.*$//' -e 's/=/$(EQ)/g'` - if [ $dir != . ]; then - out=${dir}/$f - ldir='$(DESTDIR)$(libsubdir)'/$dir - else - out=$f - ldir='$(DESTDIR)$(libsubdir)' - fi - echo ' $(INSTALL_DATA)' $out $ldir/ - done -done +echo "install:" --- Makefile.in.old 2005-04-03 01:38:54.000000000 +0100 +++ Makefile.in 2005-04-03 01:36:57.000000000 +0100 @@ -616,7 +616,7 @@ # The target built for a native build. .PHONY: all.normal -all.normal: @all_build_modules@ all-host all-target +all.normal: @all_build_modules@ all-host .PHONY: all-host all-host: maybe-all-gcc \ @@ -17390,7 +17390,7 @@ # Installation targets. .PHONY: install uninstall -install: installdirs install-host install-target +install: installdirs install-host .PHONY: install-host-nogcc install-host-nogcc: \ --Boundary-00=_+00TCfT1kLBOFIw-- -- gentoo-dev@gentoo.org mailing list