Welcome to the Tiny Core Linux Wiki at tinycorelinux.net!

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

wiki:creating_extensions [2018/07/12 06:25]
JustinCB
wiki:creating_extensions [2019/04/23 19:07] (current)
TomyTurbos [Installing] readability
Line 62: Line 62:
 export LDFLAGS="-Wl,-O1" export LDFLAGS="-Wl,-O1"
 </code> </code>
-It is OK to use lower architectures in -march and -mtune than the recommended(-march=i386 is OKand -mtune=i586 and -mtune=i486 and -mtune=i386), however it is not OK to use higher architectures in -march and not recommended to use higher architectures in -mtune (eg. -march=i586).  It isn't necessary to use "-pipe" and if you get an error about -Wl you can omit it.  You might be able to specify a different -O value to LDFLAGS and you might be able to use "-Oz" in the place of "-Os" but that may only work for "clang" &amp; not "gcc"+It is OK to use lower architectures in -march and -mtune than the recommended(-march=i386, -mtune=i586-mtune=i486 and -mtune=i386. All are acceptable.), however it is not OK to use higher architectures in -march and not recommended to use higher architectures in -mtune (eg. -march=i586).  It isn't necessary to use "-pipe". If you get an error about -Wl you can omit it.  You might be able to specify a different -O value to LDFLAGS and you might be able to use "-Oz" in the place of "-Os" but that may only work for "clang"not "gcc"
  
 Suggested compiler flags on x86_64 (for compatibility; see also [[http://forum.tinycorelinux.net/index.php/topic,14397.0.html|the forum thread]]): Suggested compiler flags on x86_64 (for compatibility; see also [[http://forum.tinycorelinux.net/index.php/topic,14397.0.html|the forum thread]]):
Line 70: Line 70:
 export LDFLAGS="-Wl,-O1" export LDFLAGS="-Wl,-O1"
 </code> </code>
-Again, "-pipe" isn't necessary &amp; if you get an error about "-Wl" you can leave it out+Again, "-pipe" isn't necessary. If you get an error about "-Wl" you can leave it out
  
 Suggested compiler flags on RPi (discussed in [[http://forum.tinycorelinux.net/index.php/topic,17059.0.html|this forum thread]]): Suggested compiler flags on RPi (discussed in [[http://forum.tinycorelinux.net/index.php/topic,17059.0.html|this forum thread]]):
Line 78: Line 78:
 export LDFLAGS="-Wl,-O1" export LDFLAGS="-Wl,-O1"
 </code> </code>
-Again, "-pipe" isn't necessary &amp; if you get an error about "-Wl" you can leave it out+Again, "-pipe" isn't necessary. If you get an error about "-Wl" you can leave it out
  
 If you wish to try to get a lower sized C++ app, you can try adding "-fno-exceptions -fno-rtti" to CXXFLAGS. Use only on C++ applications, libraries should use the same flags as in CFLAGS above. If you wish to try to get a lower sized C++ app, you can try adding "-fno-exceptions -fno-rtti" to CXXFLAGS. Use only on C++ applications, libraries should use the same flags as in CFLAGS above.
Print/export