diff options
author | sameruga <sameruga@iu.edu> | 2023-02-10 11:07:34 -0500 |
---|---|---|
committer | sameruga <sameruga@iu.edu> | 2023-02-10 11:07:34 -0500 |
commit | def9cbea29a57c1a5a6e4bd52edd5b786a6d6212 (patch) | |
tree | e0d39e153398d906fcf7787e4e5e9d80e1b9d619 | |
parent | fa040f2b1e7459119c23d94b18aa0529e5375b3d (diff) | |
download | MPC-def9cbea29a57c1a5a6e4bd52edd5b786a6d6212.tar.gz |
chore: added support for static tools in pin-3.26
-rw-r--r-- | config/pin_base.mpb | 9 | ||||
-rw-r--r-- | config/pin_static.mpb | 1 | ||||
-rw-r--r-- | config/pintool.mpb | 7 | ||||
-rw-r--r-- | config/pintool_static.mpb | 12 |
4 files changed, 17 insertions, 12 deletions
diff --git a/config/pin_base.mpb b/config/pin_base.mpb index bcc6b0b5..e98e28d6 100644 --- a/config/pin_base.mpb +++ b/config/pin_base.mpb @@ -4,8 +4,8 @@ project { includes += $(PIN_ROOT)/source/include \ $(PIN_ROOT)/source/include/pin \ $(PIN_ROOT)/source/include/pin/gen \ - $(PIN_ROOT)/extras/stlport/include \ - $(PIN_ROOT)/extras/libstdc++/include \ + $(PIN_ROOT)/extras/cxx/include \ + $(PIN_ROOT)/extras/libstdc++/include \ $(PIN_ROOT)/extras/crt/include \ $(PIN_ROOT)/extras/crt/include/kernel/uapi \ $(PIN_ROOT)/extras/crt/include/kernel/uapi/asm-x86 \ @@ -42,10 +42,11 @@ project { specific (gnuace, make) { compile_flags += -O3 -funwind-tables -fno-stack-protector -fasynchronous-unwind-tables -fomit-frame-pointer -fno-strict-aliasing -fno-rtti -fPIC -nostdlib -fpermissive -Wno-error=all -fno-exceptions - compile_flags -= -Wunused-parameter + compile_flags -= -Wunused-parameter -nostdlib libs += xed - libs += c-dynamic m-dynamic stlport-dynamic unwind-dynamic + libs += c-dynamic m-dynamic c++ c++abi unwind-dynamic + ldlibs = } verbatim (make, macros) { diff --git a/config/pin_static.mpb b/config/pin_static.mpb index fc257ad7..6d53d0b3 100644 --- a/config/pin_static.mpb +++ b/config/pin_static.mpb @@ -1,4 +1,5 @@ project : pin { +requires += static specific (!prop:windows) { libs += sapin libs -= pin diff --git a/config/pintool.mpb b/config/pintool.mpb index ec97d093..d38cf633 100644 --- a/config/pintool.mpb +++ b/config/pintool.mpb @@ -18,8 +18,8 @@ project : pin { LDFLAGS -= -lpthread else CPPFLAGS += -DTARGET_LINUX -fno-rtti -Wl,--hash-style=sysv - LDLIBS += -nostdlib -ldl-dynamic -lpin3dwarf - LDFLAGS += -Wl,-Bsymbolic -Wl,--version-script=$(PIN_ROOT)/source/include/pin/pintool.ver + LDLIBS += -nostdlib -ldl-dynamic -lpindwarf + LDFLAGS += -Wl,-Bsymbolic -Wl,$(PIN_ROOT)/intel64/runtime/pincrt/crtbeginS.o $(PIN_ROOT)/intel64/runtime/pincrt/crtendS.o endif } @@ -30,7 +30,6 @@ project : pin { LDFLAGS -= -lpthread else CPPFLAGS += -DTARGET_LINUX -Wl,--hash-style=sysv - LIBS += -lpindwarf LDFLAGS += -Wl,-Bsymbolic -Wl,--version-script=$(PIN_ROOT)/source/include/pin/pintool.ver endif } @@ -38,7 +37,7 @@ project : pin { feature (ia32) { specific (vc9) { - link_options += /ENTRY:Ptrace_DllMainCRTStartup@12 + link_ options += /ENTRY:Ptrace_DllMainCRTStartup@12 } specific (prop:microsoft) { diff --git a/config/pintool_static.mpb b/config/pintool_static.mpb index e9301b22..e56021c5 100644 --- a/config/pintool_static.mpb +++ b/config/pintool_static.mpb @@ -1,4 +1,9 @@ project : pin_static { + specific (gnuace, make) { + libs += c-static os-apis + libs -= c-dynamic m-dynamic stlport-dynamic unwind-dynamic xed + } + verbatim (make, top) { no_hidden_visibility = 1 } @@ -13,9 +18,8 @@ project : pin_static { LDFLAGS -= -lpthread else CPPFLAGS += -DTARGET_LINUX - LDFLAGS += -Wl,--hash-style=sysv -Wl,-Bsymbolic - LDFLAGS -= -ldl -lpthread - LDLIBS += -lpindwarf -ldl + LDFLAGS += -Wl,--hash-style=sysv -Wl,-Bsymbolic,$(PIN_ROOT)/intel64/runtime/pincrt/crtbegin.o $(PIN_ROOT)/intel64/runtime/pincrt/crtend.o + LDLIBS += -nostdlib -ldl-dynamic -lpindwarf endif } @@ -26,7 +30,7 @@ project : pin_static { else # TODO Add support for linking against gcc libraries included with Pin CPPFLAGS += -DTARGET_LINUX - LIBS += -lpindwarf + LIBS += -static LDFLAGS += -Wl,--hash-style=sysv -Wl,-Bsymbolic endif } |