]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
apmd: fix build with static libraries disabled
authorRoss Burton <ross.burton@intel.com>
Mon, 15 Feb 2016 15:56:33 +0000 (15:56 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 15 Feb 2016 16:28:25 +0000 (16:28 +0000)
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.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-bsp/apmd/apmd/linkage.patch [new file with mode: 0644]
meta/recipes-bsp/apmd/apmd_3.2.2-15.bb

diff --git a/meta/recipes-bsp/apmd/apmd/linkage.patch b/meta/recipes-bsp/apmd/apmd/linkage.patch
new file mode 100644 (file)
index 0000000..3d32c49
--- /dev/null
@@ -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
index 917bb2cc835009f3c6a65b21720a264f41b9e661..4ff6ad087cce65577c9303e3f21c29a7308650a1 100644 (file)
@@ -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 \