All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-oe][PATCH] efibootmgr: fix build error with gcc 5.2
@ 2015-08-27  9:30 kai.kang
  2015-08-28  6:30 ` Khem Raj
  0 siblings, 1 reply; 3+ messages in thread
From: kai.kang @ 2015-08-27  9:30 UTC (permalink / raw)
  To: openembedded-devel

From: Kai Kang <kai.kang@windriver.com>

It fails to build efibootmgr with gcc 5.2:

src/lib/disk.o: In function `disk_get_scsi_pci':
src/lib/disk.c:154: undefined reference to `get_scsi_pci'
src/lib/efi.o: In function `make_edd30_device_path':
src/lib/efi.c:474: undefined reference to `get_scsi_idlun'
collect2: error: ld returned 1 exit status

Because functions get_scsi_pci and get_scsi_idlun are declared as
inline. It has different semantics for inilne function between gcc 4
and gcc 5.

Pass flag '-fgnu89-inline' to gcc to fix the errors.

Ref:
https://gcc.gnu.org/gcc-5/porting_to.html

Signed-off-by: Kai Kang <kai.kang@windriver.com>
---
 meta-oe/recipes-extended/efibootmgr/efibootmgr_0.6.0.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta-oe/recipes-extended/efibootmgr/efibootmgr_0.6.0.bb b/meta-oe/recipes-extended/efibootmgr/efibootmgr_0.6.0.bb
index 1870455..501ff2a 100644
--- a/meta-oe/recipes-extended/efibootmgr/efibootmgr_0.6.0.bb
+++ b/meta-oe/recipes-extended/efibootmgr/efibootmgr_0.6.0.bb
@@ -19,7 +19,7 @@ SRC_URI = "http://linux.dell.com/efibootmgr/permalink/efibootmgr-${PV}.tar.gz \
 SRC_URI[md5sum] = "9e9a31d79e579644de83a14139b66d10"
 SRC_URI[sha256sum] = "5167488b92950e60028d1025942ce6bda04638c6fb5e110abb8c8f687844d155"
 
-EXTRA_OEMAKE = "'CC=${CC}' 'CFLAGS=${CFLAGS} -I${S}/src/lib -I${S}/src/include'"
+EXTRA_OEMAKE = "'CC=${CC}' 'CFLAGS=${CFLAGS} -I${S}/src/lib -I${S}/src/include -fgnu89-inline'"
 
 do_install () {
     install -D -p -m0755 src/efibootmgr/efibootmgr ${D}/${sbindir}/efibootmgr
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [meta-oe][PATCH] efibootmgr: fix build error with gcc 5.2
  2015-08-27  9:30 [meta-oe][PATCH] efibootmgr: fix build error with gcc 5.2 kai.kang
@ 2015-08-28  6:30 ` Khem Raj
  2015-09-07  8:45   ` Kang Kai
  0 siblings, 1 reply; 3+ messages in thread
From: Khem Raj @ 2015-08-28  6:30 UTC (permalink / raw)
  To: openembedded-devel

[-- Attachment #1: Type: text/plain, Size: 2263 bytes --]


> On Aug 27, 2015, at 2:30 AM, kai.kang@windriver.com wrote:
> 
> From: Kai Kang <kai.kang@windriver.com>
> 
> It fails to build efibootmgr with gcc 5.2:
> 
> src/lib/disk.o: In function `disk_get_scsi_pci':
> src/lib/disk.c:154: undefined reference to `get_scsi_pci'
> src/lib/efi.o: In function `make_edd30_device_path':
> src/lib/efi.c:474: undefined reference to `get_scsi_idlun'
> collect2: error: ld returned 1 exit status
> 
> Because functions get_scsi_pci and get_scsi_idlun are declared as
> inline. It has different semantics for inilne function between gcc 4
> and gcc 5.
> 
> Pass flag '-fgnu89-inline' to gcc to fix the errors.
> 
> Ref:
> https://gcc.gnu.org/gcc-5/porting_to.html
> 
> Signed-off-by: Kai Kang <kai.kang@windriver.com>
> ---
> meta-oe/recipes-extended/efibootmgr/efibootmgr_0.6.0.bb | 2 +-

can you update it to 0.12+ see https://github.com/rhinstaller/efibootmgr not sure if it will work for arm, you should let original
authors from Linaro know.

secondly if you take a closer look then it might be possible to move the function definitions into .h file and make them  static inline

> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta-oe/recipes-extended/efibootmgr/efibootmgr_0.6.0.bb b/meta-oe/recipes-extended/efibootmgr/efibootmgr_0.6.0.bb
> index 1870455..501ff2a 100644
> --- a/meta-oe/recipes-extended/efibootmgr/efibootmgr_0.6.0.bb
> +++ b/meta-oe/recipes-extended/efibootmgr/efibootmgr_0.6.0.bb
> @@ -19,7 +19,7 @@ SRC_URI = "http://linux.dell.com/efibootmgr/permalink/efibootmgr-${PV}.tar.gz \
> SRC_URI[md5sum] = "9e9a31d79e579644de83a14139b66d10"
> SRC_URI[sha256sum] = "5167488b92950e60028d1025942ce6bda04638c6fb5e110abb8c8f687844d155"
> 
> -EXTRA_OEMAKE = "'CC=${CC}' 'CFLAGS=${CFLAGS} -I${S}/src/lib -I${S}/src/include'"
> +EXTRA_OEMAKE = "'CC=${CC}' 'CFLAGS=${CFLAGS} -I${S}/src/lib -I${S}/src/include -fgnu89-inline'"
> 
> do_install () {
>     install -D -p -m0755 src/efibootmgr/efibootmgr ${D}/${sbindir}/efibootmgr
> --
> 1.9.1
> 
> --
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel


[-- Attachment #2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 211 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [meta-oe][PATCH] efibootmgr: fix build error with gcc 5.2
  2015-08-28  6:30 ` Khem Raj
@ 2015-09-07  8:45   ` Kang Kai
  0 siblings, 0 replies; 3+ messages in thread
From: Kang Kai @ 2015-09-07  8:45 UTC (permalink / raw)
  To: openembedded-devel

On 2015年08月28日 14:30, Khem Raj wrote:
>> On Aug 27, 2015, at 2:30 AM, kai.kang@windriver.com wrote:
>>
>> From: Kai Kang <kai.kang@windriver.com>
>>
>> It fails to build efibootmgr with gcc 5.2:
>>
>> src/lib/disk.o: In function `disk_get_scsi_pci':
>> src/lib/disk.c:154: undefined reference to `get_scsi_pci'
>> src/lib/efi.o: In function `make_edd30_device_path':
>> src/lib/efi.c:474: undefined reference to `get_scsi_idlun'
>> collect2: error: ld returned 1 exit status
>>
>> Because functions get_scsi_pci and get_scsi_idlun are declared as
>> inline. It has different semantics for inilne function between gcc 4
>> and gcc 5.
>>
>> Pass flag '-fgnu89-inline' to gcc to fix the errors.
>>
>> Ref:
>> https://gcc.gnu.org/gcc-5/porting_to.html
>>
>> Signed-off-by: Kai Kang <kai.kang@windriver.com>
>> ---
>> meta-oe/recipes-extended/efibootmgr/efibootmgr_0.6.0.bb | 2 +-
> can you update it to 0.12+ see https://github.com/rhinstaller/efibootmgr not sure if it will work for arm, you should let original
> authors from Linaro know.

OK. I'll do it.


>
> secondly if you take a closer look then it might be possible to move the function definitions into .h file and make them  static inline

Let me try. Thanks.

--Kai


>
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/meta-oe/recipes-extended/efibootmgr/efibootmgr_0.6.0.bb b/meta-oe/recipes-extended/efibootmgr/efibootmgr_0.6.0.bb
>> index 1870455..501ff2a 100644
>> --- a/meta-oe/recipes-extended/efibootmgr/efibootmgr_0.6.0.bb
>> +++ b/meta-oe/recipes-extended/efibootmgr/efibootmgr_0.6.0.bb
>> @@ -19,7 +19,7 @@ SRC_URI = "http://linux.dell.com/efibootmgr/permalink/efibootmgr-${PV}.tar.gz \
>> SRC_URI[md5sum] = "9e9a31d79e579644de83a14139b66d10"
>> SRC_URI[sha256sum] = "5167488b92950e60028d1025942ce6bda04638c6fb5e110abb8c8f687844d155"
>>
>> -EXTRA_OEMAKE = "'CC=${CC}' 'CFLAGS=${CFLAGS} -I${S}/src/lib -I${S}/src/include'"
>> +EXTRA_OEMAKE = "'CC=${CC}' 'CFLAGS=${CFLAGS} -I${S}/src/lib -I${S}/src/include -fgnu89-inline'"
>>
>> do_install () {
>>      install -D -p -m0755 src/efibootmgr/efibootmgr ${D}/${sbindir}/efibootmgr
>> --
>> 1.9.1
>>
>> --
>> _______________________________________________
>> Openembedded-devel mailing list
>> Openembedded-devel@lists.openembedded.org
>> http://lists.openembedded.org/mailman/listinfo/openembedded-devel
>
>


-- 
Regards,
Neil | Kai Kang



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-09-07  8:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-27  9:30 [meta-oe][PATCH] efibootmgr: fix build error with gcc 5.2 kai.kang
2015-08-28  6:30 ` Khem Raj
2015-09-07  8:45   ` Kang Kai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.