#695354 tcc: please provide a Multi-Arch: foreign interface

Package:
tcc
Source:
tcc
Description:
small ANSI C compiler
Submitter:
Helmut Grohne
Date:
2012-12-07 14:21:04 UTC
Severity:
wishlist
#695354#5
Date:
2012-12-07 14:20:09 UTC
From:
To:
Please provide a Multi-Arch version of tcc. Since tcc provides a command
line interface the only meaningful option is foreign. However the files
tcc creates are architecture dependent. So the only way to achieve
M-A:foreign is to provide multiple packages with disjoint contents. The
way this works in crossbuilding is to prefix the compiler with the
architecture triplet. So on amd64 tcc would be called
x86_64-linux-gnu-tcc. Since different architectures use different names
multiple packages can coexist and be marked M-A:foreign.

The attached patch introduces a new binary package tcc-$debianarch. This
package is only built for DEB_HOST_ARCH == DEB_BUILD_ARCH. So the total
increase on packages in 1 per architecture. The new package ships the
compiler binary and is marked M-A:foreign. The original tcc package now
depends on tcc-$debianarch and ships a compatibility symlink tcc ->
$triplet-tcc to retain the original interface. Of course the tcc package
cannot be marked Multi-Arch in any way.

The patch can later be extended to also build cross compilers (i.e.
DEB_HOST_ARCH != DE_BUILD_ARCH). Those can be added on demand. Also note
that this patch obsoletes bug #673380 since tcc-amd64 and tcc-i386 can
be installed simultaneously.

One motivation to doing this work is to showcase the necessary work to
turn the gcc package into a full fledged cross compiler. See #666743.

Thanks to Thomas Preud'homme for bringing my attention to this lovely
package.

Helmut