Skip to content

Commit 33c20e2

Browse files
authored
Merge pull request DOCGroup#176 from saipavanmeruga/pin-3.x
fix: added support for static tools in pin-3.26
2 parents fa040f2 + b8876e4 commit 33c20e2

File tree

4 files changed

+9
-10
lines changed

4 files changed

+9
-10
lines changed

config/pin_base.mpb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ project {
44
includes += $(PIN_ROOT)/source/include \
55
$(PIN_ROOT)/source/include/pin \
66
$(PIN_ROOT)/source/include/pin/gen \
7-
$(PIN_ROOT)/extras/stlport/include \
8-
$(PIN_ROOT)/extras/libstdc++/include \
7+
$(PIN_ROOT)/extras/cxx/include \
8+
$(PIN_ROOT)/extras/libstdc++/include \
99
$(PIN_ROOT)/extras/crt/include \
1010
$(PIN_ROOT)/extras/crt/include/kernel/uapi \
1111
$(PIN_ROOT)/extras/crt/include/kernel/uapi/asm-x86 \
@@ -42,10 +42,10 @@ project {
4242

4343
specific (gnuace, make) {
4444
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
45-
compile_flags -= -Wunused-parameter
45+
compile_flags -= -Wunused-parameter -nostdlib
4646

4747
libs += xed
48-
libs += c-dynamic m-dynamic stlport-dynamic unwind-dynamic
48+
libs += c-dynamic m-dynamic c++ c++abi unwind-dynamic
4949
}
5050

5151
verbatim (make, macros) {

config/pin_static.mpb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
project : pin {
2+
requires += static
23
specific (!prop:windows) {
34
libs += sapin
45
libs -= pin

config/pintool.mpb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ project : pin {
1818
LDFLAGS -= -lpthread
1919
else
2020
CPPFLAGS += -DTARGET_LINUX -fno-rtti -Wl,--hash-style=sysv
21-
LDLIBS += -nostdlib -ldl-dynamic -lpin3dwarf
22-
LDFLAGS += -Wl,-Bsymbolic -Wl,--version-script=$(PIN_ROOT)/source/include/pin/pintool.ver
21+
LDLIBS += -nostdlib -ldl-dynamic -lpindwarf
22+
LDFLAGS += -Wl,-Bsymbolic -Wl,$(PIN_ROOT)/intel64/runtime/pincrt/crtbeginS.o $(PIN_ROOT)/intel64/runtime/pincrt/crtendS.o
2323
endif
2424
}
2525

config/pintool_static.mpb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,8 @@ project : pin_static {
1313
LDFLAGS -= -lpthread
1414
else
1515
CPPFLAGS += -DTARGET_LINUX
16-
LDFLAGS += -Wl,--hash-style=sysv -Wl,-Bsymbolic
17-
LDFLAGS -= -ldl -lpthread
18-
LDLIBS += -lpindwarf -ldl
16+
LDFLAGS += -Wl,--hash-style=sysv -Wl,-Bsymbolic,$(PIN_ROOT)/intel64/runtime/pincrt/crtbegin.o $(PIN_ROOT)/intel64/runtime/pincrt/crtend.o
17+
LDLIBS += -nostdlib -ldl-dynamic -lpindwarf
1918
endif
2019
}
2120

@@ -26,7 +25,6 @@ project : pin_static {
2625
else
2726
# TODO Add support for linking against gcc libraries included with Pin
2827
CPPFLAGS += -DTARGET_LINUX
29-
LIBS += -lpindwarf
3028
LDFLAGS += -Wl,--hash-style=sysv -Wl,-Bsymbolic
3129
endif
3230
}

0 commit comments

Comments
 (0)