Hardcode host-specific name for LTO plugin 39/38139/2 accepted/tizen_3.0.2015.q2_common accepted/tizen_common accepted/tizen_mobile accepted/tizen_tv accepted/tizen_wearable tizen tizen_3.0.2015.q2_common tizen_3.0.m1_mobile tizen_3.0.m1_tv tizen_base_old accepted/tizen/3.0.2015.q2/common/20150617.115425 accepted/tizen/base/20151223.052217 accepted/tizen/common/20150617.115454 accepted/tizen/mobile/20150618.112654 accepted/tizen/tv/20150618.103536 accepted/tizen/wearable/20150618.093518 submit/tizen_3.0.2015.q2_common/20150617.082128 submit/tizen_base/20151223.111111 submit/tizen_base/20151223.111112 submit/tizen_common/20150617.082114 submit/tizen_mobile/20150617.000001 submit/tizen_tv/20150617.000001 submit/tizen_wearable/20150617.000001 tizen_3.0.m1_mobile_release tizen_3.0.m1_tv_release tizen_3.0.m2.a1_mobile_release tizen_3.0.m2.a1_tv_release
authorNikolay Bozhenov <n.bozhenov@samsung.com>
Wed, 8 Apr 2015 10:02:40 +0000 (13:02 +0300)
committerDongkyun Son <dongkyun.s@samsung.com>
Thu, 4 Jun 2015 11:55:08 +0000 (04:55 -0700)
Otherwise, binutils can try to use plugin for different architecture.

Change-Id: I3070e774ec7f8494241fe52b7aee6d3ba3acef06

bfd/plugin.c
packaging/binutils.spec
packaging/cross-aarch64-binutils.spec
packaging/cross-arm-binutils.spec
packaging/cross-i386-binutils.spec

index a068861..f30eade 100644 (file)
@@ -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);
index ea297c6..93759a7 100644 (file)
@@ -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}
index b37beec..b3d1226 100644 (file)
@@ -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}
index 461b208..0b00125 100644 (file)
@@ -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}
index 05fd06c..12e8019 100644 (file)
@@ -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}