<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.sharpfin.org/index.php?action=history&amp;feed=atom&amp;title=Crosscompiling</id>
	<title>Crosscompiling - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.sharpfin.org/index.php?action=history&amp;feed=atom&amp;title=Crosscompiling"/>
	<link rel="alternate" type="text/html" href="https://www.sharpfin.org/index.php?title=Crosscompiling&amp;action=history"/>
	<updated>2026-05-04T09:00:34Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://www.sharpfin.org/index.php?title=Crosscompiling&amp;diff=220&amp;oldid=prev</id>
		<title>Philipp at 13:05, 8 June 2025</title>
		<link rel="alternate" type="text/html" href="https://www.sharpfin.org/index.php?title=Crosscompiling&amp;diff=220&amp;oldid=prev"/>
		<updated>2025-06-08T13:05:58Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 15:05, 8 June 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l8&quot;&gt;Line 8:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 8:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;In a working directory, create a file called helloworld.c&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;In a working directory, create a file called helloworld.c&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    &amp;lt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;syntaxhighlight&lt;/del&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    &amp;lt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;pre&lt;/ins&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    #include &amp;lt;stdio.h&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    #include &amp;lt;stdio.h&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    main() {&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    main() {&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l14&quot;&gt;Line 14:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 14:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;quot;);&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;quot;);&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    }&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    }&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    &amp;lt;/&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;syntaxhighlight&lt;/del&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    &amp;lt;/&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;pre&lt;/ins&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Now to build the program.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Now to build the program.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key hefvobmy_Sql579266_1:diff:1.41:old-48:rev-220:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Philipp</name></author>
	</entry>
	<entry>
		<id>https://www.sharpfin.org/index.php?title=Crosscompiling&amp;diff=48&amp;oldid=prev</id>
		<title>Philipp: Created page with &quot;== Simple &quot;Hello World&quot; ==  Assuming you have built the Toolchain, made the changes to your environment including PATH and carried out the instructions Enabling Login, a simple &quot;Hello World!&quot; program is easy to build.  For the sake of this example we&#039;ll set up an alias to the crosscompiler.     alias cc=arm-9tdmi-linux-gnu-gcc  In a working directory, create a file called helloworld.c    &lt;syntaxhighlight&gt;    #include &lt;stdio.h&gt;    main() {         printf(&quot;Hello wo...&quot;</title>
		<link rel="alternate" type="text/html" href="https://www.sharpfin.org/index.php?title=Crosscompiling&amp;diff=48&amp;oldid=prev"/>
		<updated>2025-06-08T09:46:28Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;== Simple &amp;quot;Hello World&amp;quot; ==  Assuming you have built the &lt;a href=&quot;/index.php?title=Toolchain&quot; title=&quot;Toolchain&quot;&gt;Toolchain&lt;/a&gt;, made the changes to your environment including PATH and carried out the instructions &lt;a href=&quot;/index.php?title=Enabling_Login&quot; title=&quot;Enabling Login&quot;&gt;Enabling Login&lt;/a&gt;, a simple &amp;quot;Hello World!&amp;quot; program is easy to build.  For the sake of this example we&amp;#039;ll set up an alias to the crosscompiler.     alias cc=arm-9tdmi-linux-gnu-gcc  In a working directory, create a file called helloworld.c    &amp;lt;syntaxhighlight&amp;gt;    #include &amp;lt;stdio.h&amp;gt;    main() {         printf(&amp;quot;Hello wo...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Simple &amp;quot;Hello World&amp;quot; ==&lt;br /&gt;
&lt;br /&gt;
Assuming you have built the [[Toolchain]], made the changes to your environment including PATH and carried out the instructions [[Enabling Login]], a simple &amp;quot;Hello World!&amp;quot; program is easy to build.&lt;br /&gt;
&lt;br /&gt;
For the sake of this example we&amp;#039;ll set up an alias to the crosscompiler.&lt;br /&gt;
&lt;br /&gt;
   alias cc=arm-9tdmi-linux-gnu-gcc&lt;br /&gt;
&lt;br /&gt;
In a working directory, create a file called helloworld.c&lt;br /&gt;
   &amp;lt;syntaxhighlight&amp;gt;&lt;br /&gt;
   #include &amp;lt;stdio.h&amp;gt;&lt;br /&gt;
   main() {&lt;br /&gt;
        printf(&amp;quot;Hello world&lt;br /&gt;
&amp;quot;);&lt;br /&gt;
   }&lt;br /&gt;
   &amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now to build the program.&lt;br /&gt;
&lt;br /&gt;
   cc -o helloworld helloworld.c&lt;br /&gt;
&lt;br /&gt;
You should now have an executable program called &amp;quot;helloworld&amp;quot; of about 7000 bytes. Move this onto your radio and execute it from the command line. You should see &amp;quot;Hello world&amp;quot; and the prompt.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Please note&amp;#039;&amp;#039;&amp;#039; We haven&amp;#039;t used the radio specific library here so your text will not appear on the radio&amp;#039;s display, just the telnet session.&lt;br /&gt;
&lt;br /&gt;
At this point you&amp;#039;ve proved the crosscompiling tools are working fine.&lt;br /&gt;
&lt;br /&gt;
{{NoteBox|&amp;lt;b&amp;gt;Hint:&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;if you get the error &amp;#039;crt*.o: No such file: No such file or directory&amp;#039; while compiling the hello world program, you could try to solve this problem by issuing following commands:&lt;br /&gt;
   # strace -f -o foo.log arm-9tdmi-linux-gnu-gcc helloworld.c&lt;br /&gt;
the log file will contain the information where the compiler is looking for the missing file(s).&lt;br /&gt;
Then you can add some symbolic links if you find the file(s) elsewhere. E.g. this command could solve the problem w/ missing crt1.o:&lt;br /&gt;
   # for i in `ls $RESULT_TOP/build/arm-9tdmi-linux-gnu/gcc-4.1.0-glibc-2.3.2/build-glibc/csu/crt*.o`;do ln -s &lt;br /&gt;
   #   $i $RESULT_TOP/build/arm-9tdmi-linux-gnu/gcc-4.1.0-glibc-2.3.2/gcc-core-prefix/lib/gcc-lib/arm-9tdmi-linux-gnu/3.3.6/${i##*/};done&lt;br /&gt;
but you may need to adapt it slightly}}&lt;br /&gt;
&lt;br /&gt;
== Building packages ==&lt;br /&gt;
&lt;br /&gt;
Crosscompiling is easy these days, even with most autoconf/automake configurable packages. The following works for me&lt;br /&gt;
&lt;br /&gt;
* Create a directory where you want to put the fresh compiled libraries, header files and binaries. For example &lt;br /&gt;
&lt;br /&gt;
  # mkdir -p /tmp/reciva/root&lt;br /&gt;
&lt;br /&gt;
* Make sure the toolchains &amp;#039;bin&amp;#039; dir is in your path (as described in [[Toolchain]])&lt;br /&gt;
&lt;br /&gt;
* Configure the package, using the cross compiler and optional previously installed libraries and headers&lt;br /&gt;
&lt;br /&gt;
  # export LDFLAGS=&amp;quot;-L/tmp/reciva/root/lib&amp;quot; &lt;br /&gt;
  # export CPPFLAGS=&amp;quot;-I/tmp-reciva/root/include&amp;quot; &lt;br /&gt;
  # ./configure --prefix=/tmp/reciva/root/ --host=arm-softfloat-linux-gnu &amp;quot;$@&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* If all went well, configure should finish without problems, and you can now build and install the software&lt;br /&gt;
&lt;br /&gt;
  # make&lt;br /&gt;
  # make install&lt;/div&gt;</summary>
		<author><name>Philipp</name></author>
	</entry>
</feed>