OE4T / meta-tegra

BSP layer for NVIDIA Jetson platforms, based on L4T
MIT License
389 stars 216 forks source link

gcc tegra inc files is overlapping the oe-core #1002

Closed quaresmajose closed 2 years ago

quaresmajose commented 2 years ago

Describe the bug

The meta-tegra layer when enabled is superimposing its gcc inc files [1] and e currently don't use the oe-core file at [2].

[1] meta-tegra/recipes-devtools/gcc/gcc-source.inc [2] openembedded-core/meta/recipes-devtools/gcc/gcc-source.inc

The gcc-source.inc has the same content currently but the probability of all other inc being different is quite high. Maybe they don't need the inc files and if they requires it, it needs to be versioned to don't overlap the oe-core.

ls meta-tegra/recipes-devtools/gcc/ |grep inc
gcc-8.5.inc
gcc-common.inc
gcc-configure-common.inc
gcc-cross-canadian.inc
gcc-cross.inc
gcc-crosssdk.inc
gcc-multilib-config.inc
gcc-runtime.inc
gcc-shared-source.inc
gcc-source.inc
gcc-target.inc
libgcc-common.inc
libgcc.inc
libgcc-initial.inc

To Reproduce

bitbake-getvar -r gcc-source-11.2.0 PN
#
# $PN [3 operations]
#   set /home/quaresmajose/factories/xilinx-kirkstone/lmp-manifest/build/conf/../../layers/openembedded-core/meta/conf/bitbake.conf:234
#     "${@bb.parse.vars_from_file(d.getVar('FILE', False),d)[0] or 'defaultpkgname'}"
#   set /home/quaresmajose/factories/xilinx-kirkstone/lmp-manifest/build/conf/../../layers/openembedded-core/meta/conf/documentation.conf:332
#     [doc] "PN refers to a recipe name in the context of a file used by the OpenEmbedded build system as input to create a package. It refers to a package name in the context of a file created or produced by the OpenEmbedded build system."
#   set /home/quaresmajose/factories/xilinx-kirkstone/lmp-manifest/build/conf/../../layers/meta-tegra/recipes-devtools/gcc/gcc-source.inc:10
#     "gcc-source-${PV}"
# pre-expansion value:
#   "gcc-source-${PV}"
PN="gcc-source-11.2.0"

Additional context

Found when using the Linux Micro Platform LMP from Foundries.io https://github.com/foundriesio/meta-lmp/pull/694

quaresmajose commented 2 years ago

On the first approach to solve the issue I tried to use BBMASK but it doesn't work in these cases because it only support bb and bbappend files. Maybe rename it to something layer related can solve the issue. mv meta-tegra/recipes-devtools/gcc meta-tegra/recipes-devtools/gcc-tegra

madisongh commented 2 years ago

Yeah, we should probably use gcc-8 as a prefix on those files, instead of just gcc, like we do for the recipes. Thanks for reporting it.

madisongh commented 2 years ago

I've also cherry-picked the fix to the kirkstone branch.

quaresmajose commented 2 years ago

Thanks for your quick response and fixing