diff options
author | van Hauser <vh@thc.org> | 2023-12-05 18:07:53 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-05 18:07:53 +0100 |
commit | 981a90d7883b939cc3b41b8ac9acc3025ff0c164 (patch) | |
tree | 10f0f8836936e9ee1e277619a0ddc46b1a0c4efc /src/afl-cc.c | |
parent | 12505861564c5a3b91220adbb944032a261d6fa4 (diff) | |
parent | 548220432742ec16dd806c014e73c6ad096350f8 (diff) | |
download | afl++-981a90d7883b939cc3b41b8ac9acc3025ff0c164.tar.gz |
Merge pull request #1924 from AFLplusplus/dev
push to stable
Diffstat (limited to 'src/afl-cc.c')
-rw-r--r-- | src/afl-cc.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/afl-cc.c b/src/afl-cc.c index 6faed538..ceea61f2 100644 --- a/src/afl-cc.c +++ b/src/afl-cc.c @@ -1150,16 +1150,12 @@ static void edit_params(u32 argc, char **argv, char **envp) { // in case LLVM is installed not via a package manager or "make install" // e.g. compiled download or compiled from github then its ./lib directory // might not be in the search path. Add it if so. - u8 *libdir = strdup(LLVM_LIBDIR); + const char *libdir = LLVM_LIBDIR; if (plusplus_mode && strlen(libdir) && strncmp(libdir, "/usr", 4) && strncmp(libdir, "/lib", 4)) { - cc_params[cc_par_cnt++] = "-Wl,-rpath"; - cc_params[cc_par_cnt++] = libdir; - - } else { - - free(libdir); + u8 *libdir_opt = strdup("-Wl,-rpath=" LLVM_LIBDIR); + cc_params[cc_par_cnt++] = libdir_opt; } |