Skip to content

Commit

Permalink
hfuzz-cc: don't use --wrap for MacOSX
Browse files Browse the repository at this point in the history
  • Loading branch information
robertswiecki committed Feb 7, 2018
1 parent aed1f87 commit 28c7d9e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -402,9 +402,9 @@ libhfnetdriver/netdriver.o: libhfcommon/files.h libhfcommon/common.h
libhfnetdriver/netdriver.o: libhfcommon/log.h libhfcommon/ns.h
libhfuzz/instrument.o: libhfuzz/instrument.h honggfuzz.h libhfcommon/util.h
libhfuzz/instrument.o: libhfcommon/common.h libhfcommon/log.h
libhfuzz/linux.o: libhfcommon/common.h libhfuzz/libhfuzz.h
libhfuzz/linux.o: libhfcommon/files.h libhfcommon/common.h libhfcommon/log.h
libhfuzz/linux.o: libhfcommon/ns.h
libhfuzz/linux.o: libhfcommon/common.h libhfcommon/files.h
libhfuzz/linux.o: libhfcommon/common.h libhfcommon/log.h libhfcommon/ns.h
libhfuzz/linux.o: libhfuzz/libhfuzz.h
libhfuzz/main.o: honggfuzz.h libhfcommon/util.h libhfcommon/log.h
libhfuzz/main.o: libhfuzz/persistent.h
libhfuzz/memorycmp.o: libhfcommon/common.h libhfuzz/instrument.h
Expand Down
3 changes: 3 additions & 0 deletions hfuzz_cc/hfuzz-cc.c
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,8 @@ static int ldMode(int argc, char** argv) {

commonOpts(&j, args);

/* MacOS X linker doesn't like those */
#ifndef _HF_ARCH_DARWIN
/* Intercept common *cmp functions */
args[j++] = "-Wl,--wrap=strcmp";
args[j++] = "-Wl,--wrap=strcasecmp";
Expand Down Expand Up @@ -362,6 +364,7 @@ static int ldMode(int argc, char** argv) {
args[j++] = "-Wl,--wrap=xmlStrncasecmp";
args[j++] = "-Wl,--wrap=xmlStrstr";
args[j++] = "-Wl,--wrap=xmlStrcasestr";
#endif /* _HF_ARCH_DARWIN */

for (int i = 1; i < argc; i++) {
args[j++] = argv[i];
Expand Down

0 comments on commit 28c7d9e

Please sign in to comment.