Tiny Core Linux

Tiny Core Extensions => TCE Talk => Topic started by: aus9 on July 29, 2020, 06:56:53 PM

Title: [Solved] compile flag --enable-no_rtti
Post by: aus9 on July 29, 2020, 06:56:53 PM
Hi

I am aware of the wiki for TCE creation and the flags used for TC64. I came across this flag for a bit of software. configure --help
Code: [Select]
--enable-no_rtti   Enable compilation without creation of C++ RTTI information in object files.
                            This will speed-up compilation and reduce binary size.

The reduction interests me. Any problems if I enable it in a build?
Title: Re: compile flag --enable-no_rtti
Post by: Rich on July 29, 2020, 07:31:35 PM
Hi aus9
Quote
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.
Found here:
http://wiki.tinycorelinux.net/doku.php?id=wiki:creating_extensions#installing
Title: Re: compile flag --enable-no_rtti
Post by: aus9 on July 29, 2020, 09:18:46 PM
trust me to use the wrong term.

I am aware of the TC64 normal flags
Quote
export CFLAGS="-mtune=generic -Os -pipe"
export CXXFLAGS="-mtune=generic -Os -pipe"
export LDFLAGS="-Wl,-O1"

what I should have said in subject was configure option. its a configure option that I have never seen before.

eg
Code: [Select]
./configure --prefix=/usr/local --enable-no_rtti
anyhow all I can do it test the size by rebuilding it and checking unsquashed on disk size,
I am interested because the resultant exe is huge. I have not compared .so files yet.

anyhow I shall try 4 permutations to see whats what.

export CFLAGS="-mtune=generic -Os -pipe"
export CXXFLAGS="-mtune=generic -Os -pipe -fno-exceptions -fno-rtti"
export LDFLAGS="-Wl,-O1"

with and without that configure option.

anyhow
@Rich please mark as solved.
Title: Re: [Solved] compile flag --enable-no_rtti
Post by: Rich on July 29, 2020, 10:18:44 PM
Hi aus9
Most likely
Code: [Select]
./configure --enable-no_rttijust adds  -fno-rtti  to  CXXFLAGS.

... @Rich please mark as solved.
So marked. :)