Skip to content

Commit

Permalink
jit: on OS X, add -Wl,-undefined,dynamic_lookup to driver invocation
Browse files Browse the repository at this point in the history
gcc/jit/ChangeLog:
	* jit-playback.c (invoke_driver): On OS X, add
	"-Wl,-undefined,dynamic_lookup" to the driver arguments.



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@226882 138bc75d-0d04-0410-961f-82ee72b054a4
  • Loading branch information
dmalcolm committed Aug 14, 2015
1 parent f7d93d6 commit 2d511d1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
5 changes: 5 additions & 0 deletions gcc/jit/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2015-08-13 David Malcolm <[email protected]>

* jit-playback.c (invoke_driver): On OS X, add
"-Wl,-undefined,dynamic_lookup" to the driver arguments.

2015-08-03 David Malcolm <[email protected]>

* docs/topics/compatibility.rst (LIBGCCJIT_ABI_4): New.
Expand Down
9 changes: 9 additions & 0 deletions gcc/jit/jit-playback.c
Original file line number Diff line number Diff line change
Expand Up @@ -2416,6 +2416,15 @@ invoke_driver (const char *ctxt_progname,
time. */
ADD_ARG ("-fno-use-linker-plugin");

#if defined (DARWIN_X86) || defined (DARWIN_PPC)
/* OS X's linker defaults to treating undefined symbols as errors.
If the context has any imported functions or globals they will be
undefined until the .so is dynamically-linked into the process.
Ensure that the driver passes in "-undefined dynamic_lookup" to the
linker. */
ADD_ARG ("-Wl,-undefined,dynamic_lookup");
#endif

/* pex argv arrays are NULL-terminated. */
argvec.safe_push (NULL);

Expand Down

0 comments on commit 2d511d1

Please sign in to comment.