<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[HyperForum — no libgcc & friends in arm-unknown-linux-gnueabi-gcc package]]></title>
		<link>https://forums.hyperbola.info/viewtopic.php?id=219</link>
		<atom:link href="https://forums.hyperbola.info/extern.php?action=feed&amp;tid=219&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in no libgcc & friends in arm-unknown-linux-gnueabi-gcc package.]]></description>
		<lastBuildDate>Mon, 16 Sep 2019 15:35:24 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: no libgcc & friends in arm-unknown-linux-gnueabi-gcc package]]></title>
			<link>https://forums.hyperbola.info/viewtopic.php?pid=1098#p1098</link>
			<description><![CDATA[<p>I had the PKGBUILDs for the cross-toolchain ready for some time now. Tried asking pekman about details of contributing PKGBUILDs as directed <a href="https://forums.hyperbola.info/viewtopic.php?id=176">here</a>, but received no response. Perhaps I found wrong email address or something?</p><p>Anyways, I decided to just push the PKGBUILDs to <a href="https://libregit.org/koszko/PKGBUILDs">my git repo</a>. I have only tested the toolchain by compiling a hello-world arm binary and running it through qemu. I might have also missed some files when adding everything to git, so please tell me if something doesn&#039;t work.</p><p>I made things a bit different (and, I believe, cleaner) from what they usually look like in arch - I created packages &#039;gcc-source&#039;, &#039;linux-libre-lts-source&#039;, etc. and made them makedepends of packages like &#039;arm-linux-gnueabi-gcc&#039;, &#039;arm-linux-gnueabi-linux-libre-lts-api-headers&#039;, etc. That way makepkg won&#039;t be trying to download sources multiple times when, e.g., building a bunch of gcc cross-compilers targeting different arches... It could probably be improved even further to avoid code repetition inside PKGBUILDs of the same cross-tool with different targets... Anyways, I believe my current solution not to be against the packaging guidelines. I sth&#039;s wrong, please tell me and I will try to fix it.</p><p>To Hyperbola devs: please, consider using my PKGBUILDs to improve cross-compiler support in Hyperbola. As of now, Arch family is terribly behind Debian in this field <img src="https://forums.hyperbola.info/img/smilies/hmm.png" width="15" height="15" alt="hmm" /></p><p>To Aether: if you want an armhf cross-compiler, you could start by adding:&nbsp; &nbsp; &nbsp; </p><div class="codebox"><pre><code>--with-float=hard \
--with-fpu=vfp</code></pre></div><p>to gcc&#039;s configure in my PKGBUILDs (gcc gets configure&#039;d 2 times: first in the build() of arm-linux-gnueabi-glibc (as pass1 compiler) and later in build() of arm-linux-gnueabi-gcc (as a full compiler). It would be interesting to get this work <img src="https://forums.hyperbola.info/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></description>
			<author><![CDATA[null@example.com (koszko)]]></author>
			<pubDate>Mon, 16 Sep 2019 15:35:24 +0000</pubDate>
			<guid>https://forums.hyperbola.info/viewtopic.php?pid=1098#p1098</guid>
		</item>
		<item>
			<title><![CDATA[Re: no libgcc & friends in arm-unknown-linux-gnueabi-gcc package]]></title>
			<link>https://forums.hyperbola.info/viewtopic.php?pid=1043#p1043</link>
			<description><![CDATA[<p>This thread reminds me gnueabihf is still missing from repo. It would be great to add it, to be able to cross compile for beaglebone for example.</p>]]></description>
			<author><![CDATA[null@example.com (aether)]]></author>
			<pubDate>Wed, 28 Aug 2019 17:47:02 +0000</pubDate>
			<guid>https://forums.hyperbola.info/viewtopic.php?pid=1043#p1043</guid>
		</item>
		<item>
			<title><![CDATA[Re: no libgcc & friends in arm-unknown-linux-gnueabi-gcc package]]></title>
			<link>https://forums.hyperbola.info/viewtopic.php?pid=1042#p1042</link>
			<description><![CDATA[<p>After quite a lot of fighting I seem to have produced working (though maybe missing some detailing like putting right stuff in conflicts arrays) PKGBUILDs using debian patches for: binutils-source, glibc-source, gcc-source, linux-libre-lts-source, arm-linux-gnueabi-linux-libre-lts-api-headers, arm-linux-gnueabi-binutils and arm-linux-gnueabi-glibc (inside which a temporary pass1 gcc is built).</p><p>This means right now I am only missing arm-linux-gnueabi-gcc PKGBUILD for full arm toolchain (provided those made so far are correct).</p><p>Once full arm toolchain builds, modifying the PKGBUILDs to target other arches should be trivial <img src="https://forums.hyperbola.info/img/smilies/smile.png" width="15" height="15" alt="smile" /></p><p>Once I finish this, I am going to share the PKGBUILDs with every1. If You would like to see the PKGBUILDs for unfinished toolchain as they are right now, let me know and I will put them on some git repo.</p>]]></description>
			<author><![CDATA[null@example.com (koszko)]]></author>
			<pubDate>Wed, 28 Aug 2019 17:17:50 +0000</pubDate>
			<guid>https://forums.hyperbola.info/viewtopic.php?pid=1042#p1042</guid>
		</item>
		<item>
			<title><![CDATA[Re: no libgcc & friends in arm-unknown-linux-gnueabi-gcc package]]></title>
			<link>https://forums.hyperbola.info/viewtopic.php?pid=1029#p1029</link>
			<description><![CDATA[<p>Duplicate posts got sent accidently because of forum name resolution problems. Some1 please delete these 2.</p>]]></description>
			<author><![CDATA[null@example.com (koszko)]]></author>
			<pubDate>Mon, 12 Aug 2019 17:04:15 +0000</pubDate>
			<guid>https://forums.hyperbola.info/viewtopic.php?pid=1029#p1029</guid>
		</item>
		<item>
			<title><![CDATA[Re: no libgcc & friends in arm-unknown-linux-gnueabi-gcc package]]></title>
			<link>https://forums.hyperbola.info/viewtopic.php?pid=1028#p1028</link>
			<description><![CDATA[<p>Duplicate posts got sent accidently because of forum name resolution problems. Some1 please delete these 2.</p>]]></description>
			<author><![CDATA[null@example.com (koszko)]]></author>
			<pubDate>Mon, 12 Aug 2019 17:02:49 +0000</pubDate>
			<guid>https://forums.hyperbola.info/viewtopic.php?pid=1028#p1028</guid>
		</item>
		<item>
			<title><![CDATA[Re: no libgcc & friends in arm-unknown-linux-gnueabi-gcc package]]></title>
			<link>https://forums.hyperbola.info/viewtopic.php?pid=1027#p1027</link>
			<description><![CDATA[<div class="quotebox"><cite>zapper wrote:</cite><blockquote><p>I think if I reply here maybe someone will help you. So here&#039;s hoping that works.</p></blockquote></div><p>Thanks. I think I might be able to actually solve the issue on my own. When starting this topic, I was already suspecting what the problem is.</p><p>In case some less-technical ppl come across this - here&#039;s the problem:</p><p>Gcc interacts closely with the C library (not just the libc, but also libpthread and many others bundled with it). Aside from explicit calls to libc functions in C programs, compiler often has to generate calls on its own. But to be able to do this, the compiler needs a lot of information about libc &amp; friends. It gets it from their header files and shared libs (and ar archives?). Unfortunately, all those must be available when gcc is being built. It causes a bit of a problem when building a cross-compiler. Development libraries for architecture X are a build dependency (often called make dependency in Arch world) of a cross-gcc targeting X. But to build these libraries (libc &amp; friends) for architecture X, you need an already working cross-compiler. So we have a circular dependency (chicken and egg problem): cross-gcc requires libraries, that require cross-gcc, and so on.</p><p>The solution to boostrapping this is to first build a minimal cross-gcc (called &#039;base&#039; or &#039;pass1&#039;), that has no information about c library for the target architecture and is unable to build programs against it. It is, however, able to build the libc (&amp; friends), which, when built, can be used for building the actual fully-working cross-compiler (called &#039;pass2&#039;) with all extra features and languages enabled.</p><p>Different tutorials/wikias/scripts give a bit different order of cross-toolchain bootstrapping, but it&#039;s something like:<br />binutils → gcc (pass1) → linux api headers and glibc → gcc (pass2)</p><p>Arm development libraries package doesn&#039;t exist in Hyperbola/Arch. The <a href="https://git.hyperbola.info:50100/packages/core.git/tree/arm-unknown-linux-gnueabi-gcc/PKGBUILD">arm-unknown-linux-gnueabi-gcc package in Hyperbola </a> is built without these libs (as would a minimal pass1 compiler be), but has &quot;the features&quot; enabled in arguments to configure script (as would a pass2 compiler). It also doesn&#039;t depend on its respective arm binutils (it does depend on standard binutils, which won&#039;t do). All summed up, this build of gcc can&#039;t be used for cross-compiling arm glibc. This topic shows what happens.</p><p>Gcc PKGBUILDs in the AUR/Arch seem to also have similar problem(s). <a href="https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=arm-linux-gnueabi-gcc">arm-linux-gnueabi-gcc</a> is only a pass1 compiler, no PKGBUILD for later steps (maintainer is aware of it). <a href="https://aur.archlinux.org/packages/arm-linux-gnueabihf-gcc/">arm-linux-gnueabihf-gcc</a> has a bootstrap chain with 3 builds of gcc instead of 2. <a href="https://www.archlinux.org/packages/community/x86_64/arm-none-eabi-gcc/">arm-none-eabi-gcc</a> has a circular dependency with arm-none-eabi-newlib. It works, but cannot be easily bootstrapped. <a href="https://aur.archlinux.org/packages/mingw-w64-gcc/">mingw-w64-gcc</a> seems ok. Its pass1 gcc package has a -base suffix. It&#039;s a bit different, however, because it targets Microbugs&#039; Windows instead of a GNU/Linux platform (in fact arm-none-eabi mentioned above isn&#039;t a GNU/Linux target either).&nbsp; </p><p>It seems that debian does it a better way. It has the <a href="https://packages.debian.org/source/sid/cross-toolchain-base">cross-toolchain-base</a> source package, from which target platform libraries and headers packages are built. No separate pass1 gcc package exists - looks like it gets built in a temporary directory as part of the cross-libc build. Sources of gcc, binutils, etc. are provided as separate packages, so packaging tools don&#039;t attempt to download them every time.</p><p>I&#039;m going to open an issue about that in a few hours.</p><p>EDIT: I <a href="https://issues.hyperbola.info/index.php?do=details&amp;task_id=1400">opened an issue</a>. It has all the fields (severity, category, etc.) set wrong, because when I first clicked to submit, I got an error (regarding too long tags field for an sql datatype), had to refill the form and forgot to set the fields again... Now I can&#039;t edit it ;_;<br />EDIT2: Turns out when I first got the error, the issue actually got uploaded, just without tags. <a href="https://issues.hyperbola.info/index.php?do=details&amp;task_id=1399">https://issues.hyperbola.info/index.php … sk_id=1399</a>. I can&#039;t edit/delete this one either <img src="https://forums.hyperbola.info/img/smilies/sad.png" width="15" height="15" alt="sad" /> Sorry for that. Some1 please delete the duplicate.</p>]]></description>
			<author><![CDATA[null@example.com (koszko)]]></author>
			<pubDate>Mon, 12 Aug 2019 17:01:04 +0000</pubDate>
			<guid>https://forums.hyperbola.info/viewtopic.php?pid=1027#p1027</guid>
		</item>
		<item>
			<title><![CDATA[Re: no libgcc & friends in arm-unknown-linux-gnueabi-gcc package]]></title>
			<link>https://forums.hyperbola.info/viewtopic.php?pid=1021#p1021</link>
			<description><![CDATA[<div class="quotebox"><cite>koszko wrote:</cite><blockquote><p>Hi, I&#039;ve been trying to cross-compile glibc for arm and failed because of missing libgcc. This is the linker error thrown:<br /></p><div class="codebox"><pre><code>/usr/arm-unknown-linux-gnueabi/bin/ld: cannot find -lgcc</code></pre></div><p>I&#039;m sure it&#039;s not just the matter of configuring library paths. Arm version of libgcc is really missing.<br />I have both arm-unknown-linux-gnueabi-gcc-6.3.0-2 and arm-unknown-linux-gnueabi-binutils-2.28.0-2 installed (versions from Hyperbola stable repo). None of them actually contains libgcc.a or libgcc_s.so.</p><p>Any suggestions? <img src="https://forums.hyperbola.info/img/smilies/smile.png" width="15" height="15" alt="smile" /></p></blockquote></div><p>I think if I reply here maybe someone will help you. So here&#039;s hoping that works.</p>]]></description>
			<author><![CDATA[null@example.com (zapper)]]></author>
			<pubDate>Sat, 10 Aug 2019 03:27:02 +0000</pubDate>
			<guid>https://forums.hyperbola.info/viewtopic.php?pid=1021#p1021</guid>
		</item>
		<item>
			<title><![CDATA[no libgcc & friends in arm-unknown-linux-gnueabi-gcc package]]></title>
			<link>https://forums.hyperbola.info/viewtopic.php?pid=1020#p1020</link>
			<description><![CDATA[<p>Hi, I&#039;ve been trying to cross-compile glibc for arm and failed because of missing libgcc. This is the linker error thrown:<br /></p><div class="codebox"><pre><code>/usr/arm-unknown-linux-gnueabi/bin/ld: cannot find -lgcc</code></pre></div><p>I&#039;m sure it&#039;s not just the matter of configuring library paths. Arm version of libgcc is really missing.<br />I have both arm-unknown-linux-gnueabi-gcc-6.3.0-2 and arm-unknown-linux-gnueabi-binutils-2.28.0-2 installed (versions from Hyperbola stable repo). None of them actually contains libgcc.a or libgcc_s.so.</p><p>Any suggestions? <img src="https://forums.hyperbola.info/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></description>
			<author><![CDATA[null@example.com (koszko)]]></author>
			<pubDate>Wed, 07 Aug 2019 15:26:31 +0000</pubDate>
			<guid>https://forums.hyperbola.info/viewtopic.php?pid=1020#p1020</guid>
		</item>
	</channel>
</rss>
