diff options
author | van Hauser <vh@thc.org> | 2023-12-05 17:58:24 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-05 17:58:24 +0100 |
commit | 548220432742ec16dd806c014e73c6ad096350f8 (patch) | |
tree | 10f0f8836936e9ee1e277619a0ddc46b1a0c4efc | |
parent | 638273e4f80ba89ada8a4428a6211ee6b59d964a (diff) | |
parent | 6c04d4cc80b55efee8bb005bbd616a0aaeede395 (diff) | |
download | afl++-548220432742ec16dd806c014e73c6ad096350f8.tar.gz |
Merge pull request #1922 from m-Vins/dev
fixing -Wl,-rpath=<LLVM_LIBDIR>
-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; } |