meta-phosphor: Create obmc-autotools to update AR and RANLIB

Many recipes are turning on -flto which causes issues
with the linker when dealing with libraries. It was suggested here
http://stackoverflow.com/questions/25878407/how-can-i-use-lto-with-static-libraries#comment67660913_25878408
to use the gcc wrappers to deal with this problem. Create flto-automake
class as this seems like something that could be globally applied
if needed.

Tested-by: phosphor-pid-control began to build, saw no new build
issues.

(From meta-phosphor rev: ae3f085053fa2de4783d6f35a6b5f998743a130a)

Change-Id: I3f682cf0fb70e266b544badb0223fa89306332db
Signed-off-by: James Feist <james.feist@linux.intel.com>
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/meta-phosphor/classes/flto-automake.bbclass b/meta-phosphor/classes/flto-automake.bbclass
new file mode 100644
index 0000000..517bd5e
--- /dev/null
+++ b/meta-phosphor/classes/flto-automake.bbclass
@@ -0,0 +1,6 @@
+inherit autotools
+
+# use gcc equivalents of AR and RANLIB
+# to use -flto with shared libs
+PACKAGECONFIG_CONFARGS += " AR=${TARGET_PREFIX}gcc-ar \
+                            RANLIB=${TARGET_PREFIX}gcc-ranlib"
diff --git a/meta-phosphor/recipes-phosphor/fans/phosphor-pid-control_git.bb b/meta-phosphor/recipes-phosphor/fans/phosphor-pid-control_git.bb
index ef0b543..8293c61 100644
--- a/meta-phosphor/recipes-phosphor/fans/phosphor-pid-control_git.bb
+++ b/meta-phosphor/recipes-phosphor/fans/phosphor-pid-control_git.bb
@@ -6,7 +6,7 @@
 LICENSE = "Apache-2.0"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
 
-inherit autotools pkgconfig
+inherit flto-automake pkgconfig
 inherit pythonnative
 
 inherit phosphor-pid-control