All of lore.kernel.org
 help / color / mirror / Atom feed
* devshell env in warrior
@ 2019-06-17 23:54 matthew stanger
  2019-06-18 16:08 ` Khem Raj
  0 siblings, 1 reply; 3+ messages in thread
From: matthew stanger @ 2019-06-17 23:54 UTC (permalink / raw)
  To: yocto

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

I'm trying to figure out why when running devshell in Warrior CC/CFLAGS are
not the same as do_compile for a recipe. For example.
devshell printenv yields:
CC=aarch64-poky-linux-gcc   -fuse-ld=bfd
-fmacro-prefix-map=/home/matt/rdk_warrior/build/tmp/work/7271-poky-linux/brcm/18.3+AUTOINC+0a6fb7430f-0=/usr/src/debug/ursr/18.3+AUTOINC+0a6fb7430f-0
-fdebug-prefix-map=/home/matt/rdk_warrior/build/tmp/work/7271-poky-linux/brcm/18.3+AUTOINC+0a6fb7430f-0=/usr/src/debug/ursr/18.3+AUTOINC+0a6fb7430f-0
-fdebug-prefix-map=/home/matt/rdk_warrior/build/tmp/work/7271-poky-linux/brcm/18.3+AUTOINC+0a6fb7430f-0/recipe-sysroot=
-fdebug-prefix-map=/home/matt/rdk_warrior/build/tmp/work/7271-poky-linux/brcm/18.3+AUTOINC+0a6fb7430f-0/recipe-sysroot-native=
 -fdebug-prefix-map=/home/matt/rdk_warrior/build/tmp/work-shared/tmobile-7271-kaon-mini/kernel-source=/usr/src/kernel

do_compile() {
    /usr/bin/printenv | sort > debug.log
}
yields...
CC=aarch64-poky-linux-gcc  -mcpu=cortex-a53+crc+crypto
-fstack-protector-strong  -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security
-Werror=format-security
--sysroot=/home/matt/rdk_warrior/build/tmp/work/tmobile_7271_kaon_mini-poky-linux/ursr/18.3+AUTOINC+0a6fb7430f-0/recipe-sysroot

This causes some very different behavior out of the makefile. The recipe
I"m working with has no do_configure, and only calls a makefile through
do_compile. No appends/prepends or custom functions in the recipe. This
recipe is for a lovely Broadcom driver/userspace glob and I'm trying to
troubleshoot it with x64 but not being able to get a correct working env
makes life hard. Any idea's of where I might be going wrong?

Cheers

[-- Attachment #2: Type: text/html, Size: 1830 bytes --]

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

* Re: devshell env in warrior
  2019-06-17 23:54 devshell env in warrior matthew stanger
@ 2019-06-18 16:08 ` Khem Raj
  2019-06-18 17:08   ` matthew stanger
  0 siblings, 1 reply; 3+ messages in thread
From: Khem Raj @ 2019-06-18 16:08 UTC (permalink / raw)
  To: matthew stanger; +Cc: Yocto Project

On Mon, Jun 17, 2019 at 4:55 PM matthew stanger <stangerm2@gmail.com> wrote:
>
> I'm trying to figure out why when running devshell in Warrior CC/CFLAGS are not the same as do_compile for a recipe. For example.
> devshell printenv yields:
> CC=aarch64-poky-linux-gcc   -fuse-ld=bfd -fmacro-prefix-map=/home/matt/rdk_warrior/build/tmp/work/7271-poky-linux/brcm/18.3+AUTOINC+0a6fb7430f-0=/usr/src/debug/ursr/18.3+AUTOINC+0a6fb7430f-0 -fdebug-prefix-map=/home/matt/rdk_warrior/build/tmp/work/7271-poky-linux/brcm/18.3+AUTOINC+0a6fb7430f-0=/usr/src/debug/ursr/18.3+AUTOINC+0a6fb7430f-0 -fdebug-prefix-map=/home/matt/rdk_warrior/build/tmp/work/7271-poky-linux/brcm/18.3+AUTOINC+0a6fb7430f-0/recipe-sysroot= -fdebug-prefix-map=/home/matt/rdk_warrior/build/tmp/work/7271-poky-linux/brcm/18.3+AUTOINC+0a6fb7430f-0/recipe-sysroot-native=  -fdebug-prefix-map=/home/matt/rdk_warrior/build/tmp/work-shared/tmobile-7271-kaon-mini/kernel-source=/usr/src/kernel
>
> do_compile() {
>     /usr/bin/printenv | sort > debug.log
> }
> yields...
> CC=aarch64-poky-linux-gcc  -mcpu=cortex-a53+crc+crypto -fstack-protector-strong  -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/home/matt/rdk_warrior/build/tmp/work/tmobile_7271_kaon_mini-poky-linux/ursr/18.3+AUTOINC+0a6fb7430f-0/recipe-sysroot
>
> This causes some very different behavior out of the makefile. The recipe I"m working with has no do_configure, and only calls a makefile through do_compile. No appends/prepends or custom functions in the recipe. This recipe is for a lovely Broadcom driver/userspace glob and I'm trying to troubleshoot it with x64 but not being able to get a correct working env makes life hard. Any idea's of where I might be going wrong?
>

Check that Makefiles are not overriding CC/CXX/LD etc. some old crufty
Makefiles I have seen doing that, you might see something like

CC = ${CROSS_COMPILE}gcc etc. which you should convert to weak defines
e.g. CC ?= ....

> Cheers
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto


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

* Re: devshell env in warrior
  2019-06-18 16:08 ` Khem Raj
@ 2019-06-18 17:08   ` matthew stanger
  0 siblings, 0 replies; 3+ messages in thread
From: matthew stanger @ 2019-06-18 17:08 UTC (permalink / raw)
  To: Khem Raj; +Cc: Yocto Project

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

Hey Khem,

Check that Makefiles are not overriding CC/CXX/LD etc. some old crufty
> Makefiles I have seen doing that, you might see something like

In the recipe it's caused by 'inherit module', which is needed because part
of the recipe is building modules. I would understand this would unset
CFLAGS and such but am not sure why the devshell should be different that
the environment at the first line of do_compile?

On Tue, Jun 18, 2019 at 10:08 AM Khem Raj <raj.khem@gmail.com> wrote:

> On Mon, Jun 17, 2019 at 4:55 PM matthew stanger <stangerm2@gmail.com>
> wrote:
> >
> > I'm trying to figure out why when running devshell in Warrior CC/CFLAGS
> are not the same as do_compile for a recipe. For example.
> > devshell printenv yields:
> > CC=aarch64-poky-linux-gcc   -fuse-ld=bfd
> -fmacro-prefix-map=/home/matt/rdk_warrior/build/tmp/work/7271-poky-linux/brcm/18.3+AUTOINC+0a6fb7430f-0=/usr/src/debug/ursr/18.3+AUTOINC+0a6fb7430f-0
> -fdebug-prefix-map=/home/matt/rdk_warrior/build/tmp/work/7271-poky-linux/brcm/18.3+AUTOINC+0a6fb7430f-0=/usr/src/debug/ursr/18.3+AUTOINC+0a6fb7430f-0
> -fdebug-prefix-map=/home/matt/rdk_warrior/build/tmp/work/7271-poky-linux/brcm/18.3+AUTOINC+0a6fb7430f-0/recipe-sysroot=
> -fdebug-prefix-map=/home/matt/rdk_warrior/build/tmp/work/7271-poky-linux/brcm/18.3+AUTOINC+0a6fb7430f-0/recipe-sysroot-native=
> -fdebug-prefix-map=/home/matt/rdk_warrior/build/tmp/work-shared/tmobile-7271-kaon-mini/kernel-source=/usr/src/kernel
> >
> > do_compile() {
> >     /usr/bin/printenv | sort > debug.log
> > }
> > yields...
> > CC=aarch64-poky-linux-gcc  -mcpu=cortex-a53+crc+crypto
> -fstack-protector-strong  -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security
> -Werror=format-security
> --sysroot=/home/matt/rdk_warrior/build/tmp/work/tmobile_7271_kaon_mini-poky-linux/ursr/18.3+AUTOINC+0a6fb7430f-0/recipe-sysroot
> >
> > This causes some very different behavior out of the makefile. The recipe
> I"m working with has no do_configure, and only calls a makefile through
> do_compile. No appends/prepends or custom functions in the recipe. This
> recipe is for a lovely Broadcom driver/userspace glob and I'm trying to
> troubleshoot it with x64 but not being able to get a correct working env
> makes life hard. Any idea's of where I might be going wrong?
> >
>
> Check that Makefiles are not overriding CC/CXX/LD etc. some old crufty
> Makefiles I have seen doing that, you might see something like
>
> CC = ${CROSS_COMPILE}gcc etc. which you should convert to weak defines
> e.g. CC ?= ....
>
> > Cheers
> > --
> > _______________________________________________
> > yocto mailing list
> > yocto@yoctoproject.org
> > https://lists.yoctoproject.org/listinfo/yocto
>

[-- Attachment #2: Type: text/html, Size: 3491 bytes --]

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

end of thread, other threads:[~2019-06-18 17:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-17 23:54 devshell env in warrior matthew stanger
2019-06-18 16:08 ` Khem Raj
2019-06-18 17:08   ` matthew stanger

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.