Index: subsystems/win32/win32k/objects/gdiobj.c
===================================================================
--- subsystems/win32/win32k/objects/gdiobj.c (Revision 45273)
+++ subsystems/win32/win32k/objects/gdiobj.c (Arbeitskopie)
@@ -30,7 +30,7 @@
#include "gdidbg.c"
-/* static */ /* FIXME: -fno-unit-at-a-time breaks this */
+static
BOOL INTERNAL_CALL GDI_CleanupDummy(PVOID ObjectBody);
/** GLOBALS *******************************************************************/
@@ -140,7 +140,7 @@
/*
* Dummy GDI Cleanup Callback
*/
-/* static */ /* FIXME: -fno-unit-at-a-time breaks this */
+static
BOOL INTERNAL_CALL
GDI_CleanupDummy(PVOID ObjectBody)
{
Index: subsystems/win32/win32k/win32k.rbuild
===================================================================
--- subsystems/win32/win32k/win32k.rbuild (Revision 45273)
+++ subsystems/win32/win32k/win32k.rbuild (Arbeitskopie)
@@ -20,9 +20,7 @@
/wd4276
-
dib8gen.c
@@ -205,8 +203,5 @@
stubs.c
umpdstubs.c
-
-
- -fno-unit-at-a-time
Index: tools/rbuild/backend/mingw/rules.mak
===================================================================
--- tools/rbuild/backend/mingw/rules.mak (Revision 45273)
+++ tools/rbuild/backend/mingw/rules.mak (Arbeitskopie)
@@ -263,7 +263,7 @@
$$(Q)$$(widl_TARGET) ${call RBUILD_midlflags,$(1),$(4),-I${call RBUILD_dir,$(2)}} -h -H ${call RBUILD_intermediate_path_noext,$(2)}_c.h -c -C ${call RBUILD_intermediate_path_noext,$(2)}_c.c $(2)
$${checkpoint} $$@>$(NUL)
-${call RBUILD_CC,$(1),${call RBUILD_intermediate_path_noext,$(2)}_c.c,,-fno-unit-at-a-time,${call RBUILD_intermediate_path_noext,$(2)}_c.o}
+${call RBUILD_CC,$(1),${call RBUILD_intermediate_path_noext,$(2)}_c.c,,,${call RBUILD_intermediate_path_noext,$(2)}_c.o}
endef
@@ -279,7 +279,7 @@
$$(Q)$$(widl_TARGET) ${call RBUILD_midlflags,$(1),$(4),-I${call RBUILD_dir,$(2)}} -h -H ${call RBUILD_intermediate_path_noext,$(2)}_s.h -s -S ${call RBUILD_intermediate_path_noext,$(2)}_s.c $(2)
$${checkpoint} $$@>$(NUL)
-${call RBUILD_CC,$(1),${call RBUILD_intermediate_path_noext,$(2)}_s.c,,-fno-unit-at-a-time,${call RBUILD_intermediate_path_noext,$(2)}_s.o}
+${call RBUILD_CC,$(1),${call RBUILD_intermediate_path_noext,$(2)}_s.c,,,${call RBUILD_intermediate_path_noext,$(2)}_s.o}
endef
@@ -295,7 +295,7 @@
$$(Q)$$(widl_TARGET) ${call RBUILD_midlflags,$(1),$(4),-I${call RBUILD_dir,$(2)}} -h -H ${call RBUILD_intermediate_path_noext,$(2)}_p.h -p -P ${call RBUILD_intermediate_path_noext,$(2)}_p.c $(2)
$${checkpoint} $$@>$(NUL)
-${call RBUILD_CC,$(1),${call RBUILD_intermediate_path_noext,$(2)}_p.c,,-fno-unit-at-a-time,${call RBUILD_intermediate_path_noext,$(2)}_p.o}
+${call RBUILD_CC,$(1),${call RBUILD_intermediate_path_noext,$(2)}_p.c,,,${call RBUILD_intermediate_path_noext,$(2)}_p.o}
endef
@@ -308,7 +308,7 @@
$$(ECHO_WIDL)
$$(Q)$$(widl_TARGET) ${call RBUILD_midlflags,$(1),$(4),-I${call RBUILD_dir,$(2)}} -u -U $$@ $$<
-${call RBUILD_CC,$(1),${call RBUILD_intermediate_path_noext,$(2)}_i.c,,-fno-unit-at-a-time,${call RBUILD_intermediate_path_noext,$(2)}_i.o}
+${call RBUILD_CC,$(1),${call RBUILD_intermediate_path_noext,$(2)}_i.c,,,${call RBUILD_intermediate_path_noext,$(2)}_i.o}
endef
Index: tools/rbuild/backend/mingw/mingw.cpp
===================================================================
--- tools/rbuild/backend/mingw/mingw.cpp (Revision 45273)
+++ tools/rbuild/backend/mingw/mingw.cpp (Arbeitskopie)
@@ -480,8 +480,11 @@
fputs ( "BUILTIN_CXXINCLUDES+= $(TARGET_CPPFLAGS)\n", fMakefile );
fprintf ( fMakefile, "PROJECT_CCLIBS := \"$(shell ${TARGET_CC} -print-libgcc-file-name)\"\n" );
- fprintf ( fMakefile, "PROJECT_CXXLIBS := \"$(shell ${TARGET_CPP} -print-file-name=libstdc++.a)\" \"$(shell ${TARGET_CPP} -print-file-name=libgcc.a)\" \"$(shell ${TARGET_CPP} -print-file-name=libmingw32.a)\" \"$(shell ${TARGET_CPP} -print-file-name=libmingwex.a)\" \"$(shell ${TARGET_CPP} -print-file-name=libcoldname.a)\"\n" );
-
+
+ // We use our proprietary "ofmt_stub.a" to implement a stub for "_get_output_format" required by "libmingwex.a".
+ // This archive just contains the compiled "ofmt_stub.s" supplied with the MinGW Runtime sources.
+ fprintf ( fMakefile, "PROJECT_CXXLIBS := \"$(shell ${TARGET_CPP} -print-file-name=libstdc++.a)\" \"$(shell ${TARGET_CPP} -print-libgcc-file-name)\" \"$(shell ${TARGET_CPP} -print-file-name=libmingw32.a)\" \"$(shell ${TARGET_CPP} -print-file-name=libmingwex.a)\" \"$(shell ${TARGET_CPP} -print-file-name=ofmt_stub.a)\" \"$(shell ${TARGET_CPP} -print-file-name=libcoldname.a)\"\n" );
+
/* hack to get libgcc_eh.a, should check mingw version or something */
if (Environment::GetArch() == "amd64")
{
@@ -844,7 +847,7 @@
buffer[i] = '\0';
pclose ( fp );
- char separators[] = " ()";
+ char separators[] = " ()\n";
char *token;
char *prevtoken = NULL;
@@ -888,7 +891,7 @@
string
MingwBackend::GetCompilerVersion ( const string& compilerCommand )
{
- string versionCommand = ssprintf ( "%s --version gcc",
+ string versionCommand = ssprintf ( "%s --version",
compilerCommand.c_str (),
NUL,
NUL );
@@ -908,7 +911,7 @@
bool
MingwBackend::IsSupportedCompilerVersion ( const string& compilerVersion )
{
- if ( strcmp ( compilerVersion.c_str (), "3.4.2") < 0 )
+ if ( strcmp ( compilerVersion.c_str (), "4.4.3") < 0 )
return false;
else
return true;
@@ -970,27 +973,32 @@
bool
MingwBackend::IsSupportedBinutilsVersion ( const string& binutilsVersion )
{
- if ( manualBinutilsSetting ) return true;
-
- /* linux */
- if ( binutilsVersion.find('.') != std::string::npos )
+ int digit = binutilsVersion.find_last_of(".");
+ if(digit == -1)
{
- /* TODO: blacklist versions on version number instead of date */
- return true;
+ printf("Unable to detect binutils version!\n");
+ return false;
}
-
- /*
- * - Binutils older than 2003/10/01 have broken windres which can't handle
- * icons with alpha channel.
- * - Binutils between 2004/09/02 and 2004/10/08 have broken handling of
- * forward exports in dlltool.
- */
- if ( ( ( strcmp ( binutilsVersion.c_str (), "20040902") >= 0 ) &&
- ( strcmp ( binutilsVersion.c_str (), "20041008") <= 0 ) ) ||
- ( strcmp ( binutilsVersion.c_str (), "20031001") < 0 ) )
- return false;
+
+ string date = string(binutilsVersion, digit + 1);
+ if(date.length() == 8)
+ {
+ /* This is a real date in the format YYYYMMDD.
+ Check whether we have at least Binutils 20091222 (the one we use in
+ RosBE 1.5). */
+ if(strcmp(date.c_str(), "20091222") < 0)
+ return false;
+ }
else
- return true;
+ {
+ /* This is no date, so binutilsVersion should just contain the version
+ number.
+ Binutils 2.20 will hopefully contain the required features. */
+ if(strcmp(binutilsVersion.c_str(), "2.20") < 0)
+ return false;
+ }
+
+ return true;
}
void
Index: tools/rbuild/backend/mingw/modulehandler.cpp
===================================================================
--- tools/rbuild/backend/mingw/modulehandler.cpp (Revision 45273)
+++ tools/rbuild/backend/mingw/modulehandler.cpp (Arbeitskopie)
@@ -1782,6 +1782,12 @@
&module.linkerFlags,
used_defs );
+ /* LD automatically exports all symbols by default if -shared is specified. Prevent it from doing
+ this by adding the option -exclude-all-symbols (available since Binutils 20091017). */
+ // FIXME: Should only be applied for -shared modules, when there's a smart way to check for them.
+ if ( ModuleHandlerInformations[module.type].DefaultHost == HostFalse && !module.importLibrary )
+ fprintf ( fMakefile, "%s_LDFLAGS+=$(LDFLAG_EXCLUDE_ALL_SYMBOLS)\n", module.name.c_str() );
+
fprintf ( fMakefile, "\n\n" );
}
Index: tools/rbuild/backend/mingw/linkers/ld.mak
===================================================================
--- tools/rbuild/backend/mingw/linkers/ld.mak (Revision 45273)
+++ tools/rbuild/backend/mingw/linkers/ld.mak (Arbeitskopie)
@@ -5,6 +5,8 @@
LDFLAG_WINDOWS:=--subsystem=windows
LDFLAG_NATIVE:=--subsystem=native
+LDFLAG_EXCLUDE_ALL_SYMBOLS=-exclude-all-symbols
+
#~ #(module, objs, deps, ldflags, output, def, libs, entry, base)
#(module, objs, deps, ldflags, output, def, libs, entry, base, extralibs)
define RBUILD_LINK
@@ -40,7 +42,7 @@
$(5): ${call RBUILD_intermediate_dir,$(5)}$$(SEP)$(1)_objs.rsp $(7) $(3) $$(RSYM_TARGET) $$(PEFIXUP_TARGET) | ${call RBUILD_dir,$(5)}
$$(ECHO_LD)
#~ $${ld} --entry=$(8) --image-base=$(9) @${call RBUILD_intermediate_dir,$(5)}$$(SEP)$(1)_objs.rsp $(7) ${call RBUILD_ldflags,$(1),$(4)} -o $$@
- $${ld} --entry=$(8) --image-base=$(9) @${call RBUILD_intermediate_dir,$(5)}$$(SEP)$(1)_objs.rsp $(10) $(7) $(10) ${call RBUILD_ldflags,$(1),$(4)} -o $$@
+ $${ld} --entry=$(8) --image-base=$(9) @${call RBUILD_intermediate_dir,$(5)}$$(SEP)$(1)_objs.rsp --start-group $(10) $(7) --end-group ${call RBUILD_ldflags,$(1),$(4)} -o $$@
ifneq ($(or $(6),$$(MODULETYPE$$($(1)_TYPE)_KMODE)),)
$$(ECHO_PEFIXUP)
$$(Q)$$(PEFIXUP_TARGET) $$@ $(if $(6),-exports) $$(if $$(MODULETYPE$($(1)_TYPE)_KMODE),-sections)
Index: tools/rbuild/backend/mingw/compilers/gcc.mak
===================================================================
--- tools/rbuild/backend/mingw/compilers/gcc.mak (Revision 45273)
+++ tools/rbuild/backend/mingw/compilers/gcc.mak (Arbeitskopie)
@@ -9,7 +9,7 @@
# FIXME: disabled until RosBE stops sucking
# BUILTIN_CPPFLAGS+= -nostdinc
-BUILTIN_CFLAGS+= -fno-optimize-sibling-calls
+BUILTIN_CFLAGS+= -fno-optimize-sibling-calls -fno-set-stack-executable
BUILTIN_CXXFLAGS+= -fno-optimize-sibling-calls
#(module, source, dependencies, cflags, output)
Index: lib/rtl/rtl.rbuild
===================================================================
--- lib/rtl/rtl.rbuild (Revision 45273)
+++ lib/rtl/rtl.rbuild (Arbeitskopie)
@@ -107,9 +107,5 @@
version.c
wait.c
workitem.c
-
-
- -fno-unit-at-a-time
Index: Makefile
===================================================================
--- Makefile (Revision 45273)
+++ Makefile (Arbeitskopie)
@@ -169,11 +169,7 @@
endif
ifeq ($(ROS_AUTOMAKE),)
- ifeq ($(ARCH),i386)
- ROS_AUTOMAKE=makefile.auto
- else
- ROS_AUTOMAKE=makefile-$(ARCH).auto
- endif
+ ROS_AUTOMAKE=makefile-$(ARCH).auto
endif
all: $(ROS_AUTOMAKE)
Index: ReactOS-generic.rbuild
===================================================================
--- ReactOS-generic.rbuild (Revision 45273)
+++ ReactOS-generic.rbuild (Arbeitskopie)
@@ -120,11 +120,6 @@
-Wno-strict-aliasing
-Wpointer-arith
-Wno-multichar
-
Index: base/applications/games/spider/spider.cpp
===================================================================
--- base/applications/games/spider/spider.cpp (Revision 45273)
+++ base/applications/games/spider/spider.cpp (Arbeitskopie)
@@ -154,9 +154,6 @@
DispatchMessage(&msg);
}
}
-
- try { throw 0; } catch (int i) { } /* HACK */
-
return msg.wParam;
}
Index: base/applications/games/solitaire/solitaire.cpp
===================================================================
--- base/applications/games/solitaire/solitaire.cpp (Revision 45273)
+++ base/applications/games/solitaire/solitaire.cpp (Arbeitskopie)
@@ -196,8 +196,6 @@
SaveSettings();
- try { throw 0; } catch (int i) { } /* HACK */
-
return msg.wParam;
}
Index: ntoskrnl/ntoskrnl-generic.rbuild
===================================================================
--- ntoskrnl/ntoskrnl-generic.rbuild (Revision 45273)
+++ ntoskrnl/ntoskrnl-generic.rbuild (Arbeitskopie)
@@ -30,11 +30,9 @@
bootvid
wdmguid
bugcodes
-
@@ -502,7 +500,4 @@
ntoskrnl.rc
ntoskrnl_$(ARCH).lnk
-
-
- -fno-unit-at-a-time
Index: dll/directx/ddraw/ddraw.rbuild
===================================================================
--- dll/directx/ddraw/ddraw.rbuild (Revision 45273)
+++ dll/directx/ddraw/ddraw.rbuild (Arbeitskopie)
@@ -69,6 +69,4 @@
DirectD3D3_Vtable.c
DirectD3D7_Vtable.c
-
- -fno-unit-at-a-time
Index: dll/directx/wine/ddraw/ddraw.rbuild
===================================================================
--- dll/directx/wine/ddraw/ddraw.rbuild (Revision 45273)
+++ dll/directx/wine/ddraw/ddraw.rbuild (Arbeitskopie)
@@ -42,7 +42,4 @@
viewport.c
wineheaders
-
-
- -fno-unit-at-a-time
Index: dll/win32/qmgrprxy/qmgrprxy.rbuild
===================================================================
--- dll/win32/qmgrprxy/qmgrprxy.rbuild (Revision 45273)
+++ dll/win32/qmgrprxy/qmgrprxy.rbuild (Arbeitskopie)
@@ -15,7 +15,6 @@
rpcrt4
pseh
version.rc
- -fno-unit-at-a-time
qmgrprxy.idl
Index: dll/win32/setupapi/setupapi.rbuild
===================================================================
--- dll/win32/setupapi/setupapi.rbuild (Revision 45273)
+++ dll/win32/setupapi/setupapi.rbuild (Arbeitskopie)
@@ -39,6 +39,4 @@
stubs.c
rpc.c
setupapi.rc
-
- -fno-unit-at-a-time
Index: dll/win32/gdi32/gdi32.rbuild
===================================================================
--- dll/win32/gdi32/gdi32.rbuild (Revision 45273)
+++ dll/win32/gdi32/gdi32.rbuild (Arbeitskopie)
@@ -8,11 +8,9 @@
pseh
dxguid
ntdll
-
dllmain.c
@@ -49,6 +47,4 @@
path.c
gdi32.rc
-
- -fno-unit-at-a-time
Index: dll/win32/ole32/ole32.rbuild
===================================================================
--- dll/win32/ole32/ole32.rbuild (Revision 45273)
+++ dll/win32/ole32/ole32.rbuild (Arbeitskopie)
@@ -63,8 +63,6 @@
dcom.idl
irot.idl
.
-
- -fno-unit-at-a-time
irot.idl
Index: dll/win32/psapi/psapi.rbuild
===================================================================
--- dll/win32/psapi/psapi.rbuild (Revision 45273)
+++ dll/win32/psapi/psapi.rbuild (Arbeitskopie)
@@ -5,12 +5,8 @@
epsapi
pseh
ntdll
-
malloc.c
psapi.c
psapi.rc
-
- -fno-unit-at-a-time
Index: dll/win32/user32/user32.rbuild
===================================================================
--- dll/win32/user32/user32.rbuild (Revision 45273)
+++ dll/win32/user32/user32.rbuild (Arbeitskopie)
@@ -11,11 +11,9 @@
pseh
ntdll
-fms-extensions
-
button.c
combo.c
@@ -76,6 +74,4 @@
winpos.c
user32.rc
-
- -fno-unit-at-a-time
Index: dll/win32/wintrust/wintrust.rbuild
===================================================================
--- dll/win32/wintrust/wintrust.rbuild (Revision 45273)
+++ dll/win32/wintrust/wintrust.rbuild (Arbeitskopie)
@@ -18,6 +18,4 @@
asn.c
softpub.c
version.rc
-
- -fno-unit-at-a-time
Index: dll/win32/advapi32/advapi32.rbuild
===================================================================
--- dll/win32/advapi32/advapi32.rbuild (Revision 45273)
+++ dll/win32/advapi32/advapi32.rbuild (Arbeitskopie)
@@ -59,5 +59,4 @@
token.c
advapi32.rc
- -fno-unit-at-a-time
Index: dll/win32/actxprxy/actxprxy.rbuild
===================================================================
--- dll/win32/actxprxy/actxprxy.rbuild (Revision 45273)
+++ dll/win32/actxprxy/actxprxy.rbuild (Arbeitskopie)
@@ -15,7 +15,6 @@
rpcrt4
pseh
usrmarshal.c
- -fno-unit-at-a-time
actxprxy_servprov.idl
Index: dll/win32/wlanapi/wlanapi.rbuild
===================================================================
--- dll/win32/wlanapi/wlanapi.rbuild (Revision 45273)
+++ dll/win32/wlanapi/wlanapi.rbuild (Arbeitskopie)
@@ -8,6 +8,4 @@
pseh
ntdll
main.c
-
- -fno-unit-at-a-time
Index: dll/win32/rpcrt4/rpcrt4.rbuild
===================================================================
--- dll/win32/rpcrt4/rpcrt4.rbuild (Revision 45273)
+++ dll/win32/rpcrt4/rpcrt4.rbuild (Arbeitskopie)
@@ -39,8 +39,6 @@
rpcrt4.rc
epm.idl
.
-
- -fno-unit-at-a-time
epm.idl
Index: dll/win32/kernel32/kernel32.rbuild
===================================================================
--- dll/win32/kernel32/kernel32.rbuild (Revision 45273)
+++ dll/win32/kernel32/kernel32.rbuild (Arbeitskopie)
@@ -13,12 +13,8 @@
0x0600
errcodes
-
-
- -fno-unit-at-a-time
-fno-exceptions
-fno-rtti
Index: dll/win32/syssetup/syssetup.rbuild
===================================================================
--- dll/win32/syssetup/syssetup.rbuild (Revision 45273)
+++ dll/win32/syssetup/syssetup.rbuild (Arbeitskopie)
@@ -20,6 +20,4 @@
logfile.c
wizard.c
syssetup.rc
-
- -fno-unit-at-a-time
Index: dll/win32/crypt32/crypt32.rbuild
===================================================================
--- dll/win32/crypt32/crypt32.rbuild (Revision 45273)
+++ dll/win32/crypt32/crypt32.rbuild (Arbeitskopie)
@@ -42,6 +42,4 @@
message.c
crypt32.rc
version.rc
-
- -fno-unit-at-a-time
Index: drivers/network/tcpip/tcpip.rbuild
===================================================================
--- drivers/network/tcpip/tcpip.rbuild (Revision 45273)
+++ drivers/network/tcpip/tcpip.rbuild (Arbeitskopie)
@@ -13,11 +13,9 @@
chew
ntoskrnl
hal
-
lan.c
@@ -36,6 +34,4 @@
wait.c
tcpip.rc
-
- -fno-unit-at-a-time
Index: drivers/network/afd/afd.rbuild
===================================================================
--- drivers/network/afd/afd.rbuild (Revision 45273)
+++ drivers/network/afd/afd.rbuild (Arbeitskopie)
@@ -8,9 +8,7 @@
ntoskrnl
hal
-
bind.c
@@ -27,6 +25,4 @@
write.c
afd.rc
-
- -fno-unit-at-a-time
Index: drivers/input/kbdclass/kbdclass.rbuild
===================================================================
--- drivers/input/kbdclass/kbdclass.rbuild (Revision 45273)
+++ drivers/input/kbdclass/kbdclass.rbuild (Arbeitskopie)
@@ -9,6 +9,4 @@
misc.c
setup.c
kbdclass.rc
-
- -fno-unit-at-a-time
Index: drivers/input/mouclass/mouclass.rbuild
===================================================================
--- drivers/input/mouclass/mouclass.rbuild (Revision 45273)
+++ drivers/input/mouclass/mouclass.rbuild (Arbeitskopie)
@@ -8,6 +8,4 @@
misc.c
mouclass.c
mouclass.rc
-
- -fno-unit-at-a-time