Skip to content

Build third-party libraries with Intel Pin CRT

License

Notifications You must be signed in to change notification settings

tsinghua-ideal/pincrt_build

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Install libraries with Intel Pin CRT

Starting from Pin 3, Pin requires all dependencies of pintools, such as third-party libraries, to be rebuilt with its own runtime, a.k.a., PinCRT [1]. These scripts provide an automatic flow for this purpose, through the use of GCC's spec files [2].

PinCRT requirements

  1. to set special compiler flags;

  2. to include special system headers, instead of standard headers;

  3. to set special link flags;

  4. to link only with given runtime libraries, without standard libraries.

GCC's spec file

  1. dump the default spec file by gcc -dumpspecs.

  2. change the cc1 rule, by renaming it and adding more flags.

  3. add the header paths with -isystem in the cc1 rule.

  4. change the cc1plus rule, by renaming it and adding more flags.

  5. create a new rule pin_link for link flags, and modify the link_command rule to use it.

  6. create new rules pincrt_startfile, pincrt_endfile, pincrt_libs, and modify the link_command rule to use them. Also, use %:remove-outfile() function to remove the standard libraries.

Install path

The install path is set to be the parent directory of the top directory. In another word, this directory should be the src directory besides include, lib, etc..

About

Build third-party libraries with Intel Pin CRT

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages