Skip to content

Commit

Permalink
fixing -Wl,-rpath=<LLVM_LIBDIR>
Browse files Browse the repository at this point in the history
  • Loading branch information
vmezzela committed Dec 5, 2023
1 parent 0e7afb7 commit 6c04d4c
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/afl-cc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

}

Expand Down

0 comments on commit 6c04d4c

Please sign in to comment.