* [PATCH] goarch.bbclass: set SECURITY_CFLAGS for mips64
@ 2018-06-13 6:12 kai.kang
2018-06-13 14:01 ` Khem Raj
0 siblings, 1 reply; 5+ messages in thread
From: kai.kang @ 2018-06-13 6:12 UTC (permalink / raw)
To: openembedded-core
From: Kai Kang <kai.kang@windriver.com>
When include conf/distro/include/security_flags.inc, NOPIE flags are
still required for MIPS64 target builds. Otherwise it fails to build
packages such as glide which inherit go.bbclass:
| .../tmp-glibc/work/mips64-wrs-linux/glide/0.13.1-r0/recipe-sysroot-native/usr/bin/mips64-wrs-linux/../../libexec/mips64-wrs-linux/
| gcc/mips64-wrs-linux/7.3.0/ld: .../tmp-glibc/work/mips64-wrs-linux/glide/0.13.1-r0/go-tmp/go-link-518447869/go.o:
| relocation R_MIPS_26 against `a local symbol' can not be used when making a shared object; recompile with -fPIC`
Signed-off-by: Kai Kang <kai.kang@windriver.com>
---
meta/classes/goarch.bbclass | 1 +
1 file changed, 1 insertion(+)
diff --git a/meta/classes/goarch.bbclass b/meta/classes/goarch.bbclass
index f54c5169e3e..5fd9f294a8a 100644
--- a/meta/classes/goarch.bbclass
+++ b/meta/classes/goarch.bbclass
@@ -36,6 +36,7 @@ COMPATIBLE_HOST_mipsarchn32 = "null"
ARM_INSTRUCTION_SET = "arm"
TUNE_CCARGS_remove = "-march=mips32r2"
SECURITY_CFLAGS_mips = "${SECURITY_NOPIE_CFLAGS}"
+SECURITY_CFLAGS_mips64 = "${SECURITY_NOPIE_CFLAGS}"
SECURITY_NOPIE_CFLAGS ??= ""
def go_map_arch(a, d):
--
2.17.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH] goarch.bbclass: set SECURITY_CFLAGS for mips64
2018-06-13 6:12 [PATCH] goarch.bbclass: set SECURITY_CFLAGS for mips64 kai.kang
@ 2018-06-13 14:01 ` Khem Raj
2018-06-14 3:15 ` Kang Kai
0 siblings, 1 reply; 5+ messages in thread
From: Khem Raj @ 2018-06-13 14:01 UTC (permalink / raw)
To: Kang Kai; +Cc: Patches and discussions about the oe-core layer
On Wed, Jun 13, 2018 at 12:16 AM <kai.kang@windriver.com> wrote:
>
> From: Kai Kang <kai.kang@windriver.com>
>
> When include conf/distro/include/security_flags.inc, NOPIE flags are
> still required for MIPS64 target builds. Otherwise it fails to build
> packages such as glide which inherit go.bbclass:
>
> | .../tmp-glibc/work/mips64-wrs-linux/glide/0.13.1-r0/recipe-sysroot-native/usr/bin/mips64-wrs-linux/../../libexec/mips64-wrs-linux/
> | gcc/mips64-wrs-linux/7.3.0/ld: .../tmp-glibc/work/mips64-wrs-linux/glide/0.13.1-r0/go-tmp/go-link-518447869/go.o:
> | relocation R_MIPS_26 against `a local symbol' can not be used when making a shared object; recompile with -fPIC`
>
> Signed-off-by: Kai Kang <kai.kang@windriver.com>
> ---
> meta/classes/goarch.bbclass | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/meta/classes/goarch.bbclass b/meta/classes/goarch.bbclass
> index f54c5169e3e..5fd9f294a8a 100644
> --- a/meta/classes/goarch.bbclass
> +++ b/meta/classes/goarch.bbclass
> @@ -36,6 +36,7 @@ COMPATIBLE_HOST_mipsarchn32 = "null"
> ARM_INSTRUCTION_SET = "arm"
> TUNE_CCARGS_remove = "-march=mips32r2"
> SECURITY_CFLAGS_mips = "${SECURITY_NOPIE_CFLAGS}"
> +SECURITY_CFLAGS_mips64 = "${SECURITY_NOPIE_CFLAGS}"
perhaps we should use _mipsall once
> SECURITY_NOPIE_CFLAGS ??= ""
>
> def go_map_arch(a, d):
> --
> 2.17.1
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] goarch.bbclass: set SECURITY_CFLAGS for mips64
2018-06-13 14:01 ` Khem Raj
@ 2018-06-14 3:15 ` Kang Kai
2018-06-14 3:33 ` Khem Raj
0 siblings, 1 reply; 5+ messages in thread
From: Kang Kai @ 2018-06-14 3:15 UTC (permalink / raw)
To: Khem Raj; +Cc: Patches and discussions about the oe-core layer
On 2018年06月13日 22:01, Khem Raj wrote:
> On Wed, Jun 13, 2018 at 12:16 AM <kai.kang@windriver.com> wrote:
>> From: Kai Kang <kai.kang@windriver.com>
>>
>> When include conf/distro/include/security_flags.inc, NOPIE flags are
>> still required for MIPS64 target builds. Otherwise it fails to build
>> packages such as glide which inherit go.bbclass:
>>
>> | .../tmp-glibc/work/mips64-wrs-linux/glide/0.13.1-r0/recipe-sysroot-native/usr/bin/mips64-wrs-linux/../../libexec/mips64-wrs-linux/
>> | gcc/mips64-wrs-linux/7.3.0/ld: .../tmp-glibc/work/mips64-wrs-linux/glide/0.13.1-r0/go-tmp/go-link-518447869/go.o:
>> | relocation R_MIPS_26 against `a local symbol' can not be used when making a shared object; recompile with -fPIC`
>>
>> Signed-off-by: Kai Kang <kai.kang@windriver.com>
>> ---
>> meta/classes/goarch.bbclass | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> diff --git a/meta/classes/goarch.bbclass b/meta/classes/goarch.bbclass
>> index f54c5169e3e..5fd9f294a8a 100644
>> --- a/meta/classes/goarch.bbclass
>> +++ b/meta/classes/goarch.bbclass
>> @@ -36,6 +36,7 @@ COMPATIBLE_HOST_mipsarchn32 = "null"
>> ARM_INSTRUCTION_SET = "arm"
>> TUNE_CCARGS_remove = "-march=mips32r2"
>> SECURITY_CFLAGS_mips = "${SECURITY_NOPIE_CFLAGS}"
>> +SECURITY_CFLAGS_mips64 = "${SECURITY_NOPIE_CFLAGS}"
> perhaps we should use _mipsall once
Hi Khem,
I don't quite follow you. It seems no such override '_mipsall' exists.
Do you mean 'mipsarch' or something else? Thanks.
Regards,
Kai
>
>> SECURITY_NOPIE_CFLAGS ??= ""
>>
>> def go_map_arch(a, d):
>> --
>> 2.17.1
>>
>> --
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core@lists.openembedded.org
>> http://lists.openembedded.org/mailman/listinfo/openembedded-core
--
Regards,
Neil | Kai Kang
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] goarch.bbclass: set SECURITY_CFLAGS for mips64
2018-06-14 3:15 ` Kang Kai
@ 2018-06-14 3:33 ` Khem Raj
2018-06-14 5:21 ` Kang Kai
0 siblings, 1 reply; 5+ messages in thread
From: Khem Raj @ 2018-06-14 3:33 UTC (permalink / raw)
To: Kang Kai; +Cc: Patches and discussions about the oe-core layer
On 6/13/18 8:15 PM, Kang Kai wrote:
> On 2018年06月13日 22:01, Khem Raj wrote:
>> On Wed, Jun 13, 2018 at 12:16 AM <kai.kang@windriver.com> wrote:
>>> From: Kai Kang <kai.kang@windriver.com>
>>>
>>> When include conf/distro/include/security_flags.inc, NOPIE flags are
>>> still required for MIPS64 target builds. Otherwise it fails to build
>>> packages such as glide which inherit go.bbclass:
>>>
>>> |
>>> .../tmp-glibc/work/mips64-wrs-linux/glide/0.13.1-r0/recipe-sysroot-native/usr/bin/mips64-wrs-linux/../../libexec/mips64-wrs-linux/
>>>
>>> | gcc/mips64-wrs-linux/7.3.0/ld:
>>> .../tmp-glibc/work/mips64-wrs-linux/glide/0.13.1-r0/go-tmp/go-link-518447869/go.o:
>>>
>>> | relocation R_MIPS_26 against `a local symbol' can not be used when
>>> making a shared object; recompile with -fPIC`
>>>
>>> Signed-off-by: Kai Kang <kai.kang@windriver.com>
>>> ---
>>> meta/classes/goarch.bbclass | 1 +
>>> 1 file changed, 1 insertion(+)
>>>
>>> diff --git a/meta/classes/goarch.bbclass b/meta/classes/goarch.bbclass
>>> index f54c5169e3e..5fd9f294a8a 100644
>>> --- a/meta/classes/goarch.bbclass
>>> +++ b/meta/classes/goarch.bbclass
>>> @@ -36,6 +36,7 @@ COMPATIBLE_HOST_mipsarchn32 = "null"
>>> ARM_INSTRUCTION_SET = "arm"
>>> TUNE_CCARGS_remove = "-march=mips32r2"
>>> SECURITY_CFLAGS_mips = "${SECURITY_NOPIE_CFLAGS}"
>>> +SECURITY_CFLAGS_mips64 = "${SECURITY_NOPIE_CFLAGS}"
>> perhaps we should use _mipsall once
> Hi Khem,
>
> I don't quite follow you. It seems no such override '_mipsall' exists.
> Do you mean 'mipsarch' or something else? Thanks.
>
yes mipsarch indeed.
> Regards,
> Kai
>>
>>> SECURITY_NOPIE_CFLAGS ??= ""
>>>
>>> def go_map_arch(a, d):
>>> --
>>> 2.17.1
>>>
>>> --
>>> _______________________________________________
>>> Openembedded-core mailing list
>>> Openembedded-core@lists.openembedded.org
>>> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] goarch.bbclass: set SECURITY_CFLAGS for mips64
2018-06-14 3:33 ` Khem Raj
@ 2018-06-14 5:21 ` Kang Kai
0 siblings, 0 replies; 5+ messages in thread
From: Kang Kai @ 2018-06-14 5:21 UTC (permalink / raw)
To: Khem Raj; +Cc: Patches and discussions about the oe-core layer
On 2018年06月14日 11:33, Khem Raj wrote:
>
>
> On 6/13/18 8:15 PM, Kang Kai wrote:
>> On 2018年06月13日 22:01, Khem Raj wrote:
>>> On Wed, Jun 13, 2018 at 12:16 AM <kai.kang@windriver.com> wrote:
>>>> From: Kai Kang <kai.kang@windriver.com>
>>>>
>>>> When include conf/distro/include/security_flags.inc, NOPIE flags are
>>>> still required for MIPS64 target builds. Otherwise it fails to build
>>>> packages such as glide which inherit go.bbclass:
>>>>
>>>> |
>>>> .../tmp-glibc/work/mips64-wrs-linux/glide/0.13.1-r0/recipe-sysroot-native/usr/bin/mips64-wrs-linux/../../libexec/mips64-wrs-linux/
>>>>
>>>> | gcc/mips64-wrs-linux/7.3.0/ld:
>>>> .../tmp-glibc/work/mips64-wrs-linux/glide/0.13.1-r0/go-tmp/go-link-518447869/go.o:
>>>>
>>>> | relocation R_MIPS_26 against `a local symbol' can not be used
>>>> when making a shared object; recompile with -fPIC`
>>>>
>>>> Signed-off-by: Kai Kang <kai.kang@windriver.com>
>>>> ---
>>>> meta/classes/goarch.bbclass | 1 +
>>>> 1 file changed, 1 insertion(+)
>>>>
>>>> diff --git a/meta/classes/goarch.bbclass b/meta/classes/goarch.bbclass
>>>> index f54c5169e3e..5fd9f294a8a 100644
>>>> --- a/meta/classes/goarch.bbclass
>>>> +++ b/meta/classes/goarch.bbclass
>>>> @@ -36,6 +36,7 @@ COMPATIBLE_HOST_mipsarchn32 = "null"
>>>> ARM_INSTRUCTION_SET = "arm"
>>>> TUNE_CCARGS_remove = "-march=mips32r2"
>>>> SECURITY_CFLAGS_mips = "${SECURITY_NOPIE_CFLAGS}"
>>>> +SECURITY_CFLAGS_mips64 = "${SECURITY_NOPIE_CFLAGS}"
>>> perhaps we should use _mipsall once
>> Hi Khem,
>>
>> I don't quite follow you. It seems no such override '_mipsall'
>> exists. Do you mean 'mipsarch' or something else? Thanks.
>>
>
> yes mipsarch indeed.
Thanks. V2 will be sent.
--Kai
>
>> Regards,
>> Kai
>>>
>>>> SECURITY_NOPIE_CFLAGS ??= ""
>>>>
>>>> def go_map_arch(a, d):
>>>> --
>>>> 2.17.1
>>>>
>>>> --
>>>> _______________________________________________
>>>> Openembedded-core mailing list
>>>> Openembedded-core@lists.openembedded.org
>>>> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>>
>>
>
--
Regards,
Neil | Kai Kang
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-06-14 5:24 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-13 6:12 [PATCH] goarch.bbclass: set SECURITY_CFLAGS for mips64 kai.kang
2018-06-13 14:01 ` Khem Raj
2018-06-14 3:15 ` Kang Kai
2018-06-14 3:33 ` Khem Raj
2018-06-14 5:21 ` Kang Kai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox