WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Compiler Optimization Question  (Read 2224 times)

Offline maluvia

  • Newbie
  • *
  • Posts: 22
Compiler Optimization Question
« on: November 29, 2014, 11:52:36 AM »
I noticed that it is recommended to use the following prior to make

Code: (bash) [Select]
find . -name Makefile -type f -exec sed -i 's/-O2/ /g' {} \;
What exactly does this do?
And is the following post make command still recommended?

Code: (bash) [Select]
find . | xargs file | grep "executable" | grep ELF | grep "not stripped" | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || find . | xargs file | grep "shared object" | grep ELF | grep "not stripped" | cut -f 1 -d : | xargs strip -g 2> /dev/null
I <3 Tiny Core

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14570
Re: Compiler Optimization Question
« Reply #1 on: November 29, 2014, 11:04:16 PM »
What exactly does this do?
The recommended tinycore optimisation is "-Os", but as some Makefiles hardcode "-O2" it needs to be removed.

Quote
And is the following post make command still recommended?
That command finds files to be stripped in order to reduce their size as per tinycore recommendations.