[OE-core] [PATCH 2/4] gcc: Drop gcc-cross-initial and use gcc-cross instead

richard.purdie at linuxfoundation.org richard.purdie at linuxfoundation.org
Thu Dec 20 10:41:13 UTC 2018


On Wed, 2018-12-19 at 16:55 -0800, Khem Raj wrote:
> On Wed, Dec 19, 2018 at 4:16 PM Richard Purdie
> <richard.purdie at linuxfoundation.org> wrote:
> > +# ifunc doesn't appear to work on mips, casuses libbfd assertion
> > failures
> > +CACHED_CONFIGUREVARS_append_mipsarch = "
> > libc_cv_ld_gnu_indirect_function=no"
> 
> perhaps we should use --disable-gnu-indirect-function to make it more
> readable.

I did it this way to exactly emulate how it was "failing" prior to the
changes.

> > +
> >  GLIBC_EXTRA_OECONF ?= ""
> >  GLIBC_EXTRA_OECONF_class-nativesdk = ""
> >  INHIBIT_DEFAULT_DEPS = "1"
> > diff --git a/meta/recipes-devtools/gcc/gcc-configure-common.inc
> > b/meta/recipes-devtools/gcc/gcc-configure-common.inc
> > index e2ce234aa14..009ab111683 100644
> > --- a/meta/recipes-devtools/gcc/gcc-configure-common.inc
> > +++ b/meta/recipes-devtools/gcc/gcc-configure-common.inc
> > @@ -24,6 +24,8 @@ GCCTHREADS ?= "posix"
> > 
> >  GCCPIE ??= ""
> > 
> > +# glibc version is a minimum and doesn't need to track glibc
> > exactly
> > +# only governs ppc specific features in much older glibc versions
> 
> I hope there are no effects of this pinning to glibc 2.28 on non-
> glibc builds especially musl.

I took a closer look at this. The only platforms that touch it are
rs6000 and the spe port. For linux.h, that only changes one thing in
gcc/config/rs6000/rs6000.c for glibc 2.19 or higher:

/* Support for TARGET_ATOMIC_ASSIGN_EXPAND_FENV without FPRs depends
   on glibc 2.19 or greater.  */
#define RS6000_GLIBC_ATOMIC_FENV 1

For the linux64.h part:

/* Split stack is only supported for 64 bit, and requires glibc >=
2.18.  */
#  define TARGET_CAN_SPLIT_STACK
#   define TARGET_CAN_SPLIT_STACK_64BIT 1
#   define TARGET_CAN_SPLIT_STACK_64BIT 0

Are those going to cause problems on musl?


> 
> >  EXTRA_OECONF = "\
> >      ${@['--enable-clocale=generic', ''][d.getVar('USE_NLS') !=
> > 'no']} \
> >      --with-gnu-ld \
> > @@ -38,6 +40,7 @@ EXTRA_OECONF = "\
> >      --enable-libstdcxx-pch \
> >      --program-prefix=${TARGET_PREFIX} \
> >      --without-local-prefix \
> > +    --with-glibc-version=2.28 \
> >      ${EXTRA_OECONF_BASE} \
> >      ${EXTRA_OECONF_GCC_FLOAT} \
> >      ${EXTRA_OECONF_PATHS} \
> > diff --git a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
> > b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
> > index 2f32d3407fb..73f1e054463 100644
> > --- a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
> > +++ b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
> > @@ -3,7 +3,7 @@ inherit cross-canadian
> >  SUMMARY = "GNU cc and gcc C compilers (cross-canadian for
> > ${TARGET_ARCH} target)"
> >  PN = "gcc-cross-canadian-${TRANSLATED_TARGET_ARCH}"
> > 
> > -DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${HOST_PREFIX}gcc-
> > crosssdk virtual/${HOST_PREFIX}binutils-crosssdk virtual/nativesdk-
> > ${HOST_PREFIX}libc-for-gcc nativesdk-gettext flex-native"
> > +DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${HOST_PREFIX}gcc-
> > crosssdk virtual/${HOST_PREFIX}binutils-crosssdk virtual/nativesdk-
> > ${HOST_PREFIX}libc-for-gcc nativesdk-gettext flex-native
> > virtual/libc"
> > 
> >  GCCMULTILIB = "--enable-multilib"
> > 
> > diff --git a/meta/recipes-devtools/gcc/gcc-cross.inc
> > b/meta/recipes-devtools/gcc/gcc-cross.inc
> > index 89b19684bef..63a196e2e99 100644
> > --- a/meta/recipes-devtools/gcc/gcc-cross.inc
> > +++ b/meta/recipes-devtools/gcc/gcc-cross.inc
> > @@ -2,7 +2,7 @@ inherit cross
> > 
> >  INHIBIT_DEFAULT_DEPS = "1"
> >  EXTRADEPENDS = ""
> > -DEPENDS = "virtual/${TARGET_PREFIX}binutils
> > virtual/${TARGET_PREFIX}libc-for-gcc ${EXTRADEPENDS} ${NATIVEDEPS}"
> > +DEPENDS = "virtual/${TARGET_PREFIX}binutils ${EXTRADEPENDS}
> > ${NATIVEDEPS}"
> >  PROVIDES = "virtual/${TARGET_PREFIX}gcc
> > virtual/${TARGET_PREFIX}g++"
> >  python () {
> >      if d.getVar("TARGET_OS").startswith("linux"):
> > @@ -44,6 +44,12 @@ EXTRA_OECONF_PATHS = "\
> > 
> >  ARCH_FLAGS_FOR_TARGET += "-
> > isystem${STAGING_DIR_TARGET}${target_includedir}"
> > 
> > +
> > +do_configure_prepend () {
> > +       install -d ${RECIPE_SYSROOT}${target_includedir}
> > +       touch ${RECIPE_SYSROOT}${target_includedir}/limits.h
> 
> I wonder if we should use install  0644 so we dont have permission
> errors not sure what touch will do in that regard

The file isn't packaged and we're not in pseudo context so it shouldn't
matter here as we're just poking something into our own recipe
sysroot...

Cheers,

Richard



More information about the Openembedded-core mailing list