diff options
author | David Malcolm <dmalcolm@redhat.com> | 2018-03-09 15:24:44 +0000 |
---|---|---|
committer | David Malcolm <dmalcolm@gcc.gnu.org> | 2018-03-09 15:24:44 +0000 |
commit | deb3da39d6ec5b94f45679860ae48a7037939f9f (patch) | |
tree | be3e50e2422a1c4eff607d0c25b1b0133ae9dc03 /gcc/jit | |
parent | 20003c3cc31bf4ef40a0e03b4f237698e3e1b0ec (diff) | |
download | gcc-deb3da39d6ec5b94f45679860ae48a7037939f9f.zip gcc-deb3da39d6ec5b94f45679860ae48a7037939f9f.tar.gz gcc-deb3da39d6ec5b94f45679860ae48a7037939f9f.tar.bz2 |
jit: use 'configure' to replace hard-coded linker options (PR jit/64089 and PR jit/84288)
gcc/ChangeLog:
PR jit/64089
PR jit/84288
* Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
* configure: Regenerate.
* configure.ac ("linker --version-script option"): New.
("linker soname option"): New.
gcc/jit/ChangeLog:
PR jit/64089
PR jit/84288
* Make-lang.in (COMMA): New.
(LIBGCCJIT_VERSION_SCRIPT_OPTION): New.
(LIBGCCJIT_SONAME_OPTION): New.
(jit): Move --version-script and -soname linker options to the
above.
Co-Authored-By: Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
From-SVN: r258388
Diffstat (limited to 'gcc/jit')
-rw-r--r-- | gcc/jit/ChangeLog | 11 | ||||
-rw-r--r-- | gcc/jit/Make-lang.in | 17 |
2 files changed, 26 insertions, 2 deletions
diff --git a/gcc/jit/ChangeLog b/gcc/jit/ChangeLog index 8bb0002..8ae54f93 100644 --- a/gcc/jit/ChangeLog +++ b/gcc/jit/ChangeLog @@ -1,3 +1,14 @@ +2018-03-09 David Malcolm <dmalcolm@redhat.com> + Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> + + PR jit/64089 + PR jit/84288 + * Make-lang.in (COMMA): New. + (LIBGCCJIT_VERSION_SCRIPT_OPTION): New. + (LIBGCCJIT_SONAME_OPTION): New. + (jit): Move --version-script and -soname linker options to the + above. + 2018-01-25 David Malcolm <dmalcolm@redhat.com> PR jit/81672 diff --git a/gcc/jit/Make-lang.in b/gcc/jit/Make-lang.in index d4362a9..ba78f8e 100644 --- a/gcc/jit/Make-lang.in +++ b/gcc/jit/Make-lang.in @@ -51,6 +51,19 @@ LIBGCCJIT_FILENAME = \ LIBGCCJIT_LINKER_NAME_SYMLINK = $(LIBGCCJIT_LINKER_NAME) LIBGCCJIT_SONAME_SYMLINK = $(LIBGCCJIT_SONAME) +# Conditionalize the use of the LD_VERSION_SCRIPT_OPTION and +# LD_SONAME_OPTION depending if configure found them, using $(if) +# We have to define a COMMA here, otherwise the commas in the "true" +# result are treated as separators by the $(if). +COMMA := , +LIBGCCJIT_VERSION_SCRIPT_OPTION = \ + $(if $(LD_VERSION_SCRIPT_OPTION),\ + -Wl$(COMMA)$(LD_VERSION_SCRIPT_OPTION)$(COMMA)$(srcdir)/jit/libgccjit.map) + +LIBGCCJIT_SONAME_OPTION = \ + $(if $(LD_SONAME_OPTION), \ + -Wl$(COMMA)$(LD_SONAME_OPTION)$(COMMA)$(LIBGCCJIT_SONAME)) + jit: $(LIBGCCJIT_FILENAME) \ $(LIBGCCJIT_SYMLINK) \ $(LIBGCCJIT_LINKER_NAME_SYMLINK) \ @@ -85,8 +98,8 @@ $(LIBGCCJIT_FILENAME): $(jit_OBJS) \ $(jit_OBJS) libbackend.a libcommon-target.a libcommon.a \ $(CPPLIB) $(LIBDECNUMBER) $(LIBS) $(BACKENDLIBS) \ $(EXTRA_GCC_OBJS) \ - -Wl,--version-script=$(srcdir)/jit/libgccjit.map \ - -Wl,-soname,$(LIBGCCJIT_SONAME) + $(LIBGCCJIT_VERSION_SCRIPT_OPTION) \ + $(LIBGCCJIT_SONAME_OPTION) $(LIBGCCJIT_SONAME_SYMLINK): $(LIBGCCJIT_FILENAME) ln -sf $(LIBGCCJIT_FILENAME) $(LIBGCCJIT_SONAME_SYMLINK) |