[OE-core] [PATCH 5/5] hdparm: 9.48 -> 9.50

Robert Yang liezhi.yang at windriver.com
Thu Dec 22 02:49:36 UTC 2016



On 12/22/2016 10:47 AM, Robert Yang wrote:
>
>
> On 12/21/2016 09:27 PM, Andre McCurdy wrote:
>> On Tue, Dec 20, 2016 at 10:17 PM, Robert Yang <liezhi.yang at windriver.com> wrote:
>>> Add 0001-Makefile-use-weak-assignment-for-LDFALGS.patch to fix issues like:
>>> ERROR: hdparm-9.50-r0 do_package: QA Issue: File '/sbin/hdparm.hdparm' from
>>> hdparm was already stripped, this will prevent future debugging!
>>> [already-stripped]
>>> ERROR: hdparm-9.50-r0 do_package: Fatal QA errors found, failing task.
>>
>> Passing LDFLAGS on the make command line might be a cleaner solution
>> than patching the Makefile.

To be clear, passing LDFLAGS on the make command line doesn't work.

// Robert

>
> We can't do that since there is a "-e MAKEFLAGS=" in EXTRA_OEMAKE, and its
> Makefile is:
>
> all:
>     make -j2 hdparm
>
> hdparm: hdparm.h sgio.h $(OBJS)
>     $(CC) $(LDFLAGS) -o hdparm $(OBJS)
>     $(STRIP) hdparm
>
> The "make -j2 hdparm" doesn't pass any env vars to sub make since MAKEFLAGS=,
> so that need use weak assignment "?=" here.
>
> // Robert
>
>>
>>> Signed-off-by: Robert Yang <liezhi.yang at windriver.com>
>>> ---
>>>  ...-Makefile-use-weak-assignment-for-LDFALGS.patch | 30 ++++++++++++++++++++++
>>>  .../hdparm/{hdparm_9.48.bb => hdparm_9.50.bb}      |  8 +++---
>>>  2 files changed, 35 insertions(+), 3 deletions(-)
>>>  create mode 100644
>>> meta/recipes-extended/hdparm/hdparm/0001-Makefile-use-weak-assignment-for-LDFALGS.patch
>>>
>>>  rename meta/recipes-extended/hdparm/{hdparm_9.48.bb => hdparm_9.50.bb} (80%)
>>>
>>> diff --git
>>> a/meta/recipes-extended/hdparm/hdparm/0001-Makefile-use-weak-assignment-for-LDFALGS.patch
>>> b/meta/recipes-extended/hdparm/hdparm/0001-Makefile-use-weak-assignment-for-LDFALGS.patch
>>>
>>> new file mode 100644
>>> index 00000000000..f74da5f18c9
>>> --- /dev/null
>>> +++
>>> b/meta/recipes-extended/hdparm/hdparm/0001-Makefile-use-weak-assignment-for-LDFALGS.patch
>>>
>>> @@ -0,0 +1,30 @@
>>> +From 9532fbaade3b08cef936723a6a5adf191881edbf Mon Sep 17 00:00:00 2001
>>> +From: Robert Yang <liezhi.yang at windriver.com>
>>> +Date: Mon, 19 Dec 2016 22:36:16 -0800
>>> +Subject: [PATCH] Makefile: use weak assignment for LDFALGS
>>> +
>>> +So that it can use LDFLAGS from env vars.
>>> +
>>> +Upstream-Status: Pending
>>> +
>>> +Signed-off-by: Robert Yang <liezhi.yang at windriver.com>
>>> +---
>>> + Makefile | 2 +-
>>> + 1 file changed, 1 insertion(+), 1 deletion(-)
>>> +
>>> +diff --git a/Makefile b/Makefile
>>> +index 05a1f78..60b67d9 100644
>>> +--- a/Makefile
>>> ++++ b/Makefile
>>> +@@ -15,7 +15,7 @@ STRIP ?= strip
>>> +
>>> + CFLAGS := -O2 -W -Wall -Wbad-function-cast -Wcast-align -Wpointer-arith
>>> -Wcast-qual -Wshadow -Wstrict-prototypes -Wmissing-prototypes
>>> -Wmissing-declarations -fkeep-inline-functions -Wwrite-strings
>>> -Waggregate-return -Wnested-externs -Wtrigraphs $(CFLAGS)
>>> +
>>> +-LDFLAGS = -s
>>> ++LDFLAGS ?= -s
>>> + #LDFLAGS = -s -static
>>> + INSTALL = install
>>> + INSTALL_DATA = $(INSTALL) -m 644
>>> +--
>>> +2.10.2
>>> +
>>



More information about the Openembedded-core mailing list