Cygwin/MinGW: Do not version lto plugins
authorJonathan Yong <10walls@gmail.com>
Thu, 10 Sep 2020 11:48:41 +0000 (11:48 +0000)
committerJonathan Yong <10walls@gmail.com>
Thu, 10 Sep 2020 11:54:28 +0000 (11:54 +0000)
GCC on Linux already uses liblto_plugin.so directly without
the libtool version suffix, adjust windows GCC to do the same.

gcc/ChangeLog:

* config.host: Adjust plugin name for Windows.

lto-plugin/ChangeLog:

* Makefile.am: drop versioning from libtool completely.
* Makefile.in: regenerate.

gcc/config.host
lto-plugin/Makefile.am
lto-plugin/Makefile.in

index 84f0433e2ad25c8620a175a4b18641cc327a73cc..373d5efd8da35e69d034ba9a97097e3c1afcb998 100644 (file)
@@ -232,7 +232,7 @@ case ${host} in
     out_host_hook_obj=host-cygwin.o
     host_xmake_file="${host_xmake_file} i386/x-cygwin"
     host_exeext=.exe
-    host_lto_plugin_soname=cyglto_plugin-0.dll
+    host_lto_plugin_soname=cyglto_plugin.dll
     ;;
   i[34567]86-*-mingw32*)
     host_xm_file=i386/xm-mingw32.h
@@ -240,7 +240,7 @@ case ${host} in
     host_exeext=.exe
     out_host_hook_obj=host-mingw32.o
     host_extra_gcc_objs="${host_extra_gcc_objs} driver-mingw32.o"
-    host_lto_plugin_soname=liblto_plugin-0.dll
+    host_lto_plugin_soname=liblto_plugin.dll
     ;;
   x86_64-*-mingw*)
     use_long_long_for_widest_fast_int=yes
@@ -249,7 +249,7 @@ case ${host} in
     host_exeext=.exe
     out_host_hook_obj=host-mingw32.o
     host_extra_gcc_objs="${host_extra_gcc_objs} driver-mingw32.o"
-    host_lto_plugin_soname=liblto_plugin-0.dll
+    host_lto_plugin_soname=liblto_plugin.dll
     ;;
   i[34567]86-*-darwin* | x86_64-*-darwin*)
     out_host_hook_obj="${out_host_hook_obj} host-i386-darwin.o"
index ba5882df7a7272f65219191c82ecd78ab4d3725e..204b25f45ef2f22bb246641a2aa9f9d09719737b 100644 (file)
@@ -21,7 +21,7 @@ in_gcc_libs = $(foreach lib, $(libexecsub_LTLIBRARIES), $(gcc_build_dir)/$(lib))
 liblto_plugin_la_SOURCES = lto-plugin.c
 # Note that we intentionally override the bindir supplied by ACX_LT_HOST_FLAGS.
 liblto_plugin_la_LDFLAGS = $(AM_LDFLAGS) \
-       $(lt_host_flags) -module -bindir $(libexecsubdir)
+       $(lt_host_flags) -module -avoid-version -bindir $(libexecsubdir)
 # Can be simplified when libiberty becomes a normal convenience library.
 libiberty = $(with_libiberty)/libiberty.a
 libiberty_noasan = $(with_libiberty)/noasan/libiberty.a
index 7da7cd26dbff9c21e0757926162d5615ef48479c..834699b439e03cd1213c4b7fe1867ff7b5f19e98 100644 (file)
@@ -350,7 +350,7 @@ libexecsub_LTLIBRARIES = liblto_plugin.la
 in_gcc_libs = $(foreach lib, $(libexecsub_LTLIBRARIES), $(gcc_build_dir)/$(lib))
 liblto_plugin_la_SOURCES = lto-plugin.c
 # Note that we intentionally override the bindir supplied by ACX_LT_HOST_FLAGS.
-liblto_plugin_la_LDFLAGS = $(AM_LDFLAGS) $(lt_host_flags) -module \
+liblto_plugin_la_LDFLAGS = $(AM_LDFLAGS) $(lt_host_flags) -module -avoid-version \
        -bindir $(libexecsubdir) $(if $(wildcard \
        $(libiberty_noasan)),, $(if $(wildcard \
        $(libiberty_pic)),,-Wc,$(libiberty)))