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
2015-08-13  David Malcolm  <[email protected]>

	Backport from mainline r226882
	2015-08-13  David Malcolm  <[email protected]>

	* 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/branches/gcc-5-branch@226883 138bc75d-0d04-0410-961f-82ee72b054a4
  • Loading branch information
dmalcolm committed Aug 14, 2015
1 parent a4b1d25 commit 2f88614
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
8 changes: 8 additions & 0 deletions gcc/jit/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
2015-08-13 David Malcolm <[email protected]>

Backport from mainline r226882
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-07-23 David Malcolm <[email protected]>

Backport from mainline r226126
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 @@ -2461,6 +2461,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 2f88614

Please sign in to comment.