tinycc-devel
[Top][All Lists]
Advanced

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

Re: [Tinycc-devel] Building GTK3 with tcc


From: Andrey Gursky
Subject: Re: [Tinycc-devel] Building GTK3 with tcc
Date: Mon, 11 Jun 2018 19:04:11 +0200

On 2018-06-11 18:41, Andrey Gursky wrote:
Hi,

while building GTK3 I've stumbled over a tiny issue with
--export-dynamic. Proposed patch is here [1]. (Sure, in long term it
would be great to get also a patch upstream to utilize the libtool
improvement for tcc [2]. But for the upcoming GTK4 one need to patch
meson anyway.)

There is another issue. tcc doesn't understand gcc's '-C' argument. It
is needed to generate gobject introspection data. Would you like to
add it?

And another one in gtk/gtkpapersize.c

const gchar *
gtk_paper_size_get_default (void)
{
  char *locale, *freeme = NULL;
  const char *paper_size;

#if defined(HAVE__NL_PAPER_HEIGHT) && defined(HAVE__NL_PAPER_WIDTH)
  {
int width = NL_PAPER_GET (_NL_PAPER_WIDTH); // <-------------------
    int height = NL_PAPER_GET (_NL_PAPER_HEIGHT); //

    if (width == 210 && height == 297)
      return GTK_PAPER_NAME_A4;

    if (width == 216 && height == 279)
      return GTK_PAPER_NAME_LETTER;
  }
#endif

--------------------> error: lvalue expected

Regarding performance. Configured with CFLAGS='-g' make finishes in
aboud 11 minutes, while gcc does it in about 15 min 43 sec. Shouldn't
tcc be at least an order of magnitude faster or I'm missing something?

Thanks,
Andrey

[1] http://repo.or.cz/tinycc.git/commit/91bdb5a4a32d8b2c994ebaeaa330807e72693d4b [2] https://lists.gnu.org/archive/html/libtool-patches/2014-07/msg00001.html

And a bit more: "Constructor not supported on this compiler, linking in resources will not work"

Docs:

If G_HAS_CONSTRUCTORS is true then the compiler support *both* constructors and destructors, in a sane way, including e.g. on library unload. If not you're on
  your own.

Some compilers need #pragma to handle this, which does not work with macros,
  so the way you need to use this is (for constructors):

Any chance to become analogs to gcc's __attribute__((constructor)) / __attribute__((destructor))?



reply via email to

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