I was finally to compile, uh, something!
I copied manually the source folder contents to ./SOURCES
. I then enter the build shell and tried using rpmbuild directly.
mb2 --target SailfishOS-4.5.0.18-i486 build-shell
rpmbuild -ba --define '_srcdefattr (-,root,root)' --define "_topdir `pwd`" --target=i486-meego-linux --nosignature ./SOURCES/cross-[arch]-gcc.spec
I got a list of packages missing, and I tried installing them using mb2 --target SailfishOS-4.5.0.18-i486 build-shell --maintain
→ zypper install ...
These are the packages that are not found:
For armv7hl:
- cross-armv7hl-glibc
- cross-armv7hl-glibc-devel
- cross-armv7hl-glibc-headers
- cross-armv7hl-kernel-headers
For aarch64:
- cross-aarch64-glibc
- cross-aarch64-glibc-devel
- cross-aarch64-glibc-headers
- cross-aarch64-kernel-headers
For i486:
- No missing packages
Fir i486, it builds and produces RPMS/i586/cross-i486-gcc-8.3.0-7.i586.rpm
(with debugsource and debuginfo packages). I’m not sure if this is the complete list of packages
Additionally, I can build the “vanilla” gcc.spec
and it produces a whole lot of packages (this is not useful build, but I list if for completeness):
$ mb2 --target SailfishOS-4.5.0.18-aarch64 build-shell
$ rpmbuild -ba --define '_srcdefattr (-,root,root)' --define "_topdir `pwd`" --nosignature ./SOURCES/gcc.spec
$ ls RPMS/aarch64/ -1
cpp-8.3.0-7.aarch64.rpm
gcc-8.3.0-7.aarch64.rpm
gcc-c++-8.3.0-7.aarch64.rpm
gcc-debuginfo-8.3.0-7.aarch64.rpm
gcc-debugsource-8.3.0-7.aarch64.rpm
gcc-doc-8.3.0-7.aarch64.rpm
gcc-plugin-devel-8.3.0-7.aarch64.rpm
libasan-8.3.0-7.aarch64.rpm
libasan-static-8.3.0-7.aarch64.rpm
libatomic-8.3.0-7.aarch64.rpm
libatomic-static-8.3.0-7.aarch64.rpm
libgcc-8.3.0-7.aarch64.rpm
libgomp-8.3.0-7.aarch64.rpm
libitm-8.3.0-7.aarch64.rpm
libitm-devel-8.3.0-7.aarch64.rpm
libitm-static-8.3.0-7.aarch64.rpm
liblsan-8.3.0-7.aarch64.rpm
liblsan-static-8.3.0-7.aarch64.rpm
libstdc++-8.3.0-7.aarch64.rpm
libstdc++-devel-8.3.0-7.aarch64.rpm
libstdc++-static-8.3.0-7.aarch64.rpm
libubsan-8.3.0-7.aarch64.rpm
libubsan-static-8.3.0-7.aarch64.rpm
And at the time of writing, the OBS build resulted in the same list of files – I was expecting it to produce the cross-*
packages…
Edit: Stray /gcc.spec
moved inside the code block