libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Support for tcc as a linker


From: Reuben Thomas
Subject: Support for tcc as a linker
Date: Thu, 31 Jul 2014 15:45:23 +0100

Last year, libtool gained support for tcc as a compiler, but up to now it didn't always work as a linker (configuring a project using:

CC=tcc LD=tcc ./configure

; if the "LD=tcc" setting is omitted then configure assumes that ld is being used, diagnoses GNU ld (typically), and then fails e.g. with --whole-archive not being supported when it tries to link by running tcc (which does not call ld, but does its own linking).

The attached patch against current git HEAD adds tcc support on Linux in the non-GNU ld section _LT_LINKER_SHLIBS. I guess it could be added for other kernels that tcc supports, but I'm not sure what they are, nor how to add the support without unfortunate duplication (the logic seems to be set up to assume either gcc or a system compiler).

At present, tcc can't be treated like GNU ld, because it doesn't understand --{no,}-whole-archive, though there is a patch for that from some years ago which I'm going to see if I can fix up.'

With my attached libtool.m4 patch, I am able to build and run FontForge, which is ~500kLOC of C dating from all parts of the last 14 years, using tcc and libtool git HEAD. I'd say that's quite impressive for both tcc and libtool! (My motivation is to have a quicker build, which tcc certainly gives.)

Attachment: 0001-libtool.m4-add-support-for-tcc-as-linker.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]