The following issue has been SUBMITTED. 
====================================================================== 
http://cmake.org/Bug/view.php?id=14803 
====================================================================== 
Reported By:                Mathieu Malaterre
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   14803
Category:                   (No Category)
Reproducibility:            have not tried
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2014-03-11 09:14 EDT
Last Modified:              2014-03-11 09:14 EDT
====================================================================== 
Summary:                    support tcc + rpath
Description: 
It would be nice to have tcc+rpath working in cmake.

Steps:
cd /tmp
$ cat l.c
int foo() { return 42; }
$ cat a.c
int main() { return foo(); }
$ tcc -shared -o libl.so l.c
$ tcc -o a a.c  -Wl,-rpath=/tmp -L/tmp -ll
$ ldd a
        linux-vdso.so.1 =>  (0x00007fffe4087000)
        libl.so => /tmp/libl.so (0x00007f8ecce68000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f8eccab8000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f8ecce6c000)
$ readelf -d a
Dynamic section at offset 0x484 contains 12 entries:
  Tag        Type                         Name/Value
 0x0000000000000001 (NEEDED)             Shared library: [libl.so]
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]
 0x000000000000000f (RPATH)              Library rpath: [/tmp]
 0x0000000000000004 (HASH)               0x8048220
 0x0000000000000005 (STRTAB)             0x80481cc
 0x0000000000000006 (SYMTAB)             0x804813c
 0x000000000000000a (STRSZ)              82 (bytes)
 0x000000000000000b (SYMENT)             24 (bytes)
 0x0000000000000007 (RELA)               0x8048250
 0x0000000000000008 (RELASZ)             96 (bytes)
 0x0000000000000009 (RELAENT)            24 (bytes)
 0x0000000000000000 (NULL)               0x0

See:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=663945

Watch out that tcc requires "-Wl,-rpath=" (not -Wl,-rpath
-Wl,<some_search_path>")
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2014-03-11 09:14 Mathieu MalaterreNew Issue                                    
======================================================================

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Reply via email to