VOGONS


GCC 4.6.0

Topic actions

First post, by ykhwong

User metadata
Rank Oldbie
Rank
Oldbie

Recently new version of GCC was officialy released. (Mar. 25. 2011)
http://gcc.gnu.org/gcc-4.6/changes.html

A new optimization flag -Ofast was introduced, and there are some improvements according to the changelog.

Anybody tried it for building DOSBox? Will be there a performance merit?

Reply 6 of 11, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

-ohistatfast adds about a 75% speed gain as far as I read. Maybe 200%

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 7 of 11, by ykhwong

User metadata
Rank Oldbie
Rank
Oldbie

I've just compiled GCC myself in MinGW/MSYS.
GCC 4.6 does not seem to be familiar with the DOSBox SVN source.

make[4]: Entering directory `/c/dosbox_temp/src/cpu'
g++ -DHAVE_CONFIG_H -I. -I../.. -I../../include -I/usr/local/include/SDL -D_GNU
_SOURCE=1 -Dmain=SDL_main -g -O2 -MT callback.o -MD -MP -MF .deps/callback.Tpo
-c -o callback.o callback.cpp
mv -f .deps/callback.Tpo .deps/callback.Po
g++ -DHAVE_CONFIG_H -I. -I../.. -I../../include -I/usr/local/include/SDL -D_GNU
_SOURCE=1 -Dmain=SDL_main -g -O2 -MT cpu.o -MD -MP -MF .deps/cpu.Tpo -c -o cpu
.o cpu.cpp
In file included from ../../include/programs.h:28:0,
from cpu.cpp:29:
../../include/dos_inc.h: In member function 'void DOS_MCB::SetFileName(const cha
r*)':
../../include/dos_inc.h:544:78: error: expected primary-expression before ',' to
ken
../../include/dos_inc.h:544:79: error: 'filename' was not declared in this scope

../../include/dos_inc.h:544:87: error: 'offsetof' was not declared in this scope

../../include/dos_inc.h: In member function 'void DOS_MCB::GetFileName(char*)':
../../include/dos_inc.h:545:71: error: expected primary-expression before ',' to
ken
../../include/dos_inc.h:545:72: error: 'filename' was not declared in this scope

../../include/dos_inc.h:545:80: error: 'offsetof' was not declared in this scope

cpu.cpp: In member function 'void TaskStateSegment::Get_SSx_ESPx(Bitu, Bitu&, Bi
tu&)':
cpu.cpp:294:37: error: expected primary-expression before ',' token
cpu.cpp:294:38: error: 'esp0' was not declared in this scope
cpu.cpp:294:42: error: 'offsetof' was not declared in this scope
cpu.cpp:298:37: error: expected primary-expression before ',' token
cpu.cpp:298:38: error: 'sp0' was not declared in this scope
cpu.cpp:298:41: error: 'offsetof' was not declared in this scope
cpu.cpp: In function 'bool CPU_SwitchTask(Bitu, TSwitchType, Bitu)':
cpu.cpp:362:49: error: expected primary-expression before ',' token
cpu.cpp:362:50: error: 'cr3' was not declared in this scope
cpu.cpp:362:53: error: 'offsetof' was not declared in this scope
cpu.cpp:363:49: error: expected primary-expression before ',' token
cpu.cpp:363:50: error: 'eip' was not declared in this scope
cpu.cpp:364:52: error: expected primary-expression before ',' token
cpu.cpp:364:53: error: 'eflags' was not declared in this scope
cpu.cpp:365:49: error: expected primary-expression before ',' token
cpu.cpp:365:50: error: 'eax' was not declared in this scope
cpu.cpp:366:49: error: expected primary-expression before ',' token
cpu.cpp:366:50: error: 'ecx' was not declared in this scope
cpu.cpp:367:49: error: expected primary-expression before ',' token
cpu.cpp:367:50: error: 'edx' was not declared in this scope
cpu.cpp:368:49: error: expected primary-expression before ',' token
cpu.cpp:368:50: error: 'ebx' was not declared in this scope
cpu.cpp:369:49: error: expected primary-expression before ',' token
cpu.cpp:369:50: error: 'esp' was not declared in this scope
cpu.cpp:370:49: error: expected primary-expression before ',' token
cpu.cpp:370:50: error: 'ebp' was not declared in this scope
cpu.cpp:371:49: error: expected primary-expression before ',' token
cpu.cpp:371:50: error: 'edi' was not declared in this scope
cpu.cpp:372:49: error: expected primary-expression before ',' token
cpu.cpp:372:50: error: 'esi' was not declared in this scope
cpu.cpp:374:48: error: expected primary-expression before ',' token
cpu.cpp:375:48: error: expected primary-expression before ',' token
cpu.cpp:376:48: error: expected primary-expression before ',' token
Show last 50 lines
cpu.cpp:377:48: error: expected primary-expression before ',' token
cpu.cpp:378:48: error: expected primary-expression before ',' token
cpu.cpp:379:48: error: expected primary-expression before ',' token
cpu.cpp:380:49: error: expected primary-expression before ',' token
cpu.cpp:380:50: error: 'ldt' was not declared in this scope
cpu.cpp:403:42: error: expected primary-expression before ',' token
cpu.cpp:403:43: error: 'eflags' was not declared in this scope
cpu.cpp:403:49: error: 'offsetof' was not declared in this scope
cpu.cpp:404:42: error: expected primary-expression before ',' token
cpu.cpp:404:43: error: 'eip' was not declared in this scope
cpu.cpp:406:42: error: expected primary-expression before ',' token
cpu.cpp:406:43: error: 'eax' was not declared in this scope
cpu.cpp:407:42: error: expected primary-expression before ',' token
cpu.cpp:407:43: error: 'ecx' was not declared in this scope
cpu.cpp:408:42: error: expected primary-expression before ',' token
cpu.cpp:408:43: error: 'edx' was not declared in this scope
cpu.cpp:409:42: error: expected primary-expression before ',' token
cpu.cpp:409:43: error: 'ebx' was not declared in this scope
cpu.cpp:410:42: error: expected primary-expression before ',' token
cpu.cpp:410:43: error: 'esp' was not declared in this scope
cpu.cpp:411:42: error: expected primary-expression before ',' token
cpu.cpp:411:43: error: 'ebp' was not declared in this scope
cpu.cpp:412:42: error: expected primary-expression before ',' token
cpu.cpp:412:43: error: 'esi' was not declared in this scope
cpu.cpp:413:42: error: expected primary-expression before ',' token
cpu.cpp:413:43: error: 'edi' was not declared in this scope
cpu.cpp:415:42: error: expected primary-expression before ',' token
cpu.cpp:416:42: error: expected primary-expression before ',' token
cpu.cpp:417:42: error: expected primary-expression before ',' token
cpu.cpp:418:42: error: expected primary-expression before ',' token
cpu.cpp:419:42: error: expected primary-expression before ',' token
cpu.cpp:420:42: error: expected primary-expression before ',' token
cpu.cpp:428:43: error: expected primary-expression before ',' token
cpu.cpp:428:44: error: 'back' was not declared in this scope
cpu.cpp:428:48: error: 'offsetof' was not declared in this scope
cpu.cpp:430:43: error: expected primary-expression before ',' token
cpu.cpp:430:44: error: 'back' was not declared in this scope
cpu.cpp:430:48: error: 'offsetof' was not declared in this scope
make[4]: *** [cpu.o] Error 1
make[4]: Leaving directory `/c/dosbox_temp/src/cpu'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/c/dosbox_temp/src/cpu'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/c/dosbox_temp/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/c/dosbox_temp'
make: *** [all] Error 2

태웅이@TEDYOO-PC /c/dosbox_temp
$

However, building SDL library was successful.