View Single Post
Posts: 14 | Thanked: 36 times | Joined on Dec 2009 @ Adelaide, Australia
#5
Originally Posted by u7knv9h View Post
hello, i'm pretty new to maemo and cross-compiling for it, and i can't figure out how to use this toolchain

i added /opt/diablo-gcc-4.9/bin and /opt/diablo-gcc-4.9/arm-none-linux-gnueabi/bin to my $PATH, but when i try compiling i get

Code:
 /opt/diablo-gcc-4.9/lib/gcc/arm-none-linux-gnueabi/4.9.0/../../../../arm-none-linux-gnueabi/bin/ld: cannot find /lib/libgcc_s.so.1
collect2: error: ld returned 1 exit status
do i have to link by hand everything? am i missing something?
I think you are the first user of toolchain besides me, and so this is the first bug report. I reckon it will work for you if you make the following changes to the linker script:

Code:
diff -ur /tmp/diablo-gcc-4.9-orig/arm-none-linux-gnueabi/lib/libgcc_s.so.1 /opt/diablo-gcc-4.9/arm-none-linux-gnueabi/lib/libgcc_s.so.1
--- /tmp/diablo-gcc-4.9-orig/arm-none-linux-gnueabi/lib/libgcc_s.so.1	2014-04-30 07:43:47.000000000 +0930
+++ /opt/diablo-gcc-4.9/arm-none-linux-gnueabi/lib/libgcc_s.so.1	2015-04-03 10:00:17.227741457 +1030
@@ -3,4 +3,4 @@
  * which would occur if we just statically linked against the new libgcc_s, and
  * saves us having to worry about depending on a new shared library.
  */
-INPUT( /lib/libgcc_s.so.1 -lgcc )
+INPUT( /opt/diablo-gcc-4.9/maemo-sdk-rootstrap_4.1.2_armel/lib/libgcc_s.so.1 -lgcc )
diff -ur /tmp/diablo-gcc-4.9-orig/arm-none-linux-gnueabi/lib/libstdc++.so /opt/diablo-gcc-4.9/arm-none-linux-gnueabi/lib/libstdc++.so
--- /tmp/diablo-gcc-4.9-orig/arm-none-linux-gnueabi/lib/libstdc++.so	2014-04-30 07:43:47.000000000 +0930
+++ /opt/diablo-gcc-4.9/arm-none-linux-gnueabi/lib/libstdc++.so	2015-04-03 10:00:02.379767105 +1030
@@ -3,4 +3,4 @@
  * which would occur if we just statically linked against the new libstdc++, and
  * saves us having to worry about depending on a new shared library.
  */
-INPUT( /usr/lib/libstdc++.so.6 libstdc++.a )
+INPUT( /opt/diablo-gcc-4.9/maemo-sdk-rootstrap_4.1.2_armel/usr/lib/libstdc++.so.6 libstdc++.a )
I didn't need this at the time I was using this compiler because I was using it within a chroot.

Let me know if this helps.
 

The Following 2 Users Say Thank You to toojays For This Useful Post: