Difference between revisions of "LEAP ILP 32"

From CDOT Wiki
Jump to: navigation, search
Line 7: Line 7:
 
* I downloaded the source rpm from that build and manually downloaded and installed required dependencies from the same place.
 
* I downloaded the source rpm from that build and manually downloaded and installed required dependencies from the same place.
 
* I run "rpm -i gcc-4.9.2-6.bb4.src.rpm" to install it on AArch64 builder.
 
* I run "rpm -i gcc-4.9.2-6.bb4.src.rpm" to install it on AArch64 builder.
* I went in the "~/rpmbuild/SPEC" directory, and run command "rpmbuild -bp gcc.spec" to get the prep stage on the rpm.
+
* Due to internal RPM macros, I had to change one of them in "~/rpmbuild/SPECS/gcc.spec". Information on the default macros can be found here: https://fedoraproject.org/wiki/Packaging:RPMMacros. To fix the installation path, I added this line as the very first line of the spec file:  
* I created a git repository (https://github.com/ArtemL/GCC), copied "~/rpmbuild/BUILD/gcc-4.9.2-20150212/" directory into it, and pushed it.
 
* I changed "~/git/GCC/gcc-4.9.2-20150212/configure" in the next ways:
 
<pre>@@ -47,7 +47,7 @@ target=aarch64-unknown-linux-gnu
 
  
program_transform_name = s,y,y,
+
<pre>%define _prefix /opt/ilp32/usr</pre>
 
 
-prefix = /usr/local
 
+prefix = /opt/ilp32/usr/local
 
exec_prefix = ${prefix}
 
 
 
srcdir = .
 
</pre>
 
* I committed the changes and run "git format-patch master --stdout > gcc49-makefile.patch" command to get the patch for my changes.
 
* I copied "gcc49-makefile.patch" to "~/rpmbuild/SOURCES/"
 
Due to internal RPM macros, I had to alter many lines in "~/rpmbuild/SPECS/gcc.spec", since the default values were overwriting my patch.
 
Information on the default macros can be found here: https://fedoraproject.org/wiki/Packaging:RPMMacros .
 
Here is how I changed the spec file:
 
 
* I run "export RPM_PACKAGER="Artem Luzyanin <artem.luzyanin@senecacollege.ca>""
 
* I run "export RPM_PACKAGER="Artem Luzyanin <artem.luzyanin@senecacollege.ca>""
* I run "rpmdev-bumpspec -c "This patch is to create ilp32-capable gcc in a separate tree."" command to add the changes with comments to the spec file.
+
* I run "rpmdev-bumpspec -c "Changed spec file to create ilp32-capable gcc in a separate tree."" command to add the changes with comments to the spec file.
 
* I run "rpmbuild -ba --nocheck gcc.spec" command to get the rpms.  
 
* I run "rpmbuild -ba --nocheck gcc.spec" command to get the rpms.  
I run "rpm -qlp gcc-4.9.2-6.bb1.1.aarch64.rpm" command to check that all gcc files will be installed in the correct place.
+
I run "rpm -qlp gcc-4.9.2-6.bb1.1.aarch64.rpm gcc.spec" command to check that all gcc files will be installed in the correct place (under /opt/ilp32/).
  
 
GLIBC:
 
GLIBC:

Revision as of 19:26, 29 July 2015

This page describes the process of creating ILP32 support for LEAP.

GCC:

%define _prefix /opt/ilp32/usr
  • I run "export RPM_PACKAGER="Artem Luzyanin <artem.luzyanin@senecacollege.ca>""
  • I run "rpmdev-bumpspec -c "Changed spec file to create ilp32-capable gcc in a separate tree."" command to add the changes with comments to the spec file.
  • I run "rpmbuild -ba --nocheck gcc.spec" command to get the rpms.

I run "rpm -qlp gcc-4.9.2-6.bb1.1.aarch64.rpm gcc.spec" command to check that all gcc files will be installed in the correct place (under /opt/ilp32/).

GLIBC:

  • I downloaded glibc-2.17 source rpm. I got mine from http://blue/kojifiles/packages/glibc/2.17/78.bb4/src/glibc-2.17-78.bb4.src.rpm.
  • I downloaded and installed required dependencies from the same place.
  • I run "rpm -i glibc-2.17-78.bb4.src.rpm" to install it on AArch64 builder.
  • I went in the "~/rpmbuild/SPEC" directory, and run command "rpmbuild -bp glibc.spec" to get the prep stage on the rpm.
  • I created a git repository, and pushed the content of "~/rpmbuild/BUILD/glibc{some random numbers}" directory to it to get the original information in it.
  • I went in the "~/rpmbuild/BUILD/glibc{some random numbers}" directory.

I changed "configure" file in the next ways: I run "./configure" command. I changed "Makefile" file in the next ways:

  • I run "make" command, then waited for the make for a long period of time for it to be complete (around 7 hours).
  • I committed the changes and run "git diff --patience master glibc21-leap-ilp-32 | filterdiff --format=context > ../glibc21-leap-ilp-32.patch" command to get the patch for my changes.
  • I run "export RPM_PACKAGER="Artem Luzyanin <artem.luzyanin@senecacollege.ca>""
  • I run "rpmdev-bumpspec -c "This patch is to create ilp32-compiler libraries of glibc in a separate tree."" command to add the changes with comments to the spec file.

I changed "~/rpmbuild/SPEC/glibc.spec" file in the next way: I run "rpmbuild -bs glibc.spec" command to get the source rpm.