criu: fix host gcc can't recognized option -fmacro-prefix-map
PATCH v2 1/1 criu: fix host gcc can't recognized option -fmacro-prefix-map
Generally, our host gcc version below 8.0, but cross toolchain in yocto above 8.0, now 8.3, the option "macro-prefix-map" coming from 8.0, so if the host gcc below 8.0, it can't unrecognized the option "macro-prefix-map".
In criu source code, the HOSTCFLAGS coming from CFLAGS:
https://github.com/checkpoint-restore/criu/blob/criu-dev/Makefile#L17
In yocto project, the CFLAGS coming from the cross toolchain, containing the "-fmacro-prefix-map" default, so we should use the BUILD_CFLAGS, it contains the flags that used for host building.
--- recipes-containers/criu/criu_git.bb | 1 + 1 file changed, 1 insertion(+)
recipes-containers/criu/criu_git.bb +1 -0
@@ -54,6 +54,7 @@ export C_INCLUDE_PATH="${STAGING_INCDIR}/libnl3" export BUILD_SYS export HOST_SYS +export HOSTCFLAGS = "${BUILD_CFLAGS}" inherit setuptools
Signature · 1 line
2.7.4
Quoted 10 lines · Dengke Du
Generally, our host gcc version below 8.0, but cross toolchain in yocto above 8.0, now 8.3, the option "macro-prefix-map" coming from 8.0, so if the host gcc below 8.0, it can't unrecognized the option "macro-prefix-map".
In criu source code, the HOSTCFLAGS coming from CFLAGS:
https://github.com/checkpoint-restore/criu/blob/criu-dev/Makefile#L17
In yocto project, the CFLAGS coming from the cross toolchain, containing the "-fmacro-prefix-map" default, so we should use theBUILD_CFLAGS, it contains the flags that used for host building.
What's the difference from v1 ?
Bruce
Quoted 26 lines
Signed-off-by Dengke Du <[email protected]>--- recipes-containers/criu/criu_git.bb | 1 + 1 file changed, 1 insertion(+)recipes-containers/criu/criu_git.bb +1
-1@@ -54,6 +54,7 @@ export C_INCLUDE_PATH="${STAGING_INCDIR}/libnl3" export BUILD_SYS export HOST_SYS +export HOSTCFLAGS = "${BUILD_CFLAGS}" inherit setuptools --2.7.4
--
_______________________________________________
meta-virtualization mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-virtualization
Signature · 3 lines
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end - "Use the force Harry" - Gandalf, Star Trek II
Quoted 5 lines · Bruce Ashfield
Quoted 4 lines · Dengke Du
Generally, our host gcc version below 8.0, but cross toolchain in yocto above 8.0, now 8.3, the option "macro-prefix-map" coming from 8.0, so if the host gcc below 8.0, it can't unrecognized the option "macro-prefix-map".
Quoted 8 lines
Quoted 5 lines
In criu source code, the HOSTCFLAGS coming from CFLAGS:
https://github.com/checkpoint-restore/criu/blob/criu-dev/Makefile#L17
In yocto project, the CFLAGS coming from the cross toolchain, containing the "-fmacro-prefix-map" default, so we should use theBUILD_CFLAGS, it contains the flags that used for host building.What's the difference from v1 ?
Bruce
Hi bruce
V1 have two lines.
Quoted 28 lines
Quoted 26 lines
Signed-off-by Dengke Du <[email protected]>--- recipes-containers/criu/criu_git.bb | 1 + 1 file changed, 1 insertion(+)recipes-containers/criu/criu_git.bb +1
-1@@ -54,6 +54,7 @@ export C_INCLUDE_PATH="${STAGING_INCDIR}/libnl3" export BUILD_SYS export HOST_SYS +export HOSTCFLAGS = "${BUILD_CFLAGS}" inherit setuptools --2.7.4
--
_______________________________________________
meta-virtualization mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-virtualization
Sorry for my little words for V2, I will add more next time.
Dengke
Quoted 48 lines · ddu
Quoted 5 lines · Bruce Ashfield
Quoted 4 lines · Dengke Du
Generally, our host gcc version below 8.0, but cross toolchain in yocto above 8.0, now 8.3, the option "macro-prefix-map" coming from 8.0, so if the host gcc below 8.0, it can't unrecognized the option "macro-prefix-map".
Quoted 8 lines
Quoted 5 lines
In criu source code, the HOSTCFLAGS coming from CFLAGS:
https://github.com/checkpoint-restore/criu/blob/criu-dev/Makefile#L17
In yocto project, the CFLAGS coming from the cross toolchain, containing the "-fmacro-prefix-map" default, so we should use theBUILD_CFLAGS, it contains the flags that used for host building.What's the difference from v1 ?
Bruce
Hi bruce
V1 have two lines.
Quoted 28 lines
Quoted 26 lines
Signed-off-by Dengke Du <[email protected]>---
recipes-containers/criu/criu_git.bb | 1 +1 file changed, 1 insertion(+)recipes-containers/criu/criu_git.bb +0
-0@@ -54,6 +54,7 @@ export C_INCLUDE_PATH="${STAGING_INCDIR}/libnl3"export
BUILD_SYS
exportHOST_SYS
+export HOSTCFLAGS = "${BUILD_CFLAGS}"inherit setuptools
Signature · 7 lines
2.7.4 -- _______________________________________________ meta-virtualization mailing list [email protected] https://lists.yoctoproject.org/listinfo/meta-virtualization
merged
Bruce
Quoted 36 lines · Dengke Du
Generally, our host gcc version below 8.0, but cross toolchain in yocto above 8.0, now 8.3, the option "macro-prefix-map" coming from 8.0, so if the host gcc below 8.0, it can't unrecognized the option "macro-prefix-map".
In criu source code, the HOSTCFLAGS coming from CFLAGS:
https://github.com/checkpoint-restore/criu/blob/criu-dev/Makefile#L17
In yocto project, the CFLAGS coming from the cross toolchain, containing the "-fmacro-prefix-map" default, so we should use theBUILD_CFLAGS, it contains the flags that used for host building.Signed-off-by Dengke Du <[email protected]>--- recipes-containers/criu/criu_git.bb | 1 + 1 file changed, 1 insertion(+)recipes-containers/criu/criu_git.bb +1
-1@@ -54,6 +54,7 @@ export C_INCLUDE_PATH="${STAGING_INCDIR}/libnl3" export BUILD_SYS export HOST_SYS +export HOSTCFLAGS = "${BUILD_CFLAGS}" inherit setuptools --2.7.4
--
_______________________________________________
meta-virtualization mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-virtualization
Signature · 3 lines
- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end - "Use the force Harry" - Gandalf, Star Trek II