File: tinycc.txt

package info (click to toggle)
elinks 0.19.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 24,424 kB
  • sloc: ansic: 174,653; cpp: 31,967; sh: 7,841; python: 4,039; perl: 2,183; javascript: 1,794; pascal: 1,710; makefile: 1,006; yacc: 295; lisp: 125; awk: 79; ruby: 70
file content (187 lines) | stat: -rw-r--r-- 7,163 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
Compiling ELinks with Tiny C Compiler
=====================================

ELinks has been successfully compiled with http://www.tinycc.org/[Tiny
C Compiler] version 0.9.23, however there are several problems.
This file lists some of these problems and their possible solutions.

Perl uses unsupported -Wl,-E
----------------------------

----------------------------------------------------------------------
checking for Perl... no
----------------------------------------------------------------------

`config.log` reveals:

----------------------------------------------------------------------
configure:18039: checking for Perl
configure:18082: tcc -o conftest ... -rdynamic conftest.c -Wl,-E ... -lperl ... >&5
tcc: unsupported linker option '-E'
configure:18088: $? = 1
...
configure:18106: result: no
----------------------------------------------------------------------

The `-Wl,-E` option comes from this command:

----------------------------------------------------------------------
perl -MExtUtils::Embed -e ldopts
----------------------------------------------------------------------

TCC 0.9.23 does not support the option, so ELinks builds without Perl.

Python uses unsupported -Xlinker -export-dynamic
------------------------------------------------

----------------------------------------------------------------------
checking for Python... yes
checking for python... /usr/bin/python
...
Browser scripting ............... Guile, Lua, SpiderMonkey
----------------------------------------------------------------------

`config.log` reveals:

----------------------------------------------------------------------
configure:18204: checking for Python
configure:18208: result: yes
configure:18219: checking for python
configure:18237: found /usr/bin/python
configure:18250: result: /usr/bin/python
configure:18287: tcc -o conftest ... -rdynamic conftest.c -Xlinker -export-dynamic ... -lpython2.3 ... >&5
tcc: invalid option -- '-Xlinker'
configure:18293: $? = 1
----------------------------------------------------------------------

The `-Xlinker -export-dynamic` options come from this command:

----------------------------------------------------------------------
python -c 'from distutils import sysconfig; print sysconfig.get_config_var("LINKFORSHARED")'
----------------------------------------------------------------------

TCC 0.9.23 does not support `-Xlinker`, so ELinks builds without
Python.

Ruby uses unsupported -Wl,-export-dynamic
-----------------------------------------

----------------------------------------------------------------------
checking for Ruby... yes
checking for ruby... /usr/bin/ruby
checking Ruby version... 1.8.3
checking for Ruby header files... /usr/lib/ruby/1.8/i486-linux
configure: error: Ruby not found
----------------------------------------------------------------------

`config.log` reveals:

----------------------------------------------------------------------
configure:18617: checking for Ruby
configure:18641: result: yes
configure:18653: checking for ruby
configure:18671: found /usr/bin/ruby
configure:18684: result: /usr/bin/ruby
configure:18694: checking Ruby version
configure:18698: result: 1.8.3
configure:18701: checking for Ruby header files
configure:18706: result: /usr/lib/ruby/1.8/i486-linux
configure:18765: tcc -o conftest ... -rdynamic -Wl,-export-dynamic ... conftest.c -lruby1.8 ... >&5
tcc: unsupported linker option '-export-dynamic'
configure:18771: $? = 1
configure:18808: error: Ruby not found
----------------------------------------------------------------------

The `-rdynamic -Wl,-export-dynamic` options come from this command:

----------------------------------------------------------------------
ruby -r rbconfig -e 'print Config::CONFIG["LDFLAGS"]'
----------------------------------------------------------------------

TCC 0.9.23 supports the former but not the latter.  To work around the
error, configure `\--without-ruby`.

Stabs entry has invalid string index
------------------------------------

----------------------------------------------------------------------
ld -r -o lib.o frames.o parser.o renderer.o tables.o parser/lib.o
ld: parser/lib.o(.stab+0x2688): Stabs entry has invalid string index.
parser/lib.o: could not read symbols: Bad value
----------------------------------------------------------------------

Apparently, GNU ld 2.16.91 does not like the debug information
generated by TCC 0.9.23.  To work around the error, either set
`LD=tcc` or remove `-g` from `CFLAGS`.

Linker segfault
---------------

If you configure ELinks with both `\--with-gnutls` and `\--with-guile`,
TCC 0.9.23 crashes when it's trying to link ELinks.

http://bugs.debian.org/418360[Debian bug #418360] has a patch that
fixes this.

Undefined symbol alloca
-----------------------

----------------------------------------------------------------------
    [LINK]   src/elinks
tcc: undefined symbol 'alloca'
----------------------------------------------------------------------

GNU libc 2.3.6 declares `alloca()` in `<alloca.h>` but does not
actually define it as a function, perhaps because the definition must
be specific to each compiler.  TCC 0.9.23 does not define `alloca()`
either and fails to generate an executable but stupidly exits with
code 0.

In ELinks, only `intl/gettext/plural.c` uses `alloca()`, so you can
avoid the error with `configure --disable-nls`.

Unexpanded @HAVE_ALLOCA_H@ in <see/type.h>
------------------------------------------

----------------------------------------------------------------------
.../include/see/type.h:180: identifier expected
----------------------------------------------------------------------

`<see/type.h>` of
http://www.adaptive-enterprises.com.au/~d/software/see/[Simple
ECMAScript Engine] 2.0.1131 has an unexpanded `@HAVE_ALLOCA_H@` inside
`#ifndef __GNUC__`.  Of course, TCC 0.9.23 does not define `__GNUC__`,
so an error results.  To avoid the error, either configure ELinks
`\--without-see`, or edit `<see/type.h>`.

Reported as
http://www.adaptive-enterprises.com.au/bugs/show_bug.cgi?id=65[SEE bug 65].

Advanced: Compiling SEE with TCC
--------------------------------

If you want even more problems, try compiling Simple ECMAScript Engine
with Tiny C Compiler as well.

Wrong precedence of sizeof
~~~~~~~~~~~~~~~~~~~~~~~~~~

----------------------------------------------------------------------
.../see-2.0.1131/libsee/unicase.c:86: pointer expected
----------------------------------------------------------------------

TCC 0.9.23 misparses `sizeof (a)[0]` used in the `lengthof` macro.
To work around the bug, change it to `sizeof ((a)[0])`.

Reported as http://bugs.debian.org/419203[Debian bug #419203].

Linker option -soname not supported
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

----------------------------------------------------------------------
tcc: invalid option -- '-soname'
----------------------------------------------------------------------

To construct a proper ELF library, the build system of SEE 2.0.1131
must specify the shared object name.  Unfortunately, TCC 0.9.23 does
not appear to support any such option.  So, use some other linker.