@@ -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
6774feature(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
9199feature(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
0 commit comments