public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] Patch for absolute minimal GCC for distcc environment
@ 2005-04-03  1:56 Andrew de Quincey
  2005-04-03  2:10 ` Andrew Gaffney
  0 siblings, 1 reply; 12+ messages in thread
From: Andrew de Quincey @ 2005-04-03  1:56 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 967 bytes --]


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.

[-- Attachment #2: gcc-3.4.3-nolibgcc.patch --]
[-- Type: text/x-diff, Size: 4434 bytes --]

--- 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:  \

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2005-04-04  0:29 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-03  1:56 [gentoo-dev] Patch for absolute minimal GCC for distcc environment Andrew de Quincey
2005-04-03  2:10 ` Andrew Gaffney
2005-04-03  2:15   ` Andrew de Quincey
2005-04-03 10:35     ` Stuart Longland
2005-04-03 10:41       ` Stuart Longland
2005-04-03 13:03         ` Paul de Vrieze
2005-04-04  0:28           ` Stuart Longland
2005-04-03 12:18       ` Andrew de Quincey
2005-04-03 12:21         ` Andrew de Quincey
2005-04-03 14:21           ` Andrew de Quincey
2005-04-03 10:39     ` Ioannis Aslanidis
     [not found]       ` <200504031320.11013.adq@lidskialf.net>
2005-04-03 12:24         ` Andrew de Quincey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox