Patchwork [v4,2/2] libgomp: add libgomp (openmp) library, and build for powerpc targets by default

login
register
mail settings
Submitter Matthew McClintock
Date July 10, 2012, 4:12 p.m.
Message ID <1341936749-3209-1-git-send-email-msm@freescale.com>
Download mbox | patch
Permalink /patch/31689/
State New
Headers show

Comments

Matthew McClintock - July 10, 2012, 4:12 p.m.
Signed-off-by: Matthew McClintock <msm@freescale.com>
---
 meta/recipes-devtools/gcc/gcc-4.7.inc               |    2 +-
 meta/recipes-devtools/gcc/gcc-configure-runtime.inc |    7 +++++++
 meta/recipes-devtools/gcc/gcc-package-runtime.inc   |   14 +++++++++++++-
 3 files changed, 21 insertions(+), 2 deletions(-)
Saul Wold - July 13, 2012, 4:55 a.m.
On 07/10/2012 09:12 AM, Matthew McClintock wrote:
> Signed-off-by: Matthew McClintock <msm@freescale.com>
> ---
>   meta/recipes-devtools/gcc/gcc-4.7.inc               |    2 +-
>   meta/recipes-devtools/gcc/gcc-configure-runtime.inc |    7 +++++++
>   meta/recipes-devtools/gcc/gcc-package-runtime.inc   |   14 +++++++++++++-
>   3 files changed, 21 insertions(+), 2 deletions(-)
>
> diff --git a/meta/recipes-devtools/gcc/gcc-4.7.inc b/meta/recipes-devtools/gcc/gcc-4.7.inc
> index c7dbc3c..be142a1 100644
> --- a/meta/recipes-devtools/gcc/gcc-4.7.inc
> +++ b/meta/recipes-devtools/gcc/gcc-4.7.inc
> @@ -1,6 +1,6 @@
>   require gcc-common.inc
>
> -PR = "r3"
> +PR = "r4"
>
>   # Third digit in PV should be incremented after a minor release
>   # happens from this branch on gcc e.g. currently its 4.7.1
> diff --git a/meta/recipes-devtools/gcc/gcc-configure-runtime.inc b/meta/recipes-devtools/gcc/gcc-configure-runtime.inc
> index 095d6c1..d40383c 100644
> --- a/meta/recipes-devtools/gcc/gcc-configure-runtime.inc
> +++ b/meta/recipes-devtools/gcc/gcc-configure-runtime.inc
> @@ -8,6 +8,8 @@ EXTRA_OECONF_PATHS = " \
>       --with-build-sysroot=${STAGING_DIR_TARGET}"
>
>   RUNTIMETARGET = "libssp libstdc++-v3"
> +RUNTIMETARGET_append_powerpc = " libgomp"
> +RUNTIMETARGET_append_powerpc64 = " libgomp"
>   #  ?
>   # libiberty
>   # libmudflap
> @@ -41,6 +43,11 @@ do_install () {
>   	for d in ${RUNTIMETARGET}; do
>   		cd ${B}/$target/$d/
>   		oe_runmake 'DESTDIR=${D}' MULTIBUILDTOP=${B}/$target/$d/ install
> +		if [ "$d" = "libgomp" ]; then
> +			rm -rf ${D}${datadir}/info/libgomp.info ${D}${datadir}/info/dir
> +			rmdir --ignore-fail-on-non-empty -p ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/finclude
> +			rmdir --ignore-fail-on-non-empty -p ${D}${datadir}/info
> +		fi
>   	done
>   	chown -R root:root ${D}
>   }
> diff --git a/meta/recipes-devtools/gcc/gcc-package-runtime.inc b/meta/recipes-devtools/gcc/gcc-package-runtime.inc
> index e0cb51b..a81e3b7 100644
> --- a/meta/recipes-devtools/gcc/gcc-package-runtime.inc
> +++ b/meta/recipes-devtools/gcc/gcc-package-runtime.inc
> @@ -13,6 +13,9 @@ PACKAGES = "\
>     libgfortran-dev \
>     libmudflap \
>     libmudflap-dev \
> +  libgomp \
> +  libgomp-dev \
> +  libgomp-staticdev \
>   "
>   # The base package doesn't exist, so we clear the recommends.
>   RRECOMMENDS_${PN}-dbg = ""
> @@ -61,7 +64,16 @@ FILES_libmudflap-dev = "\
>     ${libdir}/libmudflap*.a \
>     ${libdir}/libmudflap*.la"
>
> +FILES_libgomp-dev = "\
> +  ${libdir}/libgomp*.so \
> +  ${libdir}/libgomp*.la \
> +  ${libdir}/libgomp.spec \
> +  ${libdir}/gcc/${TARGET_SYS}/${BINV}/include/omp.h \
> +  "
This was already merged into OE-Core, but I just found a packaging issue 
with it.

The above .so should be libgomp*${SOLIBDEV} and libgomp*${SOLIB}

ERROR: QA Issue: gcc-runtime: Files/directories were installed but not 
shipped
   /usr/lib/libgomp.so.1.0.0
   /usr/lib/libgomp.so.1

Sorry I did not catch this earlier

Sau!

> +FILES_libgomp-staticdev = "\
> +  ${libdir}/libgomp*.a \
> +  "
> +
>   do_package_write_ipk[depends] += "virtual/${MLPREFIX}libc:do_package"
>   do_package_write_deb[depends] += "virtual/${MLPREFIX}libc:do_package"
>   do_package_write_rpm[depends] += "virtual/${MLPREFIX}libc:do_package"
> -
>
McClintock Matthew-B29882 - July 13, 2012, 4:59 a.m.
On Thu, Jul 12, 2012 at 11:55 PM, Saul Wold <sgw@linux.intel.com> wrote:
> On 07/10/2012 09:12 AM, Matthew McClintock wrote:
>>
>> Signed-off-by: Matthew McClintock <msm@freescale.com>
>> ---
>>   meta/recipes-devtools/gcc/gcc-4.7.inc               |    2 +-
>>   meta/recipes-devtools/gcc/gcc-configure-runtime.inc |    7 +++++++
>>   meta/recipes-devtools/gcc/gcc-package-runtime.inc   |   14
>> +++++++++++++-
>>   3 files changed, 21 insertions(+), 2 deletions(-)
>>
>> diff --git a/meta/recipes-devtools/gcc/gcc-4.7.inc
>> b/meta/recipes-devtools/gcc/gcc-4.7.inc
>> index c7dbc3c..be142a1 100644
>> --- a/meta/recipes-devtools/gcc/gcc-4.7.inc
>> +++ b/meta/recipes-devtools/gcc/gcc-4.7.inc
>> @@ -1,6 +1,6 @@
>>   require gcc-common.inc
>>
>> -PR = "r3"
>> +PR = "r4"
>>
>>   # Third digit in PV should be incremented after a minor release
>>   # happens from this branch on gcc e.g. currently its 4.7.1
>> diff --git a/meta/recipes-devtools/gcc/gcc-configure-runtime.inc
>> b/meta/recipes-devtools/gcc/gcc-configure-runtime.inc
>> index 095d6c1..d40383c 100644
>> --- a/meta/recipes-devtools/gcc/gcc-configure-runtime.inc
>> +++ b/meta/recipes-devtools/gcc/gcc-configure-runtime.inc
>> @@ -8,6 +8,8 @@ EXTRA_OECONF_PATHS = " \
>>       --with-build-sysroot=${STAGING_DIR_TARGET}"
>>
>>   RUNTIMETARGET = "libssp libstdc++-v3"
>> +RUNTIMETARGET_append_powerpc = " libgomp"
>> +RUNTIMETARGET_append_powerpc64 = " libgomp"
>>   #  ?
>>   # libiberty
>>   # libmudflap
>> @@ -41,6 +43,11 @@ do_install () {
>>         for d in ${RUNTIMETARGET}; do
>>                 cd ${B}/$target/$d/
>>                 oe_runmake 'DESTDIR=${D}' MULTIBUILDTOP=${B}/$target/$d/
>> install
>> +               if [ "$d" = "libgomp" ]; then
>> +                       rm -rf ${D}${datadir}/info/libgomp.info
>> ${D}${datadir}/info/dir
>> +                       rmdir --ignore-fail-on-non-empty -p
>> ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/finclude
>> +                       rmdir --ignore-fail-on-non-empty -p
>> ${D}${datadir}/info
>> +               fi
>>         done
>>         chown -R root:root ${D}
>>   }
>> diff --git a/meta/recipes-devtools/gcc/gcc-package-runtime.inc
>> b/meta/recipes-devtools/gcc/gcc-package-runtime.inc
>> index e0cb51b..a81e3b7 100644
>> --- a/meta/recipes-devtools/gcc/gcc-package-runtime.inc
>> +++ b/meta/recipes-devtools/gcc/gcc-package-runtime.inc
>> @@ -13,6 +13,9 @@ PACKAGES = "\
>>     libgfortran-dev \
>>     libmudflap \
>>     libmudflap-dev \
>> +  libgomp \
>> +  libgomp-dev \
>> +  libgomp-staticdev \
>>   "
>>   # The base package doesn't exist, so we clear the recommends.
>>   RRECOMMENDS_${PN}-dbg = ""
>> @@ -61,7 +64,16 @@ FILES_libmudflap-dev = "\
>>     ${libdir}/libmudflap*.a \
>>     ${libdir}/libmudflap*.la"
>>
>> +FILES_libgomp-dev = "\
>> +  ${libdir}/libgomp*.so \
>> +  ${libdir}/libgomp*.la \
>> +  ${libdir}/libgomp.spec \
>> +  ${libdir}/gcc/${TARGET_SYS}/${BINV}/include/omp.h \
>> +  "
>
> This was already merged into OE-Core, but I just found a packaging issue
> with it.
>
> The above .so should be libgomp*${SOLIBDEV} and libgomp*${SOLIB}
>
> ERROR: QA Issue: gcc-runtime: Files/directories were installed but not
> shipped
>   /usr/lib/libgomp.so.1.0.0
>   /usr/lib/libgomp.so.1
>
> Sorry I did not catch this earlier

Will you fix this or do you want me too?

I'm confused why not just do a

${libdir}/libgomp*.so*

?

-M

>
> Sau!
>
>
>> +FILES_libgomp-staticdev = "\
>> +  ${libdir}/libgomp*.a \
>> +  "
>> +
>>   do_package_write_ipk[depends] += "virtual/${MLPREFIX}libc:do_package"
>>   do_package_write_deb[depends] += "virtual/${MLPREFIX}libc:do_package"
>>   do_package_write_rpm[depends] += "virtual/${MLPREFIX}libc:do_package"
>> -
>>
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

Patch

diff --git a/meta/recipes-devtools/gcc/gcc-4.7.inc b/meta/recipes-devtools/gcc/gcc-4.7.inc
index c7dbc3c..be142a1 100644
--- a/meta/recipes-devtools/gcc/gcc-4.7.inc
+++ b/meta/recipes-devtools/gcc/gcc-4.7.inc
@@ -1,6 +1,6 @@ 
 require gcc-common.inc
 
-PR = "r3"
+PR = "r4"
 
 # Third digit in PV should be incremented after a minor release
 # happens from this branch on gcc e.g. currently its 4.7.1
diff --git a/meta/recipes-devtools/gcc/gcc-configure-runtime.inc b/meta/recipes-devtools/gcc/gcc-configure-runtime.inc
index 095d6c1..d40383c 100644
--- a/meta/recipes-devtools/gcc/gcc-configure-runtime.inc
+++ b/meta/recipes-devtools/gcc/gcc-configure-runtime.inc
@@ -8,6 +8,8 @@  EXTRA_OECONF_PATHS = " \
     --with-build-sysroot=${STAGING_DIR_TARGET}"
 
 RUNTIMETARGET = "libssp libstdc++-v3"
+RUNTIMETARGET_append_powerpc = " libgomp"
+RUNTIMETARGET_append_powerpc64 = " libgomp"
 #  ?
 # libiberty
 # libmudflap
@@ -41,6 +43,11 @@  do_install () {
 	for d in ${RUNTIMETARGET}; do
 		cd ${B}/$target/$d/
 		oe_runmake 'DESTDIR=${D}' MULTIBUILDTOP=${B}/$target/$d/ install
+		if [ "$d" = "libgomp" ]; then
+			rm -rf ${D}${datadir}/info/libgomp.info ${D}${datadir}/info/dir
+			rmdir --ignore-fail-on-non-empty -p ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/finclude
+			rmdir --ignore-fail-on-non-empty -p ${D}${datadir}/info
+		fi
 	done
 	chown -R root:root ${D}
 }
diff --git a/meta/recipes-devtools/gcc/gcc-package-runtime.inc b/meta/recipes-devtools/gcc/gcc-package-runtime.inc
index e0cb51b..a81e3b7 100644
--- a/meta/recipes-devtools/gcc/gcc-package-runtime.inc
+++ b/meta/recipes-devtools/gcc/gcc-package-runtime.inc
@@ -13,6 +13,9 @@  PACKAGES = "\
   libgfortran-dev \
   libmudflap \
   libmudflap-dev \
+  libgomp \
+  libgomp-dev \
+  libgomp-staticdev \
 "
 # The base package doesn't exist, so we clear the recommends.
 RRECOMMENDS_${PN}-dbg = ""
@@ -61,7 +64,16 @@  FILES_libmudflap-dev = "\
   ${libdir}/libmudflap*.a \
   ${libdir}/libmudflap*.la"
 
+FILES_libgomp-dev = "\
+  ${libdir}/libgomp*.so \
+  ${libdir}/libgomp*.la \
+  ${libdir}/libgomp.spec \
+  ${libdir}/gcc/${TARGET_SYS}/${BINV}/include/omp.h \
+  "
+FILES_libgomp-staticdev = "\
+  ${libdir}/libgomp*.a \
+  "
+
 do_package_write_ipk[depends] += "virtual/${MLPREFIX}libc:do_package"
 do_package_write_deb[depends] += "virtual/${MLPREFIX}libc:do_package"
 do_package_write_rpm[depends] += "virtual/${MLPREFIX}libc:do_package"
-