diff options
author | Dongkyun Son <dongkyun.s@samsung.com> | 2016-01-17 22:23:06 -0800 |
---|---|---|
committer | Gerrit Code Review <gerrit@review.vlan103.tizen.org> | 2016-01-17 22:23:06 -0800 |
commit | fc9a147bf8fcea54236bf3c338d8199863042e99 (patch) | |
tree | db108677f336c37cbb213cec863737a46e7ece7b | |
parent | 156f9227550c39c3d21e4029525c32aa56398b6d (diff) | |
parent | 080b24cd93e01d07e77e1bb7d67b048516be069c (diff) | |
download | linaro-gcc-fc9a147bf8fcea54236bf3c338d8199863042e99.tar.gz linaro-gcc-fc9a147bf8fcea54236bf3c338d8199863042e99.tar.bz2 linaro-gcc-fc9a147bf8fcea54236bf3c338d8199863042e99.zip |
Merge "packaging: Dependency packages build integration" into tizen_base
-rw-r--r-- | packaging/gcc-aarch64.spec | 21 | ||||
-rw-r--r-- | packaging/gcc-armv7l.spec | 21 | ||||
-rw-r--r-- | packaging/gcc.spec | 21 |
3 files changed, 63 insertions, 0 deletions
diff --git a/packaging/gcc-aarch64.spec b/packaging/gcc-aarch64.spec index fa1044e1715..9a754bfebe0 100644 --- a/packaging/gcc-aarch64.spec +++ b/packaging/gcc-aarch64.spec @@ -67,6 +67,7 @@ BuildRequires: zlib-devel BuildRequires: glibc-devel-32bit %endif BuildRequires: perl +BuildRequires: sudo-rpm %{?cross:BuildRequires: binutils-%{cross}} # here we use %%if because OBS spec parser cannot expand # %%{?macro:...} correctly @@ -618,6 +619,26 @@ A foreign function interface is the popular name for the interface that allows c %setup -q -n gcc-%{version} %build +################# +# This section is done due to license issues with LGPLv3 version of GNU GMP library. +# To ensure there is no way to set up LGPLv3 GMP to device and to link any Tizen application with it we build all dependencies right in GCC buildroot. +# The right way is to manage dependencies with OBS but we are forced to remove packages and make external usage impossible they will be built here. +# Using rpmbuild lets us to keep dependencies in git repositories and debug them in other OBS projects. +# +# Prepare dependencies +RPMBUILD_CMDLINE=$(cat /proc/$PPID/cmdline | tr '\000' ' ' | sed -e 's|^rpmbuild||;s|[[:space:]]/.*rpmbuild/.*$||;s/--define[[:space:]]\+\([^[:space:]]\+\)[[:space:]]\+\([^[:space:]]\+\)/--define "\1 \2"/g') + +pushd ${HOME} +for pkg in gmp mpfr mpc isl cloog-isl; do + sh -c "rpmbuild ${RPMBUILD_CMDLINE} /home/abuild/rpmbuild/SOURCES/${pkg}.spec" + RPM_NAME=$(find '/home/abuild/rpmbuild/RPMS' -name "${pkg}-*.rpm" -not -name '*.src.rpm' -not -name '*debug*') + sudo rpm -i ${RPM_NAME} + find '/home/abuild/rpmbuild/' -name "${pkg}*.rpm" -delete +done +popd +# End of dependencies preparation +################# + rm -rf obj mkdir obj cd obj diff --git a/packaging/gcc-armv7l.spec b/packaging/gcc-armv7l.spec index c85c4789fb7..4763720db42 100644 --- a/packaging/gcc-armv7l.spec +++ b/packaging/gcc-armv7l.spec @@ -67,6 +67,7 @@ BuildRequires: zlib-devel BuildRequires: glibc-devel-32bit %endif BuildRequires: perl +BuildRequires: sudo-rpm %{?cross:BuildRequires: binutils-%{cross}} # here we use %%if because OBS spec parser cannot expand # %%{?macro:...} correctly @@ -618,6 +619,26 @@ A foreign function interface is the popular name for the interface that allows c %setup -q -n gcc-%{version} %build +################# +# This section is done due to license issues with LGPLv3 version of GNU GMP library. +# To ensure there is no way to set up LGPLv3 GMP to device and to link any Tizen application with it we build all dependencies right in GCC buildroot. +# The right way is to manage dependencies with OBS but we are forced to remove packages and make external usage impossible they will be built here. +# Using rpmbuild lets us to keep dependencies in git repositories and debug them in other OBS projects. +# +# Prepare dependencies +RPMBUILD_CMDLINE=$(cat /proc/$PPID/cmdline | tr '\000' ' ' | sed -e 's|^rpmbuild||;s|[[:space:]]/.*rpmbuild/.*$||;s/--define[[:space:]]\+\([^[:space:]]\+\)[[:space:]]\+\([^[:space:]]\+\)/--define "\1 \2"/g') + +pushd ${HOME} +for pkg in gmp mpfr mpc isl cloog-isl; do + sh -c "rpmbuild ${RPMBUILD_CMDLINE} /home/abuild/rpmbuild/SOURCES/${pkg}.spec" + RPM_NAME=$(find '/home/abuild/rpmbuild/RPMS' -name "${pkg}-*.rpm" -not -name '*.src.rpm' -not -name '*debug*') + sudo rpm -i ${RPM_NAME} + find '/home/abuild/rpmbuild/' -name "${pkg}*.rpm" -delete +done +popd +# End of dependencies preparation +################# + rm -rf obj mkdir obj cd obj diff --git a/packaging/gcc.spec b/packaging/gcc.spec index 1088e567d6c..d067a3cdb28 100644 --- a/packaging/gcc.spec +++ b/packaging/gcc.spec @@ -64,6 +64,7 @@ BuildRequires: zlib-devel BuildRequires: glibc-devel-32bit %endif BuildRequires: perl +BuildRequires: sudo-rpm %{?cross:BuildRequires: binutils-%{cross}} # here we use %%if because OBS spec parser cannot expand # %%{?macro:...} correctly @@ -615,6 +616,26 @@ A foreign function interface is the popular name for the interface that allows c %setup -q -n gcc-%{version} %build +################# +# This section is done due to license issues with LGPLv3 version of GNU GMP library. +# To ensure there is no way to set up LGPLv3 GMP to device and to link any Tizen application with it we build all dependencies right in GCC buildroot. +# The right way is to manage dependencies with OBS but we are forced to remove packages and make external usage impossible they will be built here. +# Using rpmbuild lets us to keep dependencies in git repositories and debug them in other OBS projects. +# +# Prepare dependencies +RPMBUILD_CMDLINE=$(cat /proc/$PPID/cmdline | tr '\000' ' ' | sed -e 's|^rpmbuild||;s|[[:space:]]/.*rpmbuild/.*$||;s/--define[[:space:]]\+\([^[:space:]]\+\)[[:space:]]\+\([^[:space:]]\+\)/--define "\1 \2"/g') + +pushd ${HOME} +for pkg in gmp mpfr mpc isl cloog-isl; do + sh -c "rpmbuild ${RPMBUILD_CMDLINE} /home/abuild/rpmbuild/SOURCES/${pkg}.spec" + RPM_NAME=$(find '/home/abuild/rpmbuild/RPMS' -name "${pkg}-*.rpm" -not -name '*.src.rpm' -not -name '*debug*') + sudo rpm -i ${RPM_NAME} + find '/home/abuild/rpmbuild/' -name "${pkg}*.rpm" -delete +done +popd +# End of dependencies preparation +################# + rm -rf obj mkdir obj cd obj |