Skip to content

Commit 09081a4

Browse files
committed
fix: updated base projects for pin3.21
1 parent 08b5b52 commit 09081a4

File tree

3 files changed

+24
-21
lines changed

3 files changed

+24
-21
lines changed

config/pin_base.mpb

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,16 @@ 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 \
9+
$(PIN_ROOT)/extras/crt/include \
10+
$(PIN_ROOT)/extras/crt/include/kernel/uapi \
11+
$(PIN_ROOT)/extras/crt/include/kernel/uapi/asm-x86 \
12+
$(PIN_ROOT)/libunwind/include \
713
$(PIN_ROOT)/extras/components/include \
8-
$(PIN_ROOT)/extras/crt/include
14+
$(PIN_ROOT)/extras/crt/include
915

1016
macros += BIGARRAY_MULTIPLIER=1 USING_XED PIN_CRT=1 __PIN__=1
11-
lit_libs += c-dynamic m-dynamic stlport-dynamic dl-dynamic unwind-dynamic
1217

1318
specific (vc9) {
1419
runtime_library = 0
@@ -36,18 +41,20 @@ project {
3641
}
3742

3843
specific (gnuace, make) {
39-
compile_flags += -O3 -funwind-tables -fno-stack-protector -fasynchronous-unwind-tables -fomit-frame-pointer -fno-strict-aliasing -fno-rtti -faligned-new -fPIC -nostdlib -fpermissive -Wno-error=all -fno-exceptions
40-
compile_flags += '-isystem $(PIN_ROOT)/extras/stlport/include -isystem $(PIN_ROOT)/extras/libstdc++/include -isystem $(PIN_ROOT)/extras/crt/include -isystem $(PIN_ROOT)/extras/crt/include/kernel/uapi'
44+
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
4145
compile_flags -= -Wunused-parameter
4246

4347
libs += xed
48+
libs += c-dynamic m-dynamic stlport-dynamic unwind-dynamic
4449
}
4550

4651
verbatim (make, macros) {
4752
ifeq ($(shell uname -s), Darwin)
48-
CPPFLAGS += -DTARGET_MAC
53+
CPPFLAGS += -DTARGET_MAC -D__DARWIN_ONLY_UNIX_CONFORMANCE=1 -D__DARWIN_UNIX03=0
54+
LDFLAGS += -Wl,-no_new_main
4955
else
50-
CPPFLAGS += -DTARGET_LINUX
56+
CPPFLAGS += -DTARGET_LINUX -faligned-new
57+
LDFLAGS += -ldl-dynamic
5158
endif
5259

5360
// We have to disable hidden symbols since we are not manually exporting
@@ -57,15 +64,16 @@ project {
5764

5865
verbatim (gnuace, macros) {
5966
ifeq ($(shell uname -s), Darwin)
60-
CPPFLAGS += -DTARGET_MAC
67+
CPPFLAGS += -DTARGET_MAC -D__DARWIN_ONLY_UNIX_CONFORMANCE=1 -D__DARWIN_UNIX03=0
6168
else
62-
CPPFLAGS += -DTARGET_LINUX -Wl,--hash-style=sysv
69+
CPPFLAGS += -DTARGET_LINUX -Wl,--hash-style=sysv -faligned-new
6370
endif
6471
}
6572
}
6673

6774
feature(ia32) {
68-
includes += $(PIN_ROOT)/extras/xed-ia32/include
75+
includes += $(PIN_ROOT)/extras/xed-ia32/include \
76+
$(PIN_ROOT)/extras/crt/include/arch-x86
6977

7078
libpaths += $(PIN_ROOT)/ia32/lib \
7179
$(PIN_ROOT)/ia32/lib-ext \
@@ -90,12 +98,14 @@ feature(ia32) {
9098

9199
feature(intel64) {
92100
includes += $(PIN_ROOT)/extras/xed-intel64/include \
93-
$(PIN_ROOT)/extras/xed-intel64/include/xed
101+
$(PIN_ROOT)/extras/xed-intel64/include/xed \
102+
$(PIN_ROOT)/extras/crt/include/arch-x86_64
94103

95104
libpaths += $(PIN_ROOT)/intel64/lib \
96105
$(PIN_ROOT)/intel64/lib-ext \
97106
$(PIN_ROOT)/extras/xed-intel64/lib \
98-
$(PIN_ROOT)/extras/components/lib/intel64
107+
$(PIN_ROOT)/extras/components/lib/intel64 \
108+
$(PIN_ROOT)/intel64/runtime/pincrt
99109

100110
macros += TARGET_IA32E HOST_IA32E
101111
avoids += ia32

config/pintool.mpb

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,19 @@ project : pin {
1414
verbatim (make, macros) {
1515
ifeq ($(shell uname -s), Darwin)
1616
CPPFLAGS += -DTARGET_MAC
17-
LDFLAGS += -nostdlib -ldl-dynamic -lunwind-dynamic -lpin3dwarf -lpinpthread -Wl,-exported_symbols_list -Wl,$(PIN_ROOT)/source/include/pin/pintool.exp
17+
LDFLAGS += -nostdlib -lpin3dwarf -Wl,-exported_symbols_list -Wl,$(PIN_ROOT)/source/include/pin/pintool.exp
1818
LDFLAGS -= -lpthread
1919
else
2020
CPPFLAGS += -DTARGET_LINUX -fno-rtti -Wl,--hash-style=sysv
21-
LDLIBS += -nostdlib -ldl-dynamic -lunwind-dynamic -lpin3dwarf
21+
LDLIBS += -nostdlib -ldl-dynamic -lpin3dwarf
2222
LDFLAGS += -Wl,-Bsymbolic -Wl,--version-script=$(PIN_ROOT)/source/include/pin/pintool.ver
2323
endif
2424
}
2525

2626
verbatim (gnuace, macros) {
2727
ifeq ($(shell uname -s), Darwin)
2828
CPPFLAGS += -DTARGET_MAC
29-
LDFLAGS += -lpindwarf -lpinpthread -Wl,-exported_symbols_list -Wl,$(PIN_ROOT)/source/include/pin/pintool.exp
29+
LDFLAGS += -lpinpthread -Wl,-exported_symbols_list -Wl,$(PIN_ROOT)/source/include/pin/pintool.exp
3030
LDFLAGS -= -lpthread
3131
else
3232
CPPFLAGS += -DTARGET_LINUX -Wl,--hash-style=sysv
@@ -54,9 +54,4 @@ feature (intel64) {
5454
specific (prop:microsoft) {
5555
EntryPointSymbol = Ptrace_DllMainCRTStartup
5656
}
57-
58-
specific (make, gnuace) {
59-
compile_flags += $(PIN_ROOT)/intel64/runtime/pincrt/crtendS.o
60-
libpaths += $(PIN_ROOT)/intel64/runtime/pincrt
61-
}
6257
}

config/pintool_static.mpb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ project : pin_static {
1010
verbatim (make, macros) {
1111
ifeq ($(shell uname -s), Darwin)
1212
CPPFLAGS += -DTARGET_MAC
13-
LDFLAGS += -lpindwarf -lpinpthread
1413
LDFLAGS -= -lpthread
1514
else
1615
CPPFLAGS += -DTARGET_LINUX
@@ -23,7 +22,6 @@ project : pin_static {
2322
verbatim (gnuace, macros) {
2423
ifeq ($(shell uname -s), Darwin)
2524
CPPFLAGS += -DTARGET_MAC
26-
LDFLAGS += -lpindwarf -lpinpthread
2725
LDFLAGS -= -lpthread
2826
else
2927
# TODO Add support for linking against gcc libraries included with Pin

0 commit comments

Comments
 (0)