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.
--- 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 "[EMAIL PROTECTED]@%$shlib_base_name%g" \
- -e "[EMAIL PROTECTED]@%$shlib_so_name%g" \
- -e "[EMAIL PROTECTED]@%$shlib_dir%g" \
- -e "[EMAIL PROTECTED]@%$shlib_slibdir_qual%g"
- if [ "$LIBUNWIND" ]; then
- echo " $SHLIBUNWIND_INSTALL" \
- | sed -e "[EMAIL PROTECTED]@%$shlibunwind_base_name%g" \
- -e "[EMAIL PROTECTED]@%$shlibunwind_so_name%g" \
- -e "[EMAIL PROTECTED]@%$shlib_dir%g" \
- -e "[EMAIL PROTECTED]@%$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 "[EMAIL PROTECTED]@%$shlib_base_name%g" \
- -e "[EMAIL PROTECTED]@%$shlib_base_name%g" \
- -e "[EMAIL PROTECTED]@%%g" \
- -e "[EMAIL PROTECTED]@%%g"
- if [ "$LIBUNWIND" ]; then
- echo " $SHLIBUNWIND_INSTALL" \
- | sed -e "[EMAIL PROTECTED]@%$shlibunwind_base_name%g" \
- -e "[EMAIL PROTECTED]@%$shlibunwind_base_name%g" \
- -e "[EMAIL PROTECTED]@%%g" \
- -e "[EMAIL PROTECTED]@%%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: \