Changeset 3c9fc94
- Timestamp:
- 06/03/15 10:23:56 (9 years ago)
- Branches:
- master
- Children:
- 9f07fa4
- Parents:
- 4c51931
- git-author:
- Hal Finkel <hfinkel@…> (06/03/15 10:23:56)
- git-committer:
- Hal Finkel <hfinkel@…> (06/03/15 10:23:56)
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
Makefile
r4598848 r3c9fc94 20 20 install: all memlog_analyze README 21 21 cp -a libmemlog.so memlog_s.o memlog_analyze README $(DESTDIR)/ 22 echo '-Wl,--wrap,malloc,--wrap,valloc,--wrap,realloc,--wrap,calloc,--wrap,memalign,--wrap,free,--wrap,posix_memalign,--wrap,mmap,--wrap,mmap64,--wrap,munmap $(DESTDIR)/memlog_s.o -lpthread -ldl' > $(DESTDIR)/memlog_s_ld_cmds 22 23 23 24 clean: -
README
red8b809 r3c9fc94 16 16 -L/path/to/memlog -Wl,-rpath,/path/to/memlog -lmemlog 17 17 18 For statically-linked applications, add the following to your linker flags: 18 For statically-linked applications ld's automatic wrapping functionality is 19 employed, and the exact set of necessary flags is large, so a file named 20 memlog_s_ld_cmds has been provided containing the necessary flags. 19 21 20 -Wl,--wrap,malloc,--wrap,valloc,--wrap,realloc,--wrap,calloc,--wrap,memalign,--wrap,free \ 21 -Wl,--wrap,posix_memalign,--wrap,mmap,--wrap,mmap64,--wrap,munmap \ 22 /path/to/memlog/memlog_s.o -lpthread -ldl 22 To your linker flags add: 23 24 `cat /path/to/memlog/memlog_s_ld_cmds` 25 26 or, if your compiler and wrappers support response files (gcc and clang do, for 27 example), simply: 28 29 @/path/to/memlog/memlog_s_ld_cmds 30 31 so your overall linking command might look something like this: 32 33 mpic++ -O3 -g -o my_program my_obj1.o my_obj2.o @/path/to/memlog/memlog_s_ld_cmds 23 34 24 35 ** RUNNING **
Note: See TracChangeset
for help on using the changeset viewer.