Patchwork [22/28] gcc-*-runtime.inc: Fold configuration into gcc-runtime.inc

login
register
mail settings
Submitter Richard Purdie
Date Aug. 22, 2013, 11:29 a.m.
Message ID <1377171000-6469-22-git-send-email-richard.purdie@linuxfoundation.org>
Download mbox | patch
Permalink /patch/56219/
State Accepted
Commit 9cdfd55de8dbdea3d5e5ed25fbc67d1f198a069a
Headers show

Comments

Richard Purdie - Aug. 22, 2013, 11:29 a.m.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 .../recipes-devtools/gcc/gcc-configure-runtime.inc |  64 ---------
 meta/recipes-devtools/gcc/gcc-package-runtime.inc  |  80 ------------
 meta/recipes-devtools/gcc/gcc-runtime.inc          | 145 +++++++++++++++++++++
 meta/recipes-devtools/gcc/gcc-runtime_4.7.bb       |   3 +-
 meta/recipes-devtools/gcc/gcc-runtime_4.8.bb       |   3 +-
 5 files changed, 147 insertions(+), 148 deletions(-)
 delete mode 100644 meta/recipes-devtools/gcc/gcc-configure-runtime.inc
 delete mode 100644 meta/recipes-devtools/gcc/gcc-package-runtime.inc
 create mode 100644 meta/recipes-devtools/gcc/gcc-runtime.inc

Patch

diff --git a/meta/recipes-devtools/gcc/gcc-configure-runtime.inc b/meta/recipes-devtools/gcc/gcc-configure-runtime.inc
deleted file mode 100644
index 2ff8561..0000000
--- a/meta/recipes-devtools/gcc/gcc-configure-runtime.inc
+++ /dev/null
@@ -1,64 +0,0 @@ 
-require gcc-configure-common.inc
-
-CXXFLAGS := "${@oe_filter_out('-fvisibility-inlines-hidden', '${CXXFLAGS}', d)}"
-
-EXTRA_OECONF_PATHS = " \
-    --with-gxx-include-dir=${includedir}/c++/ \
-    --with-sysroot=${STAGING_DIR_TARGET} \
-    --with-build-sysroot=${STAGING_DIR_TARGET}"
-
-ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_INCDIR}"
-
-EXTRA_OECONF += "--disable-libunwind-exceptions"
-EXTRA_OECONF_append_linuxstdbase = " --enable-clocale=gnu"
-
-RUNTIMETARGET = "libssp libstdc++-v3 libgomp"
-#  ?
-# libiberty
-# libmudflap
-# libgfortran
-
-do_configure () {
-	export CXX="${CXX} -nostdinc++ -nostdlib++"
-	mtarget=`echo ${MULTIMACH_TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
-	target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
-	cp -fpPR ${STAGING_INCDIR_NATIVE}/gcc-build-internal-$mtarget/* ${B}
-	for d in libgcc ${RUNTIMETARGET}; do
-		echo "Configuring $d"
-		rm -rf ${B}/$target/$d/
-		mkdir -p ${B}/$target/$d/
-		cd ${B}/$target/$d/
-		chmod a+x ${S}/$d/configure
-		${S}/$d/configure ${CONFIGUREOPTS} ${EXTRA_OECONF}
-	done
-}
-
-do_compile () {
-	target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
-	for d in libgcc ${RUNTIMETARGET}; do
-		cd ${B}/$target/$d/
-		oe_runmake MULTIBUILDTOP=${B}/$target/$d/
-	done
-}
-
-do_install () {
-	target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
-	for d in ${RUNTIMETARGET}; do
-		cd ${B}/$target/$d/
-		oe_runmake 'DESTDIR=${D}' MULTIBUILDTOP=${B}/$target/$d/ install
-	done
-	rm -rf ${D}${infodir}/libgomp.info ${D}${infodir}/dir
-	if [ -d ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/finclude ]; then
-		rmdir --ignore-fail-on-non-empty -p ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/finclude
-	fi
-	if [ -d ${D}${infodir} ]; then
-		rmdir --ignore-fail-on-non-empty -p ${D}${infodir}
-	fi
-	chown -R root:root ${D}
-}
-
-INHIBIT_DEFAULT_DEPS = "1"
-DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++ libgcc"
-PROVIDES = "virtual/${TARGET_PREFIX}compilerlibs"
-
-BBCLASSEXTEND = "nativesdk"
diff --git a/meta/recipes-devtools/gcc/gcc-package-runtime.inc b/meta/recipes-devtools/gcc/gcc-package-runtime.inc
deleted file mode 100644
index 2e2f75a..0000000
--- a/meta/recipes-devtools/gcc/gcc-package-runtime.inc
+++ /dev/null
@@ -1,80 +0,0 @@ 
-PACKAGES = "\
-  ${PN}-dbg \
-  libstdc++ \
-  libstdc++-precompile-dev \
-  libstdc++-dev \
-  libstdc++-staticdev \
-  libg2c \
-  libg2c-dev \
-  libssp \
-  libssp-dev \
-  libssp-staticdev \
-  libgfortran \
-  libgfortran-dev \
-  libmudflap \
-  libmudflap-dev \
-  libgomp \
-  libgomp-dev \
-  libgomp-staticdev \
-"
-# The base package doesn't exist, so we clear the recommends.
-RRECOMMENDS_${PN}-dbg = ""
-
-# include python debugging scripts
-FILES_${PN}-dbg += "\
-  ${libdir}/libstdc++.so.*-gdb.py \
-  ${datadir}/gcc-${BINV}/python/libstdcxx"
-
-FILES_libg2c = "${target_libdir}/libg2c.so.*"
-FILES_libg2c-dev = "\
-  ${libdir}/libg2c.so \
-  ${libdir}/libg2c.a \
-  ${libdir}/libfrtbegin.a"
-
-FILES_libstdc++ = "${libdir}/libstdc++.so.*"
-FILES_libstdc++-dev = "\
-  ${includedir}/c++/ \
-  ${libdir}/libstdc++.so \
-  ${libdir}/libstdc++.la \
-  ${libdir}/libsupc++.la"
-FILES_libstdc++-staticdev = "\
-  ${libdir}/libstdc++.a \
-  ${libdir}/libsupc++.a"
-
-FILES_libstdc++-precompile-dev = "${includedir}/c++/${TARGET_SYS}/bits/*.gch"
-
-FILES_libssp = "${libdir}/libssp.so.*"
-FILES_libssp-dev = " \
-  ${libdir}/libssp*.so \
-  ${libdir}/libssp*_nonshared.a \
-  ${libdir}/libssp*.la \
-  ${libdir}/gcc/${TARGET_SYS}/${BINV}/include/ssp"
-FILES_libssp-staticdev = " \
-  ${libdir}/libssp*.a"
-
-FILES_libgfortran = "${libdir}/libgfortran.so.*"
-FILES_libgfortran-dev = " \
-  ${libdir}/libgfortran.a \
-  ${libdir}/libgfortran.so \
-  ${libdir}/libgfortranbegin.a"
-
-FILES_libmudflap = "${libdir}/libmudflap*.so.*"
-FILES_libmudflap-dev = "\
-  ${libdir}/libmudflap*.so \
-  ${libdir}/libmudflap*.a \
-  ${libdir}/libmudflap*.la"
-
-FILES_libgomp = "${libdir}/libgomp*${SOLIBS}"
-FILES_libgomp-dev = "\
-  ${libdir}/libgomp*${SOLIBSDEV} \
-  ${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_packagedata"
-do_package_write_deb[depends] += "virtual/${MLPREFIX}libc:do_packagedata"
-do_package_write_rpm[depends] += "virtual/${MLPREFIX}libc:do_packagedata"
diff --git a/meta/recipes-devtools/gcc/gcc-runtime.inc b/meta/recipes-devtools/gcc/gcc-runtime.inc
new file mode 100644
index 0000000..b882889
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-runtime.inc
@@ -0,0 +1,145 @@ 
+require gcc-configure-common.inc
+
+CXXFLAGS := "${@oe_filter_out('-fvisibility-inlines-hidden', '${CXXFLAGS}', d)}"
+
+EXTRA_OECONF_PATHS = " \
+    --with-gxx-include-dir=${includedir}/c++/ \
+    --with-sysroot=${STAGING_DIR_TARGET} \
+    --with-build-sysroot=${STAGING_DIR_TARGET}"
+
+ARCH_FLAGS_FOR_TARGET += "-isystem${STAGING_INCDIR}"
+
+EXTRA_OECONF += "--disable-libunwind-exceptions"
+EXTRA_OECONF_append_linuxstdbase = " --enable-clocale=gnu"
+
+RUNTIMETARGET = "libssp libstdc++-v3 libgomp"
+#  ?
+# libiberty
+# libmudflap
+# libgfortran
+
+do_configure () {
+	export CXX="${CXX} -nostdinc++ -nostdlib++"
+	mtarget=`echo ${MULTIMACH_TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
+	target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
+	cp -fpPR ${STAGING_INCDIR_NATIVE}/gcc-build-internal-$mtarget/* ${B}
+	for d in libgcc ${RUNTIMETARGET}; do
+		echo "Configuring $d"
+		rm -rf ${B}/$target/$d/
+		mkdir -p ${B}/$target/$d/
+		cd ${B}/$target/$d/
+		chmod a+x ${S}/$d/configure
+		${S}/$d/configure ${CONFIGUREOPTS} ${EXTRA_OECONF}
+	done
+}
+
+do_compile () {
+	target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
+	for d in libgcc ${RUNTIMETARGET}; do
+		cd ${B}/$target/$d/
+		oe_runmake MULTIBUILDTOP=${B}/$target/$d/
+	done
+}
+
+do_install () {
+	target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
+	for d in ${RUNTIMETARGET}; do
+		cd ${B}/$target/$d/
+		oe_runmake 'DESTDIR=${D}' MULTIBUILDTOP=${B}/$target/$d/ install
+	done
+	rm -rf ${D}${infodir}/libgomp.info ${D}${infodir}/dir
+	if [ -d ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/finclude ]; then
+		rmdir --ignore-fail-on-non-empty -p ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/finclude
+	fi
+	if [ -d ${D}${infodir} ]; then
+		rmdir --ignore-fail-on-non-empty -p ${D}${infodir}
+	fi
+	chown -R root:root ${D}
+}
+
+INHIBIT_DEFAULT_DEPS = "1"
+DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++ libgcc"
+PROVIDES = "virtual/${TARGET_PREFIX}compilerlibs"
+
+BBCLASSEXTEND = "nativesdk"
+
+PACKAGES = "\
+  ${PN}-dbg \
+  libstdc++ \
+  libstdc++-precompile-dev \
+  libstdc++-dev \
+  libstdc++-staticdev \
+  libg2c \
+  libg2c-dev \
+  libssp \
+  libssp-dev \
+  libssp-staticdev \
+  libgfortran \
+  libgfortran-dev \
+  libmudflap \
+  libmudflap-dev \
+  libgomp \
+  libgomp-dev \
+  libgomp-staticdev \
+"
+# The base package doesn't exist, so we clear the recommends.
+RRECOMMENDS_${PN}-dbg = ""
+
+# include python debugging scripts
+FILES_${PN}-dbg += "\
+  ${libdir}/libstdc++.so.*-gdb.py \
+  ${datadir}/gcc-${BINV}/python/libstdcxx"
+
+FILES_libg2c = "${target_libdir}/libg2c.so.*"
+FILES_libg2c-dev = "\
+  ${libdir}/libg2c.so \
+  ${libdir}/libg2c.a \
+  ${libdir}/libfrtbegin.a"
+
+FILES_libstdc++ = "${libdir}/libstdc++.so.*"
+FILES_libstdc++-dev = "\
+  ${includedir}/c++/ \
+  ${libdir}/libstdc++.so \
+  ${libdir}/libstdc++.la \
+  ${libdir}/libsupc++.la"
+FILES_libstdc++-staticdev = "\
+  ${libdir}/libstdc++.a \
+  ${libdir}/libsupc++.a"
+
+FILES_libstdc++-precompile-dev = "${includedir}/c++/${TARGET_SYS}/bits/*.gch"
+
+FILES_libssp = "${libdir}/libssp.so.*"
+FILES_libssp-dev = " \
+  ${libdir}/libssp*.so \
+  ${libdir}/libssp*_nonshared.a \
+  ${libdir}/libssp*.la \
+  ${libdir}/gcc/${TARGET_SYS}/${BINV}/include/ssp"
+FILES_libssp-staticdev = " \
+  ${libdir}/libssp*.a"
+
+FILES_libgfortran = "${libdir}/libgfortran.so.*"
+FILES_libgfortran-dev = " \
+  ${libdir}/libgfortran.a \
+  ${libdir}/libgfortran.so \
+  ${libdir}/libgfortranbegin.a"
+
+FILES_libmudflap = "${libdir}/libmudflap*.so.*"
+FILES_libmudflap-dev = "\
+  ${libdir}/libmudflap*.so \
+  ${libdir}/libmudflap*.a \
+  ${libdir}/libmudflap*.la"
+
+FILES_libgomp = "${libdir}/libgomp*${SOLIBS}"
+FILES_libgomp-dev = "\
+  ${libdir}/libgomp*${SOLIBSDEV} \
+  ${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_packagedata"
+do_package_write_deb[depends] += "virtual/${MLPREFIX}libc:do_packagedata"
+do_package_write_rpm[depends] += "virtual/${MLPREFIX}libc:do_packagedata"
diff --git a/meta/recipes-devtools/gcc/gcc-runtime_4.7.bb b/meta/recipes-devtools/gcc/gcc-runtime_4.7.bb
index c16d27e..497d691 100644
--- a/meta/recipes-devtools/gcc/gcc-runtime_4.7.bb
+++ b/meta/recipes-devtools/gcc/gcc-runtime_4.7.bb
@@ -1,4 +1,3 @@ 
 require recipes-devtools/gcc/gcc-${PV}.inc
-require gcc-configure-runtime.inc
-require gcc-package-runtime.inc
+require gcc-runtime.inc
 
diff --git a/meta/recipes-devtools/gcc/gcc-runtime_4.8.bb b/meta/recipes-devtools/gcc/gcc-runtime_4.8.bb
index c16d27e..497d691 100644
--- a/meta/recipes-devtools/gcc/gcc-runtime_4.8.bb
+++ b/meta/recipes-devtools/gcc/gcc-runtime_4.8.bb
@@ -1,4 +1,3 @@ 
 require recipes-devtools/gcc/gcc-${PV}.inc
-require gcc-configure-runtime.inc
-require gcc-package-runtime.inc
+require gcc-runtime.inc