Skip to contentSkip to conversation

file: specify c std as c99 or greater required

PATCH In review Jack Mitchell 2 participants 3 messages Sep 6, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 file: specify c std as c99 or greater required

From: Jack Mitchell <[email protected]>

when using a toolchain not shipped by OE core such as linaro we can't be sure what the std will be set to. Ensure file is compiled as c99 or greater as required.

---
 meta/recipes-devtools/file/file_5.28.bb | 2 ++
 1 file changed, 2 insertions(+)
meta/recipes-devtools/file/file_5.28.bb +2 -0
index 516c8c5..94848db 100644
@@ -27,6 +27,8 @@ inherit autotools
 EXTRA_OEMAKE_append_class-target = "-e FILE_COMPILE=${STAGING_BINDIR_NATIVE}/file-native/file"
 EXTRA_OEMAKE_append_class-nativesdk = "-e FILE_COMPILE=${STAGING_BINDIR_NATIVE}/file-native/file"
 
+CFLAGS_append = " -std=gnu11"
+
 FILES_${PN} += "${datadir}/misc/*.mgc"
 
 do_install_append_class-native() {
Signature · 1 line
2.9.3
#1 lore raw
Quoted 8 lines · Jack Mitchell

From: Jack Mitchell <[email protected]>

when using a toolchain not shipped by OE core such as linaro we can't be sure what the std will be set to. Ensure file is compiled as c99 or greater as required.

comment does not match the code, its using gnu11, secondly is gnu11 needed or can it live with c11

Quoted 27 lines

---
meta/recipes-devtools/file/file_5.28.bb | 2 ++

1 file changed, 2 insertions(+)
meta/recipes-devtools/file/file_5.28.bb +0 -0
index 516c8c5..94848db 100644
@@ -27,6 +27,8 @@ inherit autotools

EXTRA_OEMAKE_append_class-target = "-e FILE_COMPILE=${STAGING_BINDIR_NATIVE}/file-native/file" EXTRA_OEMAKE_append_class-nativesdk = "-e FILE_COMPILE=${STAGING_BINDIR_NATIVE}/file-native/file"

meta/recipes-devtools/file/file_5.28.bb +2 -0
+CFLAGS_append = " -std=gnu11"
+

FILES_${PN} += "${datadir}/misc/*.mgc"

do_install_append_class-native() {
--
2.9.3

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#2 lore raw
Quoted 9 lines · Khem Raj
Quoted 7 lines · Jack Mitchell

From: Jack Mitchell <[email protected]>

when using a toolchain not shipped by OE core such as linaro we can't be sure what the std will be set to. Ensure file is compiled as c99 or greater as required.

comment does not match the code, its using gnu11, secondly is gnu11 needed or can it live with c11

Comment says it needs 'c99 or greater' so I set it to gnu11 which is the default we use for gcc6, no? The minimum it can compile with is c99, would that be a better option to set?

Cheers,

Quoted 27 lines
Quoted 27 lines

---
meta/recipes-devtools/file/file_5.28.bb | 2 ++

1 file changed, 2 insertions(+)
meta/recipes-devtools/file/file_5.28.bb +0 -0
index 516c8c5..94848db 100644
@@ -27,6 +27,8 @@ inherit autotools

EXTRA_OEMAKE_append_class-target = "-e FILE_COMPILE=${STAGING_BINDIR_NATIVE}/file-native/file" EXTRA_OEMAKE_append_class-nativesdk = "-e FILE_COMPILE=${STAGING_BINDIR_NATIVE}/file-native/file"

meta/recipes-devtools/file/file_5.28.bb +2 -0
+CFLAGS_append = " -std=gnu11"
+

FILES_${PN} += "${datadir}/misc/*.mgc"

do_install_append_class-native() {
--
2.9.3

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core