* [PATCH] cross.bbclass: Remove usage of host flags for cross-compilation
@ 2017-10-05 8:02 Nikolay Merinov
2017-10-06 13:55 ` Khem Raj
0 siblings, 1 reply; 4+ messages in thread
From: Nikolay Merinov @ 2017-10-05 8:02 UTC (permalink / raw)
To: openembedded-core
BUILD_* flags can't be used as TARGET_* flags even for "cross" packages.
gcc-cross buils leaks config.log's through "gcc-stashed-builddir" and
TARGET_* flags to libgcc cross-build through "gcc/libgcc.mvars" file
on "gcc-stashed-builddir". This means that if BUILD_CFLAGS contains
host-specific flags like "-isystem/usr/include" libgcc build will
fail "do_qa_configure" and "do_package_qa" checks.
Remove host-related flags from TARGET_* flags for gcc-cross build.
Signed-off-by: Nikolay Merinov <n.merinov@inango-systems.com>
---
meta/classes/cross.bbclass | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/meta/classes/cross.bbclass b/meta/classes/cross.bbclass
index 4887317a9a..29d4424829 100644
--- a/meta/classes/cross.bbclass
+++ b/meta/classes/cross.bbclass
@@ -28,10 +28,10 @@ MULTIMACH_TARGET_SYS = "${BUILD_ARCH}${BUILD_VENDOR}-${BUILD_OS}"
export PKG_CONFIG_DIR = "${exec_prefix}/lib/pkgconfig"
export PKG_CONFIG_SYSROOT_DIR = ""
-TARGET_CPPFLAGS = "${BUILD_CPPFLAGS}"
-TARGET_CFLAGS = "${BUILD_CFLAGS}"
-TARGET_CXXFLAGS = "${BUILD_CXXFLAGS}"
-TARGET_LDFLAGS = "${BUILD_LDFLAGS}"
+TARGET_CPPFLAGS = ""
+TARGET_CFLAGS = ""
+TARGET_CXXFLAGS = ""
+TARGET_LDFLAGS = "-Wl,-O1 ${TARGET_LINK_HASH_STYLE}"
CPPFLAGS = "${BUILD_CPPFLAGS}"
CFLAGS = "${BUILD_CFLAGS}"
--
2.14.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] cross.bbclass: Remove usage of host flags for cross-compilation
2017-10-05 8:02 [PATCH] cross.bbclass: Remove usage of host flags for cross-compilation Nikolay Merinov
@ 2017-10-06 13:55 ` Khem Raj
2017-10-06 16:11 ` Nikolai Merinov
0 siblings, 1 reply; 4+ messages in thread
From: Khem Raj @ 2017-10-06 13:55 UTC (permalink / raw)
To: Nikolay Merinov; +Cc: Patches and discussions about the oe-core layer
On Thu, Oct 5, 2017 at 1:02 AM, Nikolay Merinov
<n.merinov@inango-systems.com> wrote:
> BUILD_* flags can't be used as TARGET_* flags even for "cross" packages.
>
> gcc-cross buils leaks config.log's through "gcc-stashed-builddir" and
> TARGET_* flags to libgcc cross-build through "gcc/libgcc.mvars" file
> on "gcc-stashed-builddir". This means that if BUILD_CFLAGS contains
> host-specific flags like "-isystem/usr/include" libgcc build will
> fail "do_qa_configure" and "do_package_qa" checks.
>
> Remove host-related flags from TARGET_* flags for gcc-cross build.
>
> Signed-off-by: Nikolay Merinov <n.merinov@inango-systems.com>
> ---
> meta/classes/cross.bbclass | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/meta/classes/cross.bbclass b/meta/classes/cross.bbclass
> index 4887317a9a..29d4424829 100644
> --- a/meta/classes/cross.bbclass
> +++ b/meta/classes/cross.bbclass
> @@ -28,10 +28,10 @@ MULTIMACH_TARGET_SYS = "${BUILD_ARCH}${BUILD_VENDOR}-${BUILD_OS}"
> export PKG_CONFIG_DIR = "${exec_prefix}/lib/pkgconfig"
> export PKG_CONFIG_SYSROOT_DIR = ""
>
> -TARGET_CPPFLAGS = "${BUILD_CPPFLAGS}"
> -TARGET_CFLAGS = "${BUILD_CFLAGS}"
> -TARGET_CXXFLAGS = "${BUILD_CXXFLAGS}"
> -TARGET_LDFLAGS = "${BUILD_LDFLAGS}"
> +TARGET_CPPFLAGS = ""
> +TARGET_CFLAGS = ""
> +TARGET_CXXFLAGS = ""
> +TARGET_LDFLAGS = "-Wl,-O1 ${TARGET_LINK_HASH_STYLE}"
>
I think using TARGET_LINK_HASH_STYLE could create target specific
dependency on cross packages, which might not be an issue for gcc but
could be issue for other cross packages.
> CPPFLAGS = "${BUILD_CPPFLAGS}"
> CFLAGS = "${BUILD_CFLAGS}"
> --
> 2.14.2
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] cross.bbclass: Remove usage of host flags for cross-compilation
2017-10-06 13:55 ` Khem Raj
@ 2017-10-06 16:11 ` Nikolai Merinov
2017-10-06 16:40 ` Khem Raj
0 siblings, 1 reply; 4+ messages in thread
From: Nikolai Merinov @ 2017-10-06 16:11 UTC (permalink / raw)
To: Khem Raj; +Cc: Patches and discussions about the oe-core layer
[-- Attachment #1: Type: text/plain, Size: 2235 bytes --]
So, it will be better to keep TARGET_LDFLAGS empty by default?
6 октября 2017 г. 18:55:02 GMT+05:00, Khem Raj <raj.khem@gmail.com> пишет:
>On Thu, Oct 5, 2017 at 1:02 AM, Nikolay Merinov
><n.merinov@inango-systems.com> wrote:
>> BUILD_* flags can't be used as TARGET_* flags even for "cross"
>packages.
>>
>> gcc-cross buils leaks config.log's through "gcc-stashed-builddir" and
>> TARGET_* flags to libgcc cross-build through "gcc/libgcc.mvars" file
>> on "gcc-stashed-builddir". This means that if BUILD_CFLAGS contains
>> host-specific flags like "-isystem/usr/include" libgcc build will
>> fail "do_qa_configure" and "do_package_qa" checks.
>>
>> Remove host-related flags from TARGET_* flags for gcc-cross build.
>>
>> Signed-off-by: Nikolay Merinov <n.merinov@inango-systems.com>
>> ---
>> meta/classes/cross.bbclass | 8 ++++----
>> 1 file changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/meta/classes/cross.bbclass b/meta/classes/cross.bbclass
>> index 4887317a9a..29d4424829 100644
>> --- a/meta/classes/cross.bbclass
>> +++ b/meta/classes/cross.bbclass
>> @@ -28,10 +28,10 @@ MULTIMACH_TARGET_SYS =
>"${BUILD_ARCH}${BUILD_VENDOR}-${BUILD_OS}"
>> export PKG_CONFIG_DIR = "${exec_prefix}/lib/pkgconfig"
>> export PKG_CONFIG_SYSROOT_DIR = ""
>>
>> -TARGET_CPPFLAGS = "${BUILD_CPPFLAGS}"
>> -TARGET_CFLAGS = "${BUILD_CFLAGS}"
>> -TARGET_CXXFLAGS = "${BUILD_CXXFLAGS}"
>> -TARGET_LDFLAGS = "${BUILD_LDFLAGS}"
>> +TARGET_CPPFLAGS = ""
>> +TARGET_CFLAGS = ""
>> +TARGET_CXXFLAGS = ""
>> +TARGET_LDFLAGS = "-Wl,-O1 ${TARGET_LINK_HASH_STYLE}"
>>
>
>I think using TARGET_LINK_HASH_STYLE could create target specific
>dependency on cross packages, which might not be an issue for gcc but
>could be issue for other cross packages.
>
>> CPPFLAGS = "${BUILD_CPPFLAGS}"
>> CFLAGS = "${BUILD_CFLAGS}"
>> --
>> 2.14.2
>>
>> --
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core@lists.openembedded.org
>> http://lists.openembedded.org/mailman/listinfo/openembedded-core
--
Nikolay Merinov
Team Leader, 3-rd Party Group
n.merinov@inango-systems.com
T +7 343 298 0147 C +7 912 229 2564
inango.com
[-- Attachment #2: Type: text/html, Size: 3145 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] cross.bbclass: Remove usage of host flags for cross-compilation
2017-10-06 16:11 ` Nikolai Merinov
@ 2017-10-06 16:40 ` Khem Raj
0 siblings, 0 replies; 4+ messages in thread
From: Khem Raj @ 2017-10-06 16:40 UTC (permalink / raw)
To: Nikolai Merinov; +Cc: Patches and discussions about the oe-core layer
On Fri, Oct 6, 2017 at 9:11 AM, Nikolai Merinov
<n.merinov@inango-systems.com> wrote:
> So, it will be better to keep TARGET_LDFLAGS empty by default?
I think yes.
>
> 6 октября 2017 г. 18:55:02 GMT+05:00, Khem Raj <raj.khem@gmail.com> пишет:
>>
>> On Thu, Oct 5, 2017 at 1:02 AM, Nikolay Merinov
>> <n.merinov@inango-systems.com> wrote:
>>>
>>> BUILD_* flags can't be used as TARGET_* flags even for "cross" packages.
>>>
>>> gcc-cross buils leaks config.log's through "gcc-stashed-builddir" and
>>> TARGET_* flags to libgcc cross-build through "gcc/libgcc.mvars" file
>>> on "gcc-stashed-builddir". This means that if BUILD_CFLAGS contains
>>> host-specific flags like "-isystem/usr/include" libgcc build will
>>> fail "do_qa_configure" and "do_package_qa" checks.
>>>
>>> Remove host-related flags from TARGET_* flags for gcc-cross build.
>>>
>>> Signed-off-by: Nikolay Merinov <n.merinov@inango-systems.com>
>>> ---
>>> meta/classes/cross.bbclass | 8 ++++----
>>> 1 file changed, 4 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/meta/classes/cross.bbclass b/meta/classes/cross.bbclass
>>> index 4887317a9a..29d4424829 100644
>>> --- a/meta/classes/cross.bbclass
>>> +++ b/meta/classes/cross.bbclass
>>> @@ -28,10 +28,10 @@ MULTIMACH_TARGET_SYS =
>>> "${BUILD_ARCH}${BUILD_VENDOR}-${BUILD_OS}"
>>> export PKG_CONFIG_DIR = "${exec_prefix}/lib/pkgconfig"
>>> export PKG_CONFIG_SYSROOT_DIR = ""
>>>
>>> -TARGET_CPPFLAGS = "${BUILD_CPPFLAGS}"
>>> -TARGET_CFLAGS = "${BUILD_CFLAGS}"
>>> -TARGET_CXXFLAGS = "${BUILD_CXXFLAGS}"
>>> -TARGET_LDFLAGS = "${BUILD_LDFLAGS}"
>>> +TARGET_CPPFLAGS = ""
>>> +TARGET_CFLAGS = ""
>>> +TARGET_CXXFLAGS = ""
>>> +TARGET_LDFLAGS = "-Wl,-O1 ${TARGET_LINK_HASH_STYLE}"
>>
>>
>>
>> I think using TARGET_LINK_HASH_STYLE could create target specific
>> dependency on cross packages, which might not be an issue for gcc but
>> could be issue for other cross packages.
>>
>>> CPPFLAGS = "${BUILD_CPPFLAGS}"
>>> CFLAGS = "${BUILD_CFLAGS}"
>>> --
>>> 2.14.2
>>>
>>> --
>>> ________________________________
>>>
>>> Openembedded-core mailing list
>>> Openembedded-core@lists.openembedded.org
>>> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
>
> --
> Nikolay Merinov
> Team Leader, 3-rd Party Group
> n.merinov@inango-systems.com
> T +7 343 298 0147 C +7 912 229 2564
> inango.com
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-10-06 16:41 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-05 8:02 [PATCH] cross.bbclass: Remove usage of host flags for cross-compilation Nikolay Merinov
2017-10-06 13:55 ` Khem Raj
2017-10-06 16:11 ` Nikolai Merinov
2017-10-06 16:40 ` Khem Raj
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.