[Scummvm-devel] compiler options usage

Einar Johan Trøan Sømåen einarjohants at gmail.com
Tue Jan 6 08:42:16 CET 2015


Well, my point still stands though, configure && make -n will give you the
answers you seek on platforms that use configure & make.

A sample pick from my (non master-branch, but I _think_ it is clean-ish):

echo '   ' C++ '    ' common/zlib.o;g++ -MMD -MF "common/.deps/zlib.d" -MQ
"common/zlib.o" -MP -Wall -I/usr/local/include -I/opt/local/include   -g
-ansi -W -Wno-unused-parameter -Wconversion -pedantic -Wno-long-long
-Wglobal-constructors -Wno-long-long -Wno-multichar -Wno-unknown-pragmas
-Wno-reorder -Wpointer-arith -Wcast-qual -Wshadow -Wnon-virtual-dtor
-Wwrite-strings -fno-exceptions -Wno-conversion -Wno-shorten-64-to-32
-Wno-sign-compare -Wno-four-char-constants -Wno-nested-anon-types
-DSCUMMVM_REVISION=\"1510-g244da22\" -DHAVE_CONFIG_H -DMACOSX -DSDL_BACKEND
-DPOSIX -DDATA_PATH=\"/usr/local/share/scummvm\"
-DPLUGIN_DIRECTORY=\"/usr/local/lib/scummvm\" -DENABLE_SCUMM=STATIC_PLUGIN
-DENABLE_SCUMM_7_8 -DENABLE_HE -DENABLE_AGI=STATIC_PLUGIN
-DENABLE_AGOS=STATIC_PLUGIN -DENABLE_AGOS2 -DENABLE_CGE=STATIC_PLUGIN
-DENABLE_CINE=STATIC_PLUGIN -DENABLE_COMPOSER=STATIC_PLUGIN
-DENABLE_CRUISE=STATIC_PLUGIN -DENABLE_DRACI=STATIC_PLUGIN
-DENABLE_DRASCULA=STATIC_PLUGIN -DENABLE_DREAMWEB=STATIC_PLUGIN
-DENABLE_GOB=STATIC_PLUGIN -DENABLE_GROOVIE=STATIC_PLUGIN
-DENABLE_HOPKINS=STATIC_PLUGIN -DENABLE_HUGO=STATIC_PLUGIN
-DENABLE_KYRA=STATIC_PLUGIN -DENABLE_LOL -DENABLE_EOB
-DENABLE_LURE=STATIC_PLUGIN -DENABLE_MADE=STATIC_PLUGIN
-DENABLE_MOHAWK=STATIC_PLUGIN -DENABLE_MORTEVIELLE=STATIC_PLUGIN
-DENABLE_NEVERHOOD=STATIC_PLUGIN -DENABLE_PARALLACTION=STATIC_PLUGIN
-DENABLE_PEGASUS=STATIC_PLUGIN -DENABLE_QUEEN=STATIC_PLUGIN
-DENABLE_SAGA=STATIC_PLUGIN -DENABLE_IHNM -DENABLE_SCI=STATIC_PLUGIN
-DENABLE_SKY=STATIC_PLUGIN -DENABLE_SWORD1=STATIC_PLUGIN
-DENABLE_SWORD2=STATIC_PLUGIN -DENABLE_TEENAGENT=STATIC_PLUGIN
-DENABLE_TINSEL=STATIC_PLUGIN -DENABLE_TOLTECS=STATIC_PLUGIN
-DENABLE_TONY=STATIC_PLUGIN -DENABLE_TOON=STATIC_PLUGIN
-DENABLE_TOUCHE=STATIC_PLUGIN -DENABLE_TSAGE=STATIC_PLUGIN
-DENABLE_TUCKER=STATIC_PLUGIN -DENABLE_VOYEUR=STATIC_PLUGIN
-DENABLE_WINTERMUTE=STATIC_PLUGIN -I. -I. -I./engines
-I/opt/local/include/SDL -D_GNU_SOURCE=1 -D_THREAD_SAFE
 -I/opt/local/include/freetype2  -c common/zlib.cpp -o common/zlib.o

In addition though, there is --enable-optimizations, which also changes
things up a bit.

echo '   ' C++ '    ' common/zlib.o;g++ -MMD -MF "common/.deps/zlib.d" -MQ
"common/zlib.o" -MP -Wall -I/usr/local/include -I/opt/local/include   -g
-ansi -W -Wno-unused-parameter -Wconversion -pedantic -Wno-long-long
-Wglobal-constructors -O2 -Wuninitialized -Wno-long-long -Wno-multichar
-Wno-unknown-pragmas -Wno-reorder -Wpointer-arith -Wcast-qual -Wshadow
-Wnon-virtual-dtor -Wwrite-strings -fno-exceptions -Wno-conversion
-Wno-shorten-64-to-32 -Wno-sign-compare -Wno-four-char-constants
-Wno-nested-anon-types -DSCUMMVM_REVISION=\"1510-g244da22\" -DHAVE_CONFIG_H
-DMACOSX -DSDL_BACKEND -DPOSIX -DDATA_PATH=\"/usr/local/share/scummvm\"
-DPLUGIN_DIRECTORY=\"/usr/local/lib/scummvm\" -DENABLE_SCUMM=STATIC_PLUGIN
-DENABLE_SCUMM_7_8 -DENABLE_HE -DENABLE_AGI=STATIC_PLUGIN
-DENABLE_AGOS=STATIC_PLUGIN -DENABLE_AGOS2 -DENABLE_CGE=STATIC_PLUGIN
-DENABLE_CINE=STATIC_PLUGIN -DENABLE_COMPOSER=STATIC_PLUGIN
-DENABLE_CRUISE=STATIC_PLUGIN -DENABLE_DRACI=STATIC_PLUGIN
-DENABLE_DRASCULA=STATIC_PLUGIN -DENABLE_DREAMWEB=STATIC_PLUGIN
-DENABLE_GOB=STATIC_PLUGIN -DENABLE_GROOVIE=STATIC_PLUGIN
-DENABLE_HOPKINS=STATIC_PLUGIN -DENABLE_HUGO=STATIC_PLUGIN
-DENABLE_KYRA=STATIC_PLUGIN -DENABLE_LOL -DENABLE_EOB
-DENABLE_LURE=STATIC_PLUGIN -DENABLE_MADE=STATIC_PLUGIN
-DENABLE_MOHAWK=STATIC_PLUGIN -DENABLE_MORTEVIELLE=STATIC_PLUGIN
-DENABLE_NEVERHOOD=STATIC_PLUGIN -DENABLE_PARALLACTION=STATIC_PLUGIN
-DENABLE_PEGASUS=STATIC_PLUGIN -DENABLE_QUEEN=STATIC_PLUGIN
-DENABLE_SAGA=STATIC_PLUGIN -DENABLE_IHNM -DENABLE_SCI=STATIC_PLUGIN
-DENABLE_SKY=STATIC_PLUGIN -DENABLE_SWORD1=STATIC_PLUGIN
-DENABLE_SWORD2=STATIC_PLUGIN -DENABLE_TEENAGENT=STATIC_PLUGIN
-DENABLE_TINSEL=STATIC_PLUGIN -DENABLE_TOLTECS=STATIC_PLUGIN
-DENABLE_TONY=STATIC_PLUGIN -DENABLE_TOON=STATIC_PLUGIN
-DENABLE_TOUCHE=STATIC_PLUGIN -DENABLE_TSAGE=STATIC_PLUGIN
-DENABLE_TUCKER=STATIC_PLUGIN -DENABLE_VOYEUR=STATIC_PLUGIN
-DENABLE_WINTERMUTE=STATIC_PLUGIN -I. -I. -I./engines
-I/opt/local/include/SDL -D_GNU_SOURCE=1 -D_THREAD_SAFE
 -I/opt/local/include/freetype2  -c common/zlib.cpp -o common/zlib.o

If you add --enable-release, you'll get:
echo '   ' C++ '    ' common/zlib.o;g++ -MMD -MF "common/.deps/zlib.d" -MQ
"common/zlib.o" -MP -Wall -I/usr/local/include -I/opt/local/include   -g
-ansi -W -Wno-unused-parameter -Wconversion -pedantic -Wno-long-long
-Wglobal-constructors -O2 -Wuninitialized -Wno-long-long -Wno-multichar
-Wno-unknown-pragmas -Wno-reorder -Wpointer-arith -Wcast-qual -Wshadow
-Wnon-virtual-dtor -Wwrite-strings -fno-exceptions -Wno-conversion
-Wno-shorten-64-to-32 -Wno-sign-compare -Wno-four-char-constants
-Wno-nested-anon-types -DSCUMMVM_REVISION=\"1510-g244da22\" -DHAVE_CONFIG_H
-DRELEASE_BUILD -DMACOSX -DSDL_BACKEND -DPOSIX
-DDATA_PATH=\"/usr/local/share/scummvm\"
-DPLUGIN_DIRECTORY=\"/usr/local/lib/scummvm\" -DENABLE_SCUMM=STATIC_PLUGIN
-DENABLE_SCUMM_7_8 -DENABLE_HE -DENABLE_AGI=STATIC_PLUGIN
-DENABLE_AGOS=STATIC_PLUGIN -DENABLE_AGOS2 -DENABLE_CGE=STATIC_PLUGIN
-DENABLE_CINE=STATIC_PLUGIN -DENABLE_COMPOSER=STATIC_PLUGIN
-DENABLE_CRUISE=STATIC_PLUGIN -DENABLE_DRACI=STATIC_PLUGIN
-DENABLE_DRASCULA=STATIC_PLUGIN -DENABLE_DREAMWEB=STATIC_PLUGIN
-DENABLE_GOB=STATIC_PLUGIN -DENABLE_GROOVIE=STATIC_PLUGIN
-DENABLE_HOPKINS=STATIC_PLUGIN -DENABLE_HUGO=STATIC_PLUGIN
-DENABLE_KYRA=STATIC_PLUGIN -DENABLE_LOL -DENABLE_EOB
-DENABLE_LURE=STATIC_PLUGIN -DENABLE_MADE=STATIC_PLUGIN
-DENABLE_MOHAWK=STATIC_PLUGIN -DENABLE_MORTEVIELLE=STATIC_PLUGIN
-DENABLE_NEVERHOOD=STATIC_PLUGIN -DENABLE_PARALLACTION=STATIC_PLUGIN
-DENABLE_PEGASUS=STATIC_PLUGIN -DENABLE_QUEEN=STATIC_PLUGIN
-DENABLE_SAGA=STATIC_PLUGIN -DENABLE_IHNM -DENABLE_SCI=STATIC_PLUGIN
-DENABLE_SKY=STATIC_PLUGIN -DENABLE_SWORD1=STATIC_PLUGIN
-DENABLE_SWORD2=STATIC_PLUGIN -DENABLE_TEENAGENT=STATIC_PLUGIN
-DENABLE_TINSEL=STATIC_PLUGIN -DENABLE_TOLTECS=STATIC_PLUGIN
-DENABLE_TONY=STATIC_PLUGIN -DENABLE_TOON=STATIC_PLUGIN
-DENABLE_TOUCHE=STATIC_PLUGIN -DENABLE_TSAGE=STATIC_PLUGIN
-DENABLE_TUCKER=STATIC_PLUGIN -DENABLE_VOYEUR=STATIC_PLUGIN
-DENABLE_WINTERMUTE=STATIC_PLUGIN -I. -I. -I./engines
-I/opt/local/include/SDL -D_GNU_SOURCE=1 -D_THREAD_SAFE
 -I/opt/local/include/freetype2  -c common/zlib.cpp -o common/zlib.o

So, cleaning up a bit, you'll find:

No options:
-MP
-Wall
-g
-ansi
-W
-Wno-unused-parameter
-Wconversion
-pedantic
-Wno-long-long
-Wglobal-constructors
-Wno-long-long
-Wno-multichar
-Wno-unknown-pragmas
-Wno-reorder
-Wpointer-arith
-Wcast-qual
-Wshadow
-Wnon-virtual-dtor
-Wwrite-strings
-fno-exceptions
-Wno-conversion
-Wno-shorten-64-to-32
-Wno-sign-compare
-Wno-four-char-constants
-Wno-nested-anon-types
 -DSCUMMVM_REVISION=\"1510-g244da22\"
-DHAVE_CONFIG_H
-DMACOSX
-DSDL_BACKEND
-DPOSIX
-D_GNU_SOURCE=1
-D_THREAD_SAFE

With --enable-optimizations this is added:

-O2
-Wuninitialized

Finally, with both --enable-optimizations, and --enable-release we add:

-DRELEASE_BUILD


Now, this is on OS X 10.10 with Apple LLVM 6 (clang 600). It _might_ be
wrong as mentioned earlier, as I just grabbed my current repos state and
ran configure & make. The branch I was on was an attempt I had at making
cmake work, but to avoid interference, I checked git log (0 commits done),
and did git stash, prior to running the above, so it should in theory be
correct.

Einar Johan


2015-01-06 4:00 GMT+01:00 Fiodar Strizhniou <fedor_qd at mail.ru>:

> For Symbian "configure + make" used for create plugin_tables.h only. For
> binary builds Symbian use own build system, which creates makefiles and run
> make for them.
> One day I build static libs for myself, this was untrivial and hard, and
> this libs was incompatible with Arm bare metal ABI.
> Always yours, Strizhniou Fedor.
> С уважением, Стрижнёв Фёдор.
>
> исходное сбщ
> Тема: Re: [Scummvm-devel] compiler options usage
> От: Einar Johan Trøan Sømåen <somaen at scummvm.org>
> Дата: 05.01.2015 22.12
>
> Have you tried running:
> ./configure
> make -n
>
> And looking at the resulting calls? Or were you interested in something
> else?
>
> 2015-01-05 19:25 GMT+01:00 Федор <fedor_qd at mail.ru>:
>
> > Which compiler options used to build Scummvm? Espesially for arm devices.
> > Symbian port works well, but I want make better =)
> > My options now :
> > -pipe -Wno-multichar -Wno-reorder -Wno-unused  -Wno-format -fsigned-char
> > -Wno-psabi
> >
> >
> > С уважением, Федор Стрижнёв.
> >
> >
> >
> ------------------------------------------------------------------------------
> > Dive into the World of Parallel Programming! The Go Parallel Website,
> > sponsored by Intel and developed in partnership with Slashdot Media, is
> > your
> > hub for all things parallel software development, from weekly thought
> > leadership blogs to news, videos, case studies, tutorials and more. Take
> a
> > look and join the conversation now. http://goparallel.sourceforge.net
> > _______________________________________________
> > Scummvm-devel mailing list
> > Scummvm-devel at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/scummvm-devel
> >
> >
>
>
>
>
> ------------------------------------------------------------------------------
> Dive into the World of Parallel Programming! The Go Parallel Website,
> sponsored by Intel and developed in partnership with Slashdot Media, is
> your
> hub for all things parallel software development, from weekly thought
> leadership blogs to news, videos, case studies, tutorials and more. Take a
> look and join the conversation now. http://goparallel.sourceforge.net
> _______________________________________________
> Scummvm-devel mailing list
> Scummvm-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/scummvm-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scummvm.org/pipermail/scummvm-devel/attachments/20150106/8bd9be95/attachment.html>


More information about the Scummvm-devel mailing list