aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2016-02-15 15:56:33 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-02-15 16:28:46 +0000
commitb050c50f04968ab3311a06a602942fa24f2a93f3 (patch)
tree600ecf71ef6e5f010a1f04aae3c5be1d756b23ab
parentd585a716d26c93f97fe0fbf91a32c0ccaf14ec2b (diff)
downloadopenembedded-core-contrib-b050c50f04968ab3311a06a602942fa24f2a93f3.tar.gz
apmd: fix build with static libraries disabled
apmd was using foo.o in Makefile dependencies but if libtool is being used then those are the statically linked intermediate files. When static libraries are globally disabled they won't be generated by libtool-cross so the build fails. Instead, use the libtool intermediate wrapper .lo files so the build succeeds. (From OE-Core rev: a3dbd98970683c410edee5e15e5fe72643953adf) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-bsp/apmd/apmd/linkage.patch53
-rw-r--r--meta/recipes-bsp/apmd/apmd_3.2.2-15.bb1
2 files changed, 54 insertions, 0 deletions
diff --git a/meta/recipes-bsp/apmd/apmd/linkage.patch b/meta/recipes-bsp/apmd/apmd/linkage.patch
new file mode 100644
index 0000000000..3d32c49cd2
--- /dev/null
+++ b/meta/recipes-bsp/apmd/apmd/linkage.patch
@@ -0,0 +1,53 @@
+When building use the libtool intermediate .lo files instead of explicitly using
+the .o files. Under libtool foo.lo is the libtool intermediate wrapper, foo.o is
+a static build, and .libs/foo.o is a shared build.
+
+If static libraries have been disabled globally then libtool won't generate them
+and explicit references to foo.o won't be satisfied.
+
+Upstream-Status: Pending
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+
+diff --git a/Makefile b/Makefile
+index bb695c6..5f60146 100644
+--- a/Makefile
++++ b/Makefile
+@@ -28,7 +28,7 @@ endif
+
+ .SUFFIXES:
+
+-OBJS=apmlib.o
++OBJS=apmlib.lo
+ EXES=apm apmd xapm apmsleep
+ HEADERS=apm.h
+
+@@ -66,22 +66,22 @@ all: $(EXES)
+
+ $(OBJS): $(HEADERS)
+
+-%.o: %.c
++%.lo: %.c
+ $(LT_COMPILE) -c $(CPPFLAGS) $(CFLAGS) $(XTRACFLAGS) $<
+
+-%: %.o $(LIBAPM)
++%: %.lo $(LIBAPM)
+ $(LT_LINK) -o $@ $< $(LDFLAGS) $(LIBAPM)
+
+-xapm.o: xapm.c
++xapm.lo: xapm.c
+ $(LT_COMPILE) -c $(CPPFLAGS) $(CFLAGS) $(XTRACFLAGS) -DNARROWPROTO $<
+
+-apmd: apmd.o
++apmd: apmd.lo
+
+-apmsleep: apmsleep.o
++apmsleep: apmsleep.lo
+
+-apmexists: apmexists.o
++apmexists: apmexists.lo
+
+-xapm: xapm.o $(LIBAPM)
++xapm: xapm.lo $(LIBAPM)
+ $(LT_LINK) -o $@ $< $(LDFLAGS) $(LIBAPM) $(XLDFLAGS) $(XLIBS)
+
+ $(LIBAPM): apmlib.lo
diff --git a/meta/recipes-bsp/apmd/apmd_3.2.2-15.bb b/meta/recipes-bsp/apmd/apmd_3.2.2-15.bb
index 917bb2cc83..4ff6ad087c 100644
--- a/meta/recipes-bsp/apmd/apmd_3.2.2-15.bb
+++ b/meta/recipes-bsp/apmd/apmd_3.2.2-15.bb
@@ -14,6 +14,7 @@ SRC_URI = "${DEBIAN_MIRROR}/main/a/apmd/apmd_3.2.2.orig.tar.gz;name=tarball \
file://libtool.patch \
file://unlinux.patch \
file://wexitcode.patch \
+ file://linkage.patch \
file://init \
file://default \
file://apmd_proxy \