Notes |
|
(0027887)
|
Brad King
|
2011-12-02 10:02
|
|
|
|
(0027888)
|
Mathieu Malaterre
|
2011-12-02 10:03
|
|
Yes, sorry if this was not clear. On debian, simply do:
$ sudo apt-get install tcc |
|
|
(0027889)
|
Brad King
|
2011-12-02 10:15
|
|
|
|
(0027890)
|
Brad King
|
2011-12-02 10:31
|
|
Try the patch 1f49d725+0001-TinyCC-Add-compiler-info-for-shared-libs-on-Linux-12.patch on top of commit 1f49d725. It seems sufficient for the CMake COnly test to build (static lib, shared lib, and exec). However the resulting executable does not run:
COnly$ export LD_LIBRARY_PATH=.
COnly$ ldd ./COnly
linux-vdso.so.1 => (0x00007ffff9562000)
libtestc2.so => ./libtestc2.so (0x00007f09f9023000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f09f8c79000)
/lib/ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2 (0x00007f09f9027000)
COnly$ ./COnly
bash: ./COnly: No such file or directory
|
|
|
(0027893)
|
Mathieu Malaterre
|
2011-12-02 11:08
|
|
Works for me (debian/squeeze),
$ tcc -version
tcc version 0.9.25
$ LD_LIBRARY_PATH=. ./COnly
Foo: Foo 0
$ ldd ./COnly
linux-vdso.so.1 => (0x00007fff60efe000)
libtestc2.so => not found
libc.so.6 => /lib/libc.so.6 (0x00007fc04f426000)
/lib/ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2 (0x00007fc04f7b0000)
$ readelf -d libtestc2.so
Dynamic section at offset 0x464 contains 12 entries:
Tag Type Name/Value
0x0000000000000001 (NEEDED) Shared library: [libc.so.6]
0x000000000000000e (SONAME) Library soname: [libtestc2.so]
0x0000000000000016 (TEXTREL) 0x0
0x0000000000000004 (HASH) 0x350
0x0000000000000005 (STRTAB) 0x268
0x0000000000000006 (SYMTAB) 0xe8
0x000000000000000a (STRSZ) 231 (bytes)
0x000000000000000b (SYMENT) 24 (bytes)
0x0000000000000007 (RELA) 0x3b8
0x0000000000000008 (RELASZ) 48 (bytes)
0x0000000000000009 (RELAENT) 24 (bytes)
0x0000000000000000 (NULL) 0x0
Marking as closed ? |
|
|
(0027894)
|
Mathieu Malaterre
|
2011-12-02 11:13
|
|
I can build openjpeg fine (in absolutely no time). Thanks ! |
|
|
(0027895)
|
Mathieu Malaterre
|
2011-12-02 11:17
|
|
tcc does support debug info with -g switch:
Debugger options:
-g generate runtime debug info
-bt N show N callers in stack traces |
|
|
(0027896)
|
Brad King
|
2011-12-02 11:28
|
|
|
|
(0027897)
|
Mathieu Malaterre
|
2011-12-02 11:40
|
|
Uploaded as 0251-Add-default-compilation-flags-for-TinyCC.patch
Thanks |
|
|
(0027898)
|
Brad King
|
2011-12-02 13:07
|
|
I think this hunk:
+# no optimisation in tcc:
+SET (CMAKE_C_FLAGS_INIT "")
+SET (CMAKE_C_FLAGS_DEBUG_INIT "-g")
+SET (CMAKE_C_FLAGS_MINSIZEREL_INIT "-DNDEBUG")
+SET (CMAKE_C_FLAGS_RELEASE_INIT "-DNDEBUG")
+SET (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-g")
can go in Modules/Compiler/TinyCC-C.cmake instead because they are not platform-specific flags for the compiler. Please test that and update the patch. |
|
|
(0027902)
|
Mathieu Malaterre
|
2011-12-03 06:24
|
|
Uploaded as 0001-Add-default-compilation-flags-for-TinyCC.patch
I can still build openjpeg fine.
Thanks |
|
|
(0027910)
|
Brad King
|
2011-12-05 09:02
|
|
|
|
(0029450)
|
David Cole
|
2012-05-09 15:26
|
|
Closing resolved issues that have not been updated in more than 4 months. |
|