Skip to contentSkip to conversation

gcc: gcc-cross-canadian: use correct location for libraries for powerpc64

PATCH In review Matthew McClintock 4 participants 5 messages Jul 10, 2012 – Jul 17, 2012

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/2 gcc: gcc-cross-canadian: use correct location for libraries for powerpc64

This fixes the issue where gcc invokes the linker with an incorrect -L library location and gives up because it can't find libraries. It was looking in a /lib folder instead of /lib64

---
 meta/recipes-devtools/gcc/gcc-4.7.inc               |    2 +-
 meta/recipes-devtools/gcc/gcc-cross-canadian_4.7.bb |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
meta/recipes-devtools/gcc/gcc-4.7.inc +1 -1
index 65153b3..c7dbc3c 100644
@@ -1,6 +1,6 @@
 require gcc-common.inc
 
-PR = "r2"
+PR = "r3"
 
 # Third digit in PV should be incremented after a minor release
 # happens from this branch on gcc e.g. currently its 4.7.1
meta/recipes-devtools/gcc/gcc-cross-canadian_4.7.bb +2 -2
index efa345f..308e6f5 100644
@@ -9,8 +9,8 @@ DEPENDS += "gmp-nativesdk mpfr-nativesdk libmpc-nativesdk elfutils-nativesdk"
 RDEPENDS_${PN} += "mpfr-nativesdk libmpc-nativesdk elfutils-nativesdk"
 
 SYSTEMHEADERS = "/usr/include"
-SYSTEMLIBS = "/lib/"
-SYSTEMLIBS1 = "/usr/lib/"
+SYSTEMLIBS = "${target_base_libdir}/"
+SYSTEMLIBS1 = "${target_libdir}/"
 
 EXTRA_OECONF += "--disable-libunwind-exceptions --disable-libssp \
 		--disable-libgomp --disable-libmudflap \
Signature · 1 line
1.7.10
#1 lore raw

PATCH v2 2/2 libgomp: add libgomp (openmp) library, and build for powerpc targets by default

---
 meta/recipes-devtools/gcc/gcc-4.7.inc               |    2 +-
 meta/recipes-devtools/gcc/gcc-configure-runtime.inc |   10 ++++++++++
 meta/recipes-devtools/gcc/gcc-package-runtime.inc   |   14 +++++++++++++-
 3 files changed, 24 insertions(+), 2 deletions(-)
meta/recipes-devtools/gcc/gcc-4.7.inc +1 -1
index c7dbc3c..be142a1 100644
@@ -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
meta/recipes-devtools/gcc/gcc-configure-runtime.inc +10 -0
index 095d6c1..d0e49ce 100644
@@ -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
@@ -42,6 +44,14 @@ do_install () {
 		cd ${B}/$target/$d/
 		oe_runmake 'DESTDIR=${D}' MULTIBUILDTOP=${B}/$target/$d/ install
 	done
+
+	# clean up extra libgomp files
+	if [[ "${RUNTIMETARGET}" =~ "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
+
 	chown -R root:root ${D}
 }
 
meta/recipes-devtools/gcc/gcc-package-runtime.inc +13 -1
index e0cb51b..a81e3b7 100644
@@ -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"
-
Signature · 1 line
1.7.10
#2 lore raw

Re: [PATCH v2 2/2] libgomp: add libgomp (openmp) library, and build for powerpc targets by default

meta/recipes-devtools/gcc/gcc-configure-runtime.inc do_install () { · line 49

Quoted 3 lines · Matthew McClintock
meta/recipes-devtools/gcc/gcc-configure-runtime.inc +3 -0
+
+       # clean up extra libgomp files
+       if [[ "${RUNTIMETARGET}" =~ "libgomp" ]]; then

This seems bashism.

if could just check the valued of $d in the loop instead something like

Quoted 5 lines
meta/recipes-devtools/gcc/gcc-configure-runtime.inc +5 -0
+               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
+
#3 lore raw

Re: [PATCH v2 2/2] libgomp: add libgomp (openmp) library, and build for powerpc targets by default

Quoted 8 lines · Khem Raj

meta/recipes-devtools/gcc/gcc-configure-runtime.inc do_install () { · line 49

Quoted 3 lines · Matthew McClintock
meta/recipes-devtools/gcc/gcc-configure-runtime.inc +3 -0
+
+       # clean up extra libgomp files
+       if [[ "${RUNTIMETARGET}" =~ "libgomp" ]]; then

This seems bashism.

if could just check the valued of $d in the loop instead something like

v3 sent.

-M

Quoted 12 lines

meta/recipes-devtools/gcc/gcc-configure-runtime.inc do_install () { · line 54

Quoted 7 lines
meta/recipes-devtools/gcc/gcc-configure-runtime.inc +5 -0
+               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
+

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

#4 lore raw
In reply to Matthew McClintock
Quoted 28 lines · Matthew McClintock

This fixes the issue where gcc invokes the linker with an incorrect -L library location and gives up because it can't find libraries. It was looking in a /lib folder instead of /lib64

---
  meta/recipes-devtools/gcc/gcc-4.7.inc               |    2 +-
  meta/recipes-devtools/gcc/gcc-cross-canadian_4.7.bb |    4 ++--
  2 files changed, 3 insertions(+), 3 deletions(-)
meta/recipes-devtools/gcc/gcc-4.7.inc +1 -1
index 65153b3..c7dbc3c 100644
@@ -1,6 +1,6 @@
  require gcc-common.inc
 
-PR = "r2"
+PR = "r3"
 
  # Third digit in PV should be incremented after a minor release
  # happens from this branch on gcc e.g. currently its 4.7.1
meta/recipes-devtools/gcc/gcc-cross-canadian_4.7.bb +0 -0
index efa345f..308e6f5 100644

meta/recipes-devtools/gcc/gcc-cross-canadian_4.7.bb DEPENDS += "gmp-nativesdk mpfr-nativesdk libmpc-nativesdk elfutils-nativesdk" · line 16

Quoted 10 lines
meta/recipes-devtools/gcc/gcc-cross-canadian_4.7.bb +2 -2
@@ -9,8 +9,8 @@ DEPENDS += "gmp-nativesdk mpfr-nativesdk libmpc-nativesdk elfutils-nativesdk"
  RDEPENDS_${PN} += "mpfr-nativesdk libmpc-nativesdk elfutils-nativesdk"
 
  SYSTEMHEADERS = "/usr/include"
-SYSTEMLIBS = "/lib/"
-SYSTEMLIBS1 = "/usr/lib/"
+SYSTEMLIBS = "${target_base_libdir}/"
+SYSTEMLIBS1 = "${target_libdir}/"
 
  EXTRA_OECONF += "--disable-libunwind-exceptions --disable-libssp \
  		--disable-libgomp --disable-libmudflap \

Merged this change into OE-Core

Thanks
Sau!