Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 04 Aug 2015 17:03:07 +0200
From:      Carlos Jacobo Puga Medina <cpm@fbsd.es>
To:        Jung-uk Kim <jkim@FreeBSD.org>, "freebsd-ports@freebsd.org" <freebsd-ports@freebsd.org>
Subject:   Re: lang/tcc unusable
Message-ID:  <1438700587.2911.4.camel@fbsd.es>
In-Reply-To: <55C005D7.3050103@FreeBSD.org>
References:  <1438633579.6572.13.camel@fbsd.es> <55BFD033.8070507@FreeBSD.org> <1438634467.7343.2.camel@fbsd.es> <55BFDCA0.8040006@FreeBSD.org> <1438638022.7343.7.camel@fbsd.es> <55BFEAAA.4070008@FreeBSD.org> <1438644237.7343.13.camel@fbsd.es> <55C005D7.3050103@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--=-acFnJloNKQ/TcB7X4uYP
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

El lun, 03-08-2015 a las 20:22 -0400, Jung-uk Kim escribi=C3=B3:
> On 08/03/2015 19:23, Carlos Jacobo Puga Medina wrote:
> > El lun, 03-08-2015 a las 18:26 -0400, Jung-uk Kim escribi=C3=B3:
> > > On 08/03/2015 17:40, Carlos Jacobo Puga Medina wrote:
> > > > El lun, 03-08-2015 a las 17:26 -0400, Jung-uk Kim escribi=C3=B3:
> > > > > On 08/03/2015 16:41, Carlos Jacobo Puga Medina wrote:
> > > > > > El lun, 03-08-2015 a las 16:33 -0400, Jung-uk Kim=20
> > > > > > escribi=C3=B3:
> > > > > >=20
> > > > > > Hi Jung-uk,

> > > > > > > On 08/03/2015 16:26, Carlos Jacobo Puga Medina wrote:
> > > > > > > > Hi people,
> > > > > > > >=20
> > > > > > > > Recently I added amd64 support to TinyCC, but I=20
> > > > > > > > encounter the following problem trying to compile a=20
> > > > > > > > simple code.
> > > > > > > >=20
> > > > > > > > #include <stdio.h>
> > > > > > > >=20
> > > > > > > > int main(){ printf("hello, world!\n); return 0; }
> > > > > > > >=20
> > > > > > > > % tcc -o hello hello.c In file included from
> > > > > > > > hello.c:1: /usr/include/stdio.h:63: error: ';' expected
> > > > > > > > (got "va_list")
> > > > > > > >=20
> > > > > > > > I guess that some change introduced in 'stdio.h' causes
> > > > > > > > this weird behaviour. Last time that TCC worked fine
> > > > > > > > was on FreeBSD 9.1 -RELEASE/i386.
> > > > > > > >=20
> > > > > > > > Also I reported this problem in the tinycc-devel=20
> > > > > > > > mailing list [1]
> > > > > > > >=20
> > > > > > > > Any thoughts?
> > > > > > >=20
> > > > > > > I haven't tried tcc but '"' is missing for the printf().
> > > > > >=20
> > > > > > Yes, it was a typo here :)
> > > > >=20
> > > > > It seems it's a known tcc bug:
> > > > >=20
> > > > > http://savannah.nongnu.org/bugs/?30966
> > > > >=20
> > > >=20
> > > > Is there something that we can do about it?
> > > >=20
> > > > Thanks for pointing me, jkim@
> > >=20
> > > It seems there is no easy way to fix this problem without=20
> > > touching src tree, e.g.,
> > >=20
> > > --- sys/x86/include/_types.h	(revision 286256) +++=20
> > > sys/x86/include/_types.h	(working copy) @@ -152,7 +152,7=20
> > > @@ */=20
> > > #ifdef __GNUCLIKE_BUILTIN_VARARGS typedef	__builtin_va_lis
> > > t=20
> > > __va_list;	/* internally known to gcc */ -#elif=20
> > > defined(lint)=20
> > > +#elif defined(__TINYC__) || defined(lint) typedef	char *=20
> > > __va_list;	/* pretend */ #endif #if=20
> > > defined(__GNUC_VA_LIST_COMPATIBILITY) &&
> > > !defined(__GNUC_VA_LIST) \
> > >=20
> >=20
> > If you need doing some changes into the src tree.
>=20
> https://svnweb.freebsd.org/changeset/base/286265
>=20

That's OK!=20

> > So, what do you recommend in such case? Would it be much trouble=20
> > add the necessary changes to run TCC again? Furthermore, TinyCC=20
> > developer has ignored this issue completely.
>=20
> The only hack I see is defining __va_list as a macro from libtcc.c=20
> but
> it is ugly.
>=20

Probably this should be discussed in the tinycc-devel ML. In the
meanwhile we can try your dirty hack :-)
--
Carlos Jacobo Puga Medina <cpm@fbsd.es>
PGP fingerprint =3D C60E 9497 5302 793B CC2D  BB89 A1F3 5D66 E6D0 5453
--=-acFnJloNKQ/TcB7X4uYP
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQEcBAABCAAGBQJVwNQrAAoJEKHzXWbm0FRTJRIH/R1SWlYRFPhv+o9TvwNgaoD2
mGoz2/Y/KMnITTqzTBqEy2uDC0VxvFEEX9wGuF6AVigQHJo+d4fGzbBo05RzOdp4
u8knAcIlI3dLq5ZTQzAwOyq16nfjrN8acYrkBdspIoaa18qGAuyCFdJf964ZhChY
FOM6I9RN5zqFwthzE7JIW273BdqajCTW56NxQQtH0/HAsTOodhtaWqYyFgQz8E5+
Yc3vF9ElRaIoY6StJKdJ9h+1H9BAxOSxTK4YNL6FW5z8o+WCh3wNsjB00r4R6zlJ
KafjjLfUD8mcplmSvdu3InoChcKdKVUOjUF+3e9ITIUMWqZEvhf59x91ILs68to=
=Ixqo
-----END PGP SIGNATURE-----

--=-acFnJloNKQ/TcB7X4uYP--




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1438700587.2911.4.camel>