summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bfd/plugin.c8
-rw-r--r--packaging/binutils.spec1
-rw-r--r--packaging/cross-aarch64-binutils.spec1
-rw-r--r--packaging/cross-arm-binutils.spec1
-rw-r--r--packaging/cross-i386-binutils.spec1
5 files changed, 12 insertions, 0 deletions
diff --git a/bfd/plugin.c b/bfd/plugin.c
index a068861641c..f30eadef4c1 100644
--- a/bfd/plugin.c
+++ b/bfd/plugin.c
@@ -295,6 +295,14 @@ load_plugin (bfd *abfd)
char *full_name;
struct stat s;
+#ifdef BFD_PLUGIN_LTO_NAME
+#define STRINGIFY(x) STRINGIFY_(x)
+#define STRINGIFY_(x) #x
+ if (strcmp(ent->d_name, STRINGIFY(BFD_PLUGIN_LTO_NAME))) {
+ continue;
+ }
+#endif
+
full_name = concat (p, "/", ent->d_name, NULL);
if (stat(full_name, &s) == 0 && S_ISREG (s.st_mode))
found = try_load_plugin (full_name, abfd);
diff --git a/packaging/binutils.spec b/packaging/binutils.spec
index ea297c61e59..93759a73860 100644
--- a/packaging/binutils.spec
+++ b/packaging/binutils.spec
@@ -105,6 +105,7 @@ ulimit -s unlimited
sed -i -e '/BFD_VERSION_DATE/s/$/-%(echo %release | sed 's/\.[0-9]*$//')/' bfd/version.h
%build
+RPM_OPT_FLAGS="$RPM_OPT_FLAGS -DBFD_PLUGIN_LTO_NAME=liblto_plugin_%{_arch}.so"
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -Wno-error"
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS |sed -e 's/atom/i686/g'`
%if 0%{!?cross:1}
diff --git a/packaging/cross-aarch64-binutils.spec b/packaging/cross-aarch64-binutils.spec
index b37beecde84..b3d12264865 100644
--- a/packaging/cross-aarch64-binutils.spec
+++ b/packaging/cross-aarch64-binutils.spec
@@ -106,6 +106,7 @@ ulimit -s unlimited
sed -i -e '/BFD_VERSION_DATE/s/$/-%(echo %release | sed 's/\.[0-9]*$//')/' bfd/version.h
%build
+RPM_OPT_FLAGS="$RPM_OPT_FLAGS -DBFD_PLUGIN_LTO_NAME=liblto_plugin_%{_arch}.so"
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -Wno-error"
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS |sed -e 's/atom/i686/g'`
%if 0%{!?cross:1}
diff --git a/packaging/cross-arm-binutils.spec b/packaging/cross-arm-binutils.spec
index 461b208ceaf..0b00125372f 100644
--- a/packaging/cross-arm-binutils.spec
+++ b/packaging/cross-arm-binutils.spec
@@ -106,6 +106,7 @@ ulimit -s unlimited
sed -i -e '/BFD_VERSION_DATE/s/$/-%(echo %release | sed 's/\.[0-9]*$//')/' bfd/version.h
%build
+RPM_OPT_FLAGS="$RPM_OPT_FLAGS -DBFD_PLUGIN_LTO_NAME=liblto_plugin_%{_arch}.so"
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -Wno-error"
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS |sed -e 's/atom/i686/g'`
%if 0%{!?cross:1}
diff --git a/packaging/cross-i386-binutils.spec b/packaging/cross-i386-binutils.spec
index 05fd06c8dba..12e80194c3e 100644
--- a/packaging/cross-i386-binutils.spec
+++ b/packaging/cross-i386-binutils.spec
@@ -106,6 +106,7 @@ ulimit -s unlimited
sed -i -e '/BFD_VERSION_DATE/s/$/-%(echo %release | sed 's/\.[0-9]*$//')/' bfd/version.h
%build
+RPM_OPT_FLAGS="$RPM_OPT_FLAGS -DBFD_PLUGIN_LTO_NAME=liblto_plugin_%{_arch}.so"
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -Wno-error"
RPM_OPT_FLAGS=`echo $RPM_OPT_FLAGS |sed -e 's/atom/i686/g'`
%if 0%{!?cross:1}