Return-Path: Received: from mail-wm0-f46.google.com (mail-wm0-f46.google.com [74.125.82.46]) by mail.openembedded.org (Postfix) with ESMTP id D7804731E6 for ; Mon, 15 Feb 2016 15:56:34 +0000 (UTC) Received: by mail-wm0-f46.google.com with SMTP id c200so119862880wme.0 for ; Mon, 15 Feb 2016 07:56:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id; bh=dJ8vU7EIKF4I+Z3yT9YfWxKWNtRF6dgW7WPTXwI6HdI=; b=zNAugU65Qv5hivZlOmnMsQwd0Are74Q7d6xADq/4E1ULmUDvwEfP5sESPHS/nNBezb EBOohYsu18Ixnsr1kuMlltN4Ly9x4l/cPbMgi9LAJ1oA8VIugUL39ECoA5x1vtt7xWmj T0JVm3CL0SMvL9wxnX0QQqUWGvchdyBBBFFBXl+KR+AMmauSisAIRDFeC8yO4pOaSQJ+ Ak526q6iY9fntzYhPlsq1PNuVDbPY132xvbRt0TYyx23zY0R3wGN6c50lyB7ud7cgwvo 5VOIIsv5QbJTvvFkwZ6WpjYDrZObe7iFhVZhyA1kR29UYJFgpkS2J5lATjzPLkvPsaj+ 3eyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id; bh=dJ8vU7EIKF4I+Z3yT9YfWxKWNtRF6dgW7WPTXwI6HdI=; b=EifPiadWLi8SHk74RHrTGapFiA4JSPAm8wrFNZ0yGbL5qrw65f0br1ANj+2oM3mA7/ cpFowgiR8j4B1MORh6dXhl7mjDxKHm74TJO/rG32thPn+ZlOCY3IpxN2i8Uk9FPbVbln XWkyaIKDpe3eY9qUiqpyc6yu9V6Vx9Txk6AkqYUMmT4W0Ug/3c667fyAHo2YeRsAWA6p 0IdBUD41p/0h6hl1JMQNXiQCT5CCBjIb8EPN/Z1PiPAGg8WTTLoSiWl4Wdas2sdpkxFF ecV4BqHl/d98TycUWvRNNPKaxiQ9BYSZB5ED8kW9IGn9iMyjypfazx8vyyuLWu2so/3R G6UA== X-Gm-Message-State: AG10YORa8OHQHWaUjt+J8rUWeiS+5rDHJXeAUs+BzGLht37kc1caCjpSdfKEhkIf4U8SM5Sb X-Received: by 10.28.220.134 with SMTP id t128mr13039633wmg.61.1455551795478; Mon, 15 Feb 2016 07:56:35 -0800 (PST) Received: from flashheart.burtonini.com (home.burtonini.com. [81.2.106.35]) by smtp.gmail.com with ESMTPSA id w66sm16311776wmd.2.2016.02.15.07.56.34 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 15 Feb 2016 07:56:34 -0800 (PST) From: Ross Burton To: openembedded-core@lists.openembedded.org Date: Mon, 15 Feb 2016 15:56:33 +0000 Message-Id: <1455551793-29152-1-git-send-email-ross.burton@intel.com> X-Mailer: git-send-email 2.7.0 Subject: [PATCH] apmd: fix build with static libraries disabled X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Feb 2016 15:56:36 -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 --- meta/recipes-bsp/apmd/apmd/linkage.patch | 53 ++++++++++++++++++++++++++++++++ meta/recipes-bsp/apmd/apmd_3.2.2-15.bb | 1 + 2 files changed, 54 insertions(+) create mode 100644 meta/recipes-bsp/apmd/apmd/linkage.patch diff --git a/meta/recipes-bsp/apmd/apmd/linkage.patch b/meta/recipes-bsp/apmd/apmd/linkage.patch new file mode 100644 index 0000000..3d32c49 --- /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 + +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 917bb2c..4ff6ad0 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 \ -- 2.7.0