diff mbox series

gcc-runtime: Move content from gcclibdir into libdir

Message ID 20190812232234.41199-1-raj.khem@gmail.com
State New
Headers show
Series gcc-runtime: Move content from gcclibdir into libdir | expand

Commit Message

Khem Raj Aug. 12, 2019, 11:22 p.m. UTC
OE does not use the traditional /usr/lib/gcc prefix to store gcc-runtime
it basically is moved into libdir, however some newer files were
installed by newer versions of gcc especially libgomp ( omp.h openacc.h )
into gcclibdir, so we have content in both directories, this confuses
other tools which are trying to guess the gcc installation and its
runtime location, since now we have two directories, the tools either
choose one or other and we get inconsistent behavior, e.g. clang for
aarch64 uses /usr/lib but same clang for riscv64 chose /usr/lib/gcc

This change ensures that OE ends up with single valid location for gcc
runtime files

Signed-off-by: Khem Raj <raj.khem@gmail.com>

---
 meta/recipes-devtools/gcc/gcc-runtime.inc    | 5 +++++
 meta/recipes-devtools/gcc/gcc-runtime_8.3.bb | 3 ++-
 meta/recipes-devtools/gcc/gcc-runtime_9.1.bb | 3 ++-
 3 files changed, 9 insertions(+), 2 deletions(-)

-- 
2.22.0

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Comments

Richard Purdie Aug. 13, 2019, 2:22 p.m. UTC | #1
On Mon, 2019-08-12 at 16:22 -0700, Khem Raj wrote:
> OE does not use the traditional /usr/lib/gcc prefix to store gcc-

> runtime

> it basically is moved into libdir, however some newer files were

> installed by newer versions of gcc especially libgomp ( omp.h

> openacc.h )

> into gcclibdir, so we have content in both directories, this confuses

> other tools which are trying to guess the gcc installation and its

> runtime location, since now we have two directories, the tools either

> choose one or other and we get inconsistent behavior, e.g. clang for

> aarch64 uses /usr/lib but same clang for riscv64 chose /usr/lib/gcc

> 

> This change ensures that OE ends up with single valid location for

> gcc

> runtime files

> 

> Signed-off-by: Khem Raj <raj.khem@gmail.com>

> ---

>  meta/recipes-devtools/gcc/gcc-runtime.inc    | 5 +++++

>  meta/recipes-devtools/gcc/gcc-runtime_8.3.bb | 3 ++-

>  meta/recipes-devtools/gcc/gcc-runtime_9.1.bb | 3 ++-

>  3 files changed, 9 insertions(+), 2 deletions(-)


This appears to break mingw:

https://autobuilder.yoctoproject.org/typhoon/#/builders/89/builds/925

Cheers,

Richard


> diff --git a/meta/recipes-devtools/gcc/gcc-runtime.inc

> b/meta/recipes-devtools/gcc/gcc-runtime.inc

> index a5c2600d7f..ebba774108 100644

> --- a/meta/recipes-devtools/gcc/gcc-runtime.inc

> +++ b/meta/recipes-devtools/gcc/gcc-runtime.inc

> @@ -77,6 +77,11 @@ do_install () {

>  		cd ${B}/${TARGET_SYS}/$d/

>  		oe_runmake 'DESTDIR=${D}'

> MULTIBUILDTOP=${B}/${TARGET_SYS}/$d/ install

>  	done

> +	if [ -d ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include ]; then

> +		install -d ${D}${libdir}/${TARGET_SYS}/${BINV}/include 

> +		mv ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/*

> ${D}${libdir}/${TARGET_SYS}/${BINV}/include

> +		rmdir --ignore-fail-on-non-empty -p

> ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include

> +	fi

>  	rm -rf ${D}${infodir}/libgomp.info ${D}${infodir}/dir

>  	rm -rf ${D}${infodir}/libitm.info ${D}${infodir}/dir

>  	rm -rf ${D}${infodir}/libquadmath.info ${D}${infodir}/dir

> diff --git a/meta/recipes-devtools/gcc/gcc-runtime_8.3.bb

> b/meta/recipes-devtools/gcc/gcc-runtime_8.3.bb

> index a1c7a76d0b..172af4e7e1 100644

> --- a/meta/recipes-devtools/gcc/gcc-runtime_8.3.bb

> +++ b/meta/recipes-devtools/gcc/gcc-runtime_8.3.bb

> @@ -5,7 +5,8 @@ require gcc-runtime.inc

>  EXTRA_OECONF_append_arm = " libat_cv_have_ifunc=no "

>  

>  FILES_libgomp-dev += "\

> -    ${libdir}/gcc/${TARGET_SYS}/${BINV}/include/openacc.h \

> +    ${libdir}/${TARGET_SYS}/${BINV}/include/omp.h \

> +    ${libdir}/${TARGET_SYS}/${BINV}/include/openacc.h \

>  "

>  

>  # Building with thumb enabled on armv6t fails

> diff --git a/meta/recipes-devtools/gcc/gcc-runtime_9.1.bb

> b/meta/recipes-devtools/gcc/gcc-runtime_9.1.bb

> index a1c7a76d0b..172af4e7e1 100644

> --- a/meta/recipes-devtools/gcc/gcc-runtime_9.1.bb

> +++ b/meta/recipes-devtools/gcc/gcc-runtime_9.1.bb

> @@ -5,7 +5,8 @@ require gcc-runtime.inc

>  EXTRA_OECONF_append_arm = " libat_cv_have_ifunc=no "

>  

>  FILES_libgomp-dev += "\

> -    ${libdir}/gcc/${TARGET_SYS}/${BINV}/include/openacc.h \

> +    ${libdir}/${TARGET_SYS}/${BINV}/include/omp.h \

> +    ${libdir}/${TARGET_SYS}/${BINV}/include/openacc.h \

>  "

>  

>  # Building with thumb enabled on armv6t fails

> -- 

> 2.22.0

> 


-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Khem Raj Aug. 13, 2019, 2:36 p.m. UTC | #2
On Tue, Aug 13, 2019 at 7:23 AM Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
>

> On Mon, 2019-08-12 at 16:22 -0700, Khem Raj wrote:

> > OE does not use the traditional /usr/lib/gcc prefix to store gcc-

> > runtime

> > it basically is moved into libdir, however some newer files were

> > installed by newer versions of gcc especially libgomp ( omp.h

> > openacc.h )

> > into gcclibdir, so we have content in both directories, this confuses

> > other tools which are trying to guess the gcc installation and its

> > runtime location, since now we have two directories, the tools either

> > choose one or other and we get inconsistent behavior, e.g. clang for

> > aarch64 uses /usr/lib but same clang for riscv64 chose /usr/lib/gcc

> >

> > This change ensures that OE ends up with single valid location for

> > gcc

> > runtime files

> >

> > Signed-off-by: Khem Raj <raj.khem@gmail.com>

> > ---

> >  meta/recipes-devtools/gcc/gcc-runtime.inc    | 5 +++++

> >  meta/recipes-devtools/gcc/gcc-runtime_8.3.bb | 3 ++-

> >  meta/recipes-devtools/gcc/gcc-runtime_9.1.bb | 3 ++-

> >  3 files changed, 9 insertions(+), 2 deletions(-)

>

> This appears to break mingw:

>

> https://autobuilder.yoctoproject.org/typhoon/#/builders/89/builds/925

>


seems   virtual:nativesdk:/home/pokybuild/yocto-worker/meta-mingw/build/meta/recipes-devtools/gcc/gcc-runtime_9.1.bb:do_package

but I cant see which files can you help

> Cheers,

>

> Richard

>

>

> > diff --git a/meta/recipes-devtools/gcc/gcc-runtime.inc

> > b/meta/recipes-devtools/gcc/gcc-runtime.inc

> > index a5c2600d7f..ebba774108 100644

> > --- a/meta/recipes-devtools/gcc/gcc-runtime.inc

> > +++ b/meta/recipes-devtools/gcc/gcc-runtime.inc

> > @@ -77,6 +77,11 @@ do_install () {

> >               cd ${B}/${TARGET_SYS}/$d/

> >               oe_runmake 'DESTDIR=${D}'

> > MULTIBUILDTOP=${B}/${TARGET_SYS}/$d/ install

> >       done

> > +     if [ -d ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include ]; then

> > +             install -d ${D}${libdir}/${TARGET_SYS}/${BINV}/include

> > +             mv ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/*

> > ${D}${libdir}/${TARGET_SYS}/${BINV}/include

> > +             rmdir --ignore-fail-on-non-empty -p

> > ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include

> > +     fi

> >       rm -rf ${D}${infodir}/libgomp.info ${D}${infodir}/dir

> >       rm -rf ${D}${infodir}/libitm.info ${D}${infodir}/dir

> >       rm -rf ${D}${infodir}/libquadmath.info ${D}${infodir}/dir

> > diff --git a/meta/recipes-devtools/gcc/gcc-runtime_8.3.bb

> > b/meta/recipes-devtools/gcc/gcc-runtime_8.3.bb

> > index a1c7a76d0b..172af4e7e1 100644

> > --- a/meta/recipes-devtools/gcc/gcc-runtime_8.3.bb

> > +++ b/meta/recipes-devtools/gcc/gcc-runtime_8.3.bb

> > @@ -5,7 +5,8 @@ require gcc-runtime.inc

> >  EXTRA_OECONF_append_arm = " libat_cv_have_ifunc=no "

> >

> >  FILES_libgomp-dev += "\

> > -    ${libdir}/gcc/${TARGET_SYS}/${BINV}/include/openacc.h \

> > +    ${libdir}/${TARGET_SYS}/${BINV}/include/omp.h \

> > +    ${libdir}/${TARGET_SYS}/${BINV}/include/openacc.h \

> >  "

> >

> >  # Building with thumb enabled on armv6t fails

> > diff --git a/meta/recipes-devtools/gcc/gcc-runtime_9.1.bb

> > b/meta/recipes-devtools/gcc/gcc-runtime_9.1.bb

> > index a1c7a76d0b..172af4e7e1 100644

> > --- a/meta/recipes-devtools/gcc/gcc-runtime_9.1.bb

> > +++ b/meta/recipes-devtools/gcc/gcc-runtime_9.1.bb

> > @@ -5,7 +5,8 @@ require gcc-runtime.inc

> >  EXTRA_OECONF_append_arm = " libat_cv_have_ifunc=no "

> >

> >  FILES_libgomp-dev += "\

> > -    ${libdir}/gcc/${TARGET_SYS}/${BINV}/include/openacc.h \

> > +    ${libdir}/${TARGET_SYS}/${BINV}/include/omp.h \

> > +    ${libdir}/${TARGET_SYS}/${BINV}/include/openacc.h \

> >  "

> >

> >  # Building with thumb enabled on armv6t fails

> > --

> > 2.22.0

> >

>

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Richard Purdie Aug. 13, 2019, 2:53 p.m. UTC | #3
On Tue, 2019-08-13 at 07:36 -0700, Khem Raj wrote:
> On Tue, Aug 13, 2019 at 7:23 AM Richard Purdie

> <richard.purdie@linuxfoundation.org> wrote:

> > On Mon, 2019-08-12 at 16:22 -0700, Khem Raj wrote:

> > > OE does not use the traditional /usr/lib/gcc prefix to store gcc-

> > > runtime

> > > it basically is moved into libdir, however some newer files were

> > > installed by newer versions of gcc especially libgomp ( omp.h

> > > openacc.h )

> > > into gcclibdir, so we have content in both directories, this

> > > confuses

> > > other tools which are trying to guess the gcc installation and

> > > its

> > > runtime location, since now we have two directories, the tools

> > > either

> > > choose one or other and we get inconsistent behavior, e.g. clang

> > > for

> > > aarch64 uses /usr/lib but same clang for riscv64 chose

> > > /usr/lib/gcc

> > > 

> > > This change ensures that OE ends up with single valid location

> > > for

> > > gcc

> > > runtime files

> > > 

> > > Signed-off-by: Khem Raj <raj.khem@gmail.com>

> > > ---

> > >  meta/recipes-devtools/gcc/gcc-runtime.inc    | 5 +++++

> > >  meta/recipes-devtools/gcc/gcc-runtime_8.3.bb | 3 ++-

> > >  meta/recipes-devtools/gcc/gcc-runtime_9.1.bb | 3 ++-

> > >  3 files changed, 9 insertions(+), 2 deletions(-)

> > 

> > This appears to break mingw:

> > 

> > https://autobuilder.yoctoproject.org/typhoon/#/builders/89/builds/925

> > 

> 

> seems   virtual:nativesdk:/home/pokybuild/yocto-worker/meta-

> mingw/build/meta/recipes-devtools/gcc/gcc-runtime_9.1.bb:do_package

> 

> but I cant see which files can you help


They're in the 1b and 2b logs, e.g.:

https://autobuilder.yoctoproject.org/typhoon/api/v2/logs/731185/raw

Cheers,

Richard

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
diff mbox series

Patch

diff --git a/meta/recipes-devtools/gcc/gcc-runtime.inc b/meta/recipes-devtools/gcc/gcc-runtime.inc
index a5c2600d7f..ebba774108 100644
--- a/meta/recipes-devtools/gcc/gcc-runtime.inc
+++ b/meta/recipes-devtools/gcc/gcc-runtime.inc
@@ -77,6 +77,11 @@  do_install () {
 		cd ${B}/${TARGET_SYS}/$d/
 		oe_runmake 'DESTDIR=${D}' MULTIBUILDTOP=${B}/${TARGET_SYS}/$d/ install
 	done
+	if [ -d ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include ]; then
+		install -d ${D}${libdir}/${TARGET_SYS}/${BINV}/include 
+		mv ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include/* ${D}${libdir}/${TARGET_SYS}/${BINV}/include
+		rmdir --ignore-fail-on-non-empty -p ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include
+	fi
 	rm -rf ${D}${infodir}/libgomp.info ${D}${infodir}/dir
 	rm -rf ${D}${infodir}/libitm.info ${D}${infodir}/dir
 	rm -rf ${D}${infodir}/libquadmath.info ${D}${infodir}/dir
diff --git a/meta/recipes-devtools/gcc/gcc-runtime_8.3.bb b/meta/recipes-devtools/gcc/gcc-runtime_8.3.bb
index a1c7a76d0b..172af4e7e1 100644
--- a/meta/recipes-devtools/gcc/gcc-runtime_8.3.bb
+++ b/meta/recipes-devtools/gcc/gcc-runtime_8.3.bb
@@ -5,7 +5,8 @@  require gcc-runtime.inc
 EXTRA_OECONF_append_arm = " libat_cv_have_ifunc=no "
 
 FILES_libgomp-dev += "\
-    ${libdir}/gcc/${TARGET_SYS}/${BINV}/include/openacc.h \
+    ${libdir}/${TARGET_SYS}/${BINV}/include/omp.h \
+    ${libdir}/${TARGET_SYS}/${BINV}/include/openacc.h \
 "
 
 # Building with thumb enabled on armv6t fails
diff --git a/meta/recipes-devtools/gcc/gcc-runtime_9.1.bb b/meta/recipes-devtools/gcc/gcc-runtime_9.1.bb
index a1c7a76d0b..172af4e7e1 100644
--- a/meta/recipes-devtools/gcc/gcc-runtime_9.1.bb
+++ b/meta/recipes-devtools/gcc/gcc-runtime_9.1.bb
@@ -5,7 +5,8 @@  require gcc-runtime.inc
 EXTRA_OECONF_append_arm = " libat_cv_have_ifunc=no "
 
 FILES_libgomp-dev += "\
-    ${libdir}/gcc/${TARGET_SYS}/${BINV}/include/openacc.h \
+    ${libdir}/${TARGET_SYS}/${BINV}/include/omp.h \
+    ${libdir}/${TARGET_SYS}/${BINV}/include/openacc.h \
 "
 
 # Building with thumb enabled on armv6t fails