summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarald van Dijk <truedfx@gentoo.org>2006-08-24 08:42:33 +0000
committerHarald van Dijk <truedfx@gentoo.org>2006-08-24 08:42:33 +0000
commitd2b8843df8f6d87ee41b6d740c1234a84e20b333 (patch)
treeab3b4424261c8077454174eb2bb5d15aacce34b3 /dev-lang
parentStable on ppc64 (diff)
downloadgentoo-2-d2b8843df8f6d87ee41b6d740c1234a84e20b333.tar.gz
gentoo-2-d2b8843df8f6d87ee41b6d740c1234a84e20b333.tar.bz2
gentoo-2-d2b8843df8f6d87ee41b6d740c1234a84e20b333.zip
Make tcc install correctly and work with glibc 2.4 (#132095)
(Portage version: 2.1.1_pre5-r2)
Diffstat (limited to 'dev-lang')
-rw-r--r--dev-lang/tcc/ChangeLog9
-rw-r--r--dev-lang/tcc/files/digest-tcc-0.9.23-r13
-rw-r--r--dev-lang/tcc/files/tcc-0.9.23-anonunion.patch49
-rw-r--r--dev-lang/tcc/files/tcc-0.9.23-asneeded.patch44
-rw-r--r--dev-lang/tcc/tcc-0.9.23-r1.ebuild57
5 files changed, 161 insertions, 1 deletions
diff --git a/dev-lang/tcc/ChangeLog b/dev-lang/tcc/ChangeLog
index 254ef102dc0e..dd96dadf0148 100644
--- a/dev-lang/tcc/ChangeLog
+++ b/dev-lang/tcc/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for dev-lang/tcc
# Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/tcc/ChangeLog,v 1.20 2006/01/08 21:29:21 halcy0n Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/tcc/ChangeLog,v 1.21 2006/08/24 08:42:33 truedfx Exp $
+
+*tcc-0.9.23-r1 (24 Aug 2006)
+
+ 24 Aug 2006; Harald van Dijk <truedfx@gentoo.org>
+ +files/tcc-0.9.23-anonunion.patch, +files/tcc-0.9.23-asneeded.patch,
+ -tcc-0.9.23.ebuild, +tcc-0.9.23-r1.ebuild:
+ Make tcc install correctly and work with glibc 2.4 (#132095)
08 Jan 2006; Mark Loeser <halcy0n@gentoo.org> tcc-0.9.22.ebuild:
Stable on x86; bug #116169
diff --git a/dev-lang/tcc/files/digest-tcc-0.9.23-r1 b/dev-lang/tcc/files/digest-tcc-0.9.23-r1
new file mode 100644
index 000000000000..48399c90096d
--- /dev/null
+++ b/dev-lang/tcc/files/digest-tcc-0.9.23-r1
@@ -0,0 +1,3 @@
+MD5 ba925bf241b0980a581bbc6ad3d5b9a1 tcc-0.9.23.tar.gz 423807
+RMD160 c7b1cffa8b0b3e8dd828ffd249249f21efe1ee55 tcc-0.9.23.tar.gz 423807
+SHA256 074632c574116004c63b32798048c73c184d123d8cf96cce849765296b255991 tcc-0.9.23.tar.gz 423807
diff --git a/dev-lang/tcc/files/tcc-0.9.23-anonunion.patch b/dev-lang/tcc/files/tcc-0.9.23-anonunion.patch
new file mode 100644
index 000000000000..8af0825bd23e
--- /dev/null
+++ b/dev-lang/tcc/files/tcc-0.9.23-anonunion.patch
@@ -0,0 +1,49 @@
+http://lists.gnu.org/archive/html/tinycc-devel/2005-07/msg00008.html
+
+--- tcc.c
++++ tcc.c
+@@ -6442,7 +6487,7 @@
+ {
+ int a, v, size, align, maxalign, c, offset;
+ int bit_size, bit_pos, bsize, bt, lbit_pos;
+- Sym *s, *ss, **ps;
++ Sym *s, *ss, *ass, **ps;
+ AttributeDef ad;
+ CType type1, btype;
+
+@@ -6513,7 +6558,9 @@
+ v = 0;
+ type1 = btype;
+ if (tok != ':') {
+- type_decl(&type1, &ad, &v, TYPE_DIRECT);
++ type_decl(&type1, &ad, &v, TYPE_DIRECT | TYPE_ABSTRACT);
++ if (v == 0 && (type1.t & VT_BTYPE) != VT_STRUCT)
++ expect("identifier");
+ if ((type1.t & VT_BTYPE) == VT_FUNC ||
+ (type1.t & (VT_TYPEDEF | VT_STATIC | VT_EXTERN | VT_INLINE)))
+ error("invalid type for '%s'",
+@@ -6576,7 +6623,7 @@
+ } else {
+ bit_pos = 0;
+ }
+- if (v) {
++ if (v != 0 || (type1.t & VT_BTYPE) == VT_STRUCT) {
+ /* add new memory data only if starting
+ bit field */
+ if (lbit_pos == 0) {
+@@ -6602,6 +6649,15 @@
+ }
+ printf("\n");
+ #endif
++ }
++ if (v == 0 && (type1.t & VT_BTYPE) == VT_STRUCT) {
++ ass = type1.ref;
++ while ((ass = ass->next) != NULL) {
++ ss = sym_push(ass->v, &ass->type, 0, offset + ass->c);
++ *ps = ss;
++ ps = &ss->next;
++ }
++ } else if (v) {
+ ss = sym_push(v | SYM_FIELD, &type1, 0, offset);
+ *ps = ss;
+ ps = &ss->next;
diff --git a/dev-lang/tcc/files/tcc-0.9.23-asneeded.patch b/dev-lang/tcc/files/tcc-0.9.23-asneeded.patch
new file mode 100644
index 000000000000..da757720d929
--- /dev/null
+++ b/dev-lang/tcc/files/tcc-0.9.23-asneeded.patch
@@ -0,0 +1,44 @@
+http://lists.gnu.org/archive/html/tinycc-devel/2005-08/msg00011.html
+
+--- tccelf.c
++++ tccelf.c
+@@ -2300,19 +2300,27 @@
+ expect("(");
+ t = ld_next(s1, filename, sizeof(filename));
+ for(;;) {
+- if (t == LD_TOK_EOF) {
+- error_noabort("unexpected end of file");
+- return -1;
+- } else if (t == ')') {
+- break;
+- } else if (t != LD_TOK_NAME) {
+- error_noabort("filename expected");
+- return -1;
+- }
+- tcc_add_file(s1, filename);
+- t = ld_next(s1, filename, sizeof(filename));
+- if (t == ',') {
++ if (strcmp(filename, "AS_NEEDED")) {
++ if (t == LD_TOK_EOF) {
++ error_noabort("unexpected end of file");
++ return -1;
++ } else if (t == ')') {
++ break;
++ } else if (t != LD_TOK_NAME) {
++ error_noabort("filename expected");
++ return -1;
++ }
++ tcc_add_file(s1, filename);
+ t = ld_next(s1, filename, sizeof(filename));
++ if (t == ',') {
++ t = ld_next(s1, filename, sizeof(filename));
++ }
++ } else {
++ /* TODO: Implement AS_NEEDED support. Ignore it for now */
++ do {
++ t = ld_next(s1, filename, sizeof(cmd));
++ } while (t != ')');
++ t = ld_next(s1, filename, sizeof(cmd));
+ }
+ }
+ } else if (!strcmp(cmd, "OUTPUT_FORMAT") ||
diff --git a/dev-lang/tcc/tcc-0.9.23-r1.ebuild b/dev-lang/tcc/tcc-0.9.23-r1.ebuild
new file mode 100644
index 000000000000..d5fcd19175aa
--- /dev/null
+++ b/dev-lang/tcc/tcc-0.9.23-r1.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/tcc/tcc-0.9.23-r1.ebuild,v 1.1 2006/08/24 08:42:33 truedfx Exp $
+
+inherit eutils
+
+IUSE=""
+DESCRIPTION="A very small C compiler for ix86"
+HOMEPAGE="http://www.tinycc.org/"
+SRC_URI="http://fabrice.bellard.free.fr/tcc/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="-* ~x86"
+
+DEPEND=""
+
+# Testsuite is broken, relies on gcc to compile
+# invalid C code that it no longer accepts
+RESTRICT="test"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${P}-anonunion.patch
+ epatch "${FILESDIR}"/${P}-asneeded.patch
+
+ # Don't strip
+ sed -i -e 's|$(INSTALL) -s|$(INSTALL)|' Makefile
+
+ # Fix examples
+ sed -i -e '1{
+ i#! /usr/bin/tcc -run
+ /^#!/d
+ }' examples/ex*.c
+ sed -i -e '1s/$/ -lX11/' examples/ex4.c
+}
+
+src_install() {
+ #autoconf for the package does not create dirs if they are missing for some reason
+ dodir /usr/bin
+ dodir /usr/lib/tcc
+ dodir /usr/share/man/man1
+ dodir /usr/include
+ dodir /usr/share/doc/${PF}
+ make \
+ bindir="${D}"/usr/bin \
+ libdir="${D}"/usr/lib \
+ tccdir="${D}"/usr/lib/tcc \
+ includedir="${D}"/usr/include \
+ docdir="${D}"/usr/share/doc/${PF} \
+ mandir="${D}"/usr/share/man install || die
+ dodoc Changelog README TODO VERSION COPYING
+ dohtml tcc-doc.html
+ exeinto /usr/share/doc/${PF}/examples
+ doexe examples/ex*.c
+}