Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 346425 - sys-devel/distcc needs wrapper script
Summary: sys-devel/distcc needs wrapper script
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Michał Górny
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-22 12:32 UTC by Alex Buell
Modified: 2018-12-08 10:31 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
distcc ebuild (distcc-3.1-r5.ebuild,4.68 KB, text/plain)
2010-11-22 14:15 UTC, Alex Buell
Details
wrapper script, sed in ebuild changes it with the TARGET & HOST. (wrapper,63 bytes, text/plain)
2010-11-22 14:16 UTC, Alex Buell
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Buell 2010-11-22 12:32:00 UTC
I propose to add a IUSE flag to enable installation of a wrapper script, for example:

USE="wrappers" emerge distcc

This would install a %%ARCH%%-wrapper into /usr/lib/distcc/bin and symlink %%ARCH%%-wrapper to c++ g++ gcc cc

The wrapper would contain:

#!/bin/bash
exec /usr/lib/distcc/bin/%%ARCH%%-g${0:$[-2]} "$@"

For example ARCH = sparc-unknown-linux-gnu would give us:

# ls -la
total 16
drwxr-xr-x 3 root root 4096 Nov 22 12:19 .
drwxr-xr-x 3 root root 4096 Oct 24 21:42 ..
lrwxrwxrwx 1 root root   31 Oct 24 21:46 c++ -> sparc-unknown-linux-gnu-wrapper
lrwxrwxrwx 1 root root   31 Oct 24 21:46 cc -> sparc-unknown-linux-gnu-wrapper
lrwxrwxrwx 1 root root   31 Oct 24 21:46 g++ -> sparc-unknown-linux-gnu-wrapper
lrwxrwxrwx 1 root root   31 Oct 24 21:46 gcc -> sparc-unknown-linux-gnu-wrapper
lrwxrwxrwx 1 root root   15 Oct 24 21:46 sparc-unknown-linux-gnu-c++ -> /usr/bin/distcc
lrwxrwxrwx 1 root root   15 Oct 24 21:46 sparc-unknown-linux-gnu-g++ -> /usr/bin/distcc
lrwxrwxrwx 1 root root   15 Oct 24 21:46 sparc-unknown-linux-gnu-gcc -> /usr/bin/distcc
-rwxr-xr-x 1 root root   78 Oct 24 21:45 sparc-unknown-linux-gnu-wrapper

Why? I am fed up with having to recreate all this each time distcc gets re-emerged. 

I will shortly put together an ebuild for this.
Comment 1 Alex Buell 2010-11-22 14:14:42 UTC
OK, the ebuild and the wrapper are now cooked. 

Attachments added. 
Comment 2 Alex Buell 2010-11-22 14:15:24 UTC
Created attachment 255117 [details]
distcc ebuild
Comment 3 Alex Buell 2010-11-22 14:16:01 UTC
Created attachment 255119 [details]
wrapper script, sed in ebuild changes it with the TARGET & HOST.
Comment 4 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2018-12-08 10:31:11 UTC
You need to fix your clients not to call generic 'gcc' etc., and instead call full ${CHOST}-gcc, etc.