tinycc-devel
[Top][All Lists]
Advanced

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

[Tinycc-devel] [FreeBSD support] __aligned(n) + __pure issues


From: Christian Jullien
Subject: [Tinycc-devel] [FreeBSD support] __aligned(n) + __pure issues
Date: Mon, 10 Oct 2016 07:09:43 +0200

Hi,

 

As FreeBSD is supported, I gave a try with FreeBSD 11.0 i386 released yesterday and I’m facing issue with __aligned(n) and _pure directives.

 

./configure; gmake

Correctly produces a working tcc binary.

gmake –k test

proves that ‘most’ tests work except two:

 

BUG1:

../tcc -B.. -I../include -I.. -I.. -o abitest-tcc abitest.c ../libtcc.c -DTCC_TARGET_I386 -DONE_SOURCE -lm

In file included from ../libtcc.c:21:

In file included from ../tcc.h:33:

In file included from /usr/include/signal.h:38:

In file included from /usr/include/sys/signal.h:46:

In file included from /usr/include/machine/signal.h:36:

/usr/include/x86/signal.h:82: error: ',' expected (got "__aligned")

gmake[1]: *** [Makefile:191: abitest-tcc] Error 1

 

/usr/include/x86/signal.h contains a struct having unsupported __aligned(n) directive:

 

#if __BSD_VISIBLE

struct sigcontext {

        struct __sigset sc_mask;        /* signal mask to restore */

        int     sc_onstack;             /* sigstack state to restore */

        int     sc_flags;

        int     sc_fpstate[128] __aligned(16);

 

        int     sc_fsbase;

  };

 

From tcctock.h I see

     DEF(TOK_ALIGNED1, "aligned")

     DEF(TOK_ALIGNED2, "__aligned__")

And tried to add

     DEF(TOK_ALIGNED1, "aligned")

     DEF(TOK_ALIGNED2, "__aligned__")

     DEF(TOK_ALIGNED3, "__aligned")

 

And

        case TOK_ALIGNED1:

        case TOK_ALIGNED2:

        case TOK_ALIGNED3:

            if (tok == '(') {

 

With no luck!! Btw, I see no regression tests using __aligned.

 

BUG2:

Test: 46_grep...

--- ../../tests/tests2/46_grep.expect   2016-10-10 06:43:12.865818000 +0200

+++ 46_grep.output      2016-10-10 07:05:03.751155000 +0200

@@ -1,3 +1,3 @@

-File 46_grep.c:

-/* vim: set expandtab ts=4 sw=3 sts=3 tw=80 :*/

-

+In file included from 46_grep.c:19:

+In file included from /usr/include/ctype.h:83:

+/usr/include/xlocale/_ctype.h:52: error: ';' expected (got "*")

gmake[2]: *** [Makefile:56: 46_grep.test] Error 1

 

Is not obvious to me.

#ifndef _XLOCALE_RUN_FUNCTIONS_DEFINED

#define _XLOCALE_RUN_FUNCTIONS_DEFINED 1

unsigned long    ___runetype_l(__ct_rune_t, locale_t) __pure;

__ct_rune_t      ___tolower_l(__ct_rune_t, locale_t) __pure;

__ct_rune_t      ___toupper_l(__ct_rune_t, locale_t) __pure;

_RuneLocale     *__runes_for_locale(locale_t, int*);                      // This is line 52

#endif

 

Probably __pure which is not a known token.


reply via email to

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