Skip to content

Commit 75538f4

Browse files
committed
The big RosBE 1.5 compatibility patch. You will need RosBE 1.5 from this point!
- Set the minimum GCC version to 4.4.0 and minimum Binutils version to 20091016. - Remove the -fno-unit-at-a-time hacks. - Remove dgorbachev's temporary hacks for user-mode C++ applications. - Merge ntoskrnl's "precomp.h" and "ntoskrnl.h" again, the PCH issues have been fixed. - Use our "ofmt_stub.a" to be compatible with newer MinGW Runtime versions. - Use LD's new -exclude-all-symbols option to not auto-export all symbols in case no DEF file or __declspec(dllexport) was specified. We used to patch our LD version to work around this problem. - Use LD's --start-group and --end-group parameters to allow a more flexible linking order. - Use GCC's -fno-set-stack-executable for amd64 and i386 targets to disable adding the __enable_execute_stack code. - Change the makefile's name to "makefile-$(ARCH).auto" for all architectures. - Remove some -Wno-error flags. See issue reactos#4810 for more details. svn path=/trunk/; revision=45535
1 parent 1bfa0a7 commit 75538f4

File tree

35 files changed

+148
-213
lines changed

35 files changed

+148
-213
lines changed

reactos/Makefile

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -169,11 +169,7 @@ else
169169
endif
170170

171171
ifeq ($(ROS_AUTOMAKE),)
172-
ifeq ($(ARCH),i386)
173-
ROS_AUTOMAKE=makefile.auto
174-
else
175-
ROS_AUTOMAKE=makefile-$(ARCH).auto
176-
endif
172+
ROS_AUTOMAKE=makefile-$(ARCH).auto
177173
endif
178174

179175
all: $(ROS_AUTOMAKE)

reactos/ReactOS-generic.rbuild

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -120,11 +120,6 @@
120120
<compilerflag>-Wno-strict-aliasing</compilerflag>
121121
<compilerflag>-Wpointer-arith</compilerflag>
122122
<compilerflag>-Wno-multichar</compilerflag>
123-
<!--
124-
<compilerflag>-Wno-error=uninitialized</compilerflag>
125-
<compilerflag>-Wno-error=unused-function</compilerflag>
126-
<compilerflag>-Wno-error=write-strings</compilerflag>
127-
-->
128123
<!-- compilerflag>-H</compilerflag> enable this for header traces -->
129124
</group>
130125

reactos/ReactOS-i386.rbuild

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0"?>
22
<!DOCTYPE project SYSTEM "tools/rbuild/project.dtd">
3-
<project name="ReactOS" makefile="makefile.auto" xmlns:xi="http://www.w3.org/2001/XInclude">
3+
<project name="ReactOS" makefile="makefile-i386.auto" xmlns:xi="http://www.w3.org/2001/XInclude">
44
<xi:include href="config.rbuild">
55
<xi:fallback>
66
<xi:include href="config.template.rbuild" />

reactos/base/applications/games/solitaire/solitaire.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,6 @@ int WINAPI _tWinMain(HINSTANCE hInst, HINSTANCE hPrev, LPTSTR szCmdLine, int iCm
196196

197197
SaveSettings();
198198

199-
try { throw 0; } catch (int i) { } /* HACK */
200-
201199
return msg.wParam;
202200
}
203201

reactos/base/applications/games/spider/spider.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,6 @@ int WINAPI _tWinMain(HINSTANCE hInst, HINSTANCE hPrev, LPTSTR szCmdLine, int iCm
154154
DispatchMessage(&msg);
155155
}
156156
}
157-
158-
try { throw 0; } catch (int i) { } /* HACK */
159-
160157
return msg.wParam;
161158
}
162159

reactos/dll/directx/ddraw/ddraw.rbuild

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,4 @@
6969
<file>DirectD3D3_Vtable.c</file>
7070
<file>DirectD3D7_Vtable.c</file>
7171
</directory>
72-
<!-- See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38054#c7 -->
73-
<compilerflag compilerset="gcc">-fno-unit-at-a-time</compilerflag>
7472
</module>

reactos/dll/directx/wine/ddraw/ddraw.rbuild

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,4 @@
4242
<file>viewport.c</file>
4343
4444
<dependency>wineheaders</dependency>
45-
46-
<!-- See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38054#c7 -->
47-
<compilerflag compilerset="gcc">-fno-unit-at-a-time</compilerflag>
4845
</module>

reactos/dll/win32/actxprxy/actxprxy.rbuild

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
<library>rpcrt4</library>
1616
<library>pseh</library>
1717
<file>usrmarshal.c</file>
18-
<compilerflag compilerset="gcc">-fno-unit-at-a-time</compilerflag>
1918
</module>
2019
<module name="actxprxy_interface" type="idlinterface">
2120
<file>actxprxy_servprov.idl</file>

reactos/dll/win32/advapi32/advapi32.rbuild

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,5 +59,4 @@
5959
<file>token.c</file>
6060
</directory>
6161
<file>advapi32.rc</file>
62-
<compilerflag compilerset="gcc">-fno-unit-at-a-time</compilerflag>
6362
</module>

reactos/dll/win32/crypt32/crypt32.rbuild

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,4 @@
4242
<file>message.c</file>
4343
<file>crypt32.rc</file>
4444
<file>version.rc</file>
45-
<!-- See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38054#c7 -->
46-
<compilerflag compilerset="gcc">-fno-unit-at-a-time</compilerflag>
4745
</module>

reactos/dll/win32/gdi32/gdi32.rbuild

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,9 @@
88
<library>pseh</library>
99
<library>dxguid</library>
1010
<library>ntdll</library>
11-
<!-- See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38269
1211
<directory name="include">
1312
<pch>precomp.h</pch>
1413
</directory>
15-
-->
1614
<directory name="main">
1715
<file>dllmain.c</file>
1816
</directory>
@@ -49,6 +47,4 @@
4947
<file>path.c</file>
5048
</directory>
5149
<file>gdi32.rc</file>
52-
<!-- See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38054#c7 -->
53-
<compilerflag compilerset="gcc">-fno-unit-at-a-time</compilerflag>
5450
</module>

reactos/dll/win32/kernel32/kernel32.rbuild

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,8 @@
1313
<define name="_KERNEL32_" />
1414
<redefine name="_WIN32_WINNT">0x0600</redefine>
1515
<dependency>errcodes</dependency>
16-
<!-- See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38269
1716
<pch>k32.h</pch>
18-
-->
1917
<group compilerset="gcc">
20-
<!-- See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38054#c7 -->
21-
<compilerflag>-fno-unit-at-a-time</compilerflag>
2218
<compilerflag compiler="cxx">-fno-exceptions</compilerflag>
2319
<compilerflag compiler="cxx">-fno-rtti</compilerflag>
2420
</group>

reactos/dll/win32/ole32/ole32.rbuild

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,6 @@
6363
<file>dcom.idl</file>
6464
<file>irot.idl</file>
6565
<include base="ole32" root="intermediate">.</include>
66-
<!-- See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38054#c7 -->
67-
<compilerflag compilerset="gcc">-fno-unit-at-a-time</compilerflag>
6866
</module>
6967
<module name="ole32_irot_server" type="rpcserver">
7068
<file>irot.idl</file>

reactos/dll/win32/psapi/psapi.rbuild

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,8 @@
55
<library>epsapi</library>
66
<library>pseh</library>
77
<library>ntdll</library>
8-
<!-- See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38269
98
<pch>precomp.h</pch>
10-
-->
119
<file>malloc.c</file>
1210
<file>psapi.c</file>
1311
<file>psapi.rc</file>
14-
<!-- See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38054#c7 -->
15-
<compilerflag compilerset="gcc">-fno-unit-at-a-time</compilerflag>
1612
</module>

reactos/dll/win32/qmgrprxy/qmgrprxy.rbuild

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
<library>rpcrt4</library>
1616
<library>pseh</library>
1717
<file>version.rc</file> <!-- we need at least one file in the module -->
18-
<compilerflag compilerset="gcc">-fno-unit-at-a-time</compilerflag>
1918
</module>
2019
<module name="qmgrprxy_interface" type="idlinterface">
2120
<file>qmgrprxy.idl</file>

reactos/dll/win32/rpcrt4/rpcrt4.rbuild

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@
3939
<file>rpcrt4.rc</file>
4040
<file>epm.idl</file>
4141
<include base="rpcrt4" root="intermediate">.</include>
42-
<!-- See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38054#c7 -->
43-
<compilerflag compilerset="gcc">-fno-unit-at-a-time</compilerflag>
4442
</module>
4543
<module name="rpcrt4_epm_client" type="rpcclient">
4644
<file>epm.idl</file>

reactos/dll/win32/setupapi/setupapi.rbuild

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,4 @@
3939
<file>stubs.c</file>
4040
<file>rpc.c</file>
4141
<file>setupapi.rc</file>
42-
<!-- See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38054#c7 -->
43-
<compilerflag compilerset="gcc">-fno-unit-at-a-time</compilerflag>
4442
</module>

reactos/dll/win32/syssetup/syssetup.rbuild

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,4 @@
2020
<file>logfile.c</file>
2121
<file>wizard.c</file>
2222
<file>syssetup.rc</file>
23-
<!-- See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38054#c7 -->
24-
<compilerflag compilerset="gcc">-fno-unit-at-a-time</compilerflag>
2523
</module>

reactos/dll/win32/user32/user32.rbuild

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,9 @@
1111
<library>pseh</library>
1212
<library>ntdll</library>
1313
<compilerflag compilerset="gcc">-fms-extensions</compilerflag>
14-
<!-- See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38269
1514
<directory name="include">
1615
<pch>user32.h</pch>
1716
</directory>
18-
-->
1917
<directory name="controls">
2018
<file>button.c</file>
2119
<file>combo.c</file>
@@ -76,6 +74,4 @@
7674
<file>winpos.c</file>
7775
</directory>
7876
<file>user32.rc</file>
79-
<!-- See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38054#c7 -->
80-
<compilerflag compilerset="gcc">-fno-unit-at-a-time</compilerflag>
8177
</module>

reactos/dll/win32/wintrust/wintrust.rbuild

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,4 @@
1818
<file>asn.c</file>
1919
<file>softpub.c</file>
2020
<file>version.rc</file>
21-
<!-- See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38054#c7 -->
22-
<compilerflag compilerset="gcc">-fno-unit-at-a-time</compilerflag>
2321
</module>

reactos/dll/win32/wlanapi/wlanapi.rbuild

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,4 @@
88
<library>pseh</library>
99
<library>ntdll</library>
1010
<file>main.c</file>
11-
<!-- See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38054#c7 -->
12-
<compilerflag compilerset="gcc">-fno-unit-at-a-time</compilerflag>
1311
</module>

reactos/drivers/input/kbdclass/kbdclass.rbuild

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,4 @@
99
<file>misc.c</file>
1010
<file>setup.c</file>
1111
<file>kbdclass.rc</file>
12-
<!-- See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38054#c7 -->
13-
<compilerflag compilerset="gcc">-fno-unit-at-a-time</compilerflag>
1412
</module>

reactos/drivers/input/mouclass/mouclass.rbuild

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,4 @@
88
<file>misc.c</file>
99
<file>mouclass.c</file>
1010
<file>mouclass.rc</file>
11-
<!-- See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38054#c7 -->
12-
<compilerflag compilerset="gcc">-fno-unit-at-a-time</compilerflag>
1311
</module>

reactos/drivers/network/afd/afd.rbuild

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@
88
<library>ntoskrnl</library>
99
<library>hal</library>
1010
<directory name="include">
11-
<!-- See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38269
1211
<pch>afd.h</pch>
13-
-->
1412
</directory>
1513
<directory name="afd">
1614
<file>bind.c</file>
@@ -27,6 +25,4 @@
2725
<file>write.c</file>
2826
</directory>
2927
<file>afd.rc</file>
30-
<!-- See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38054#c7 -->
31-
<compilerflag compilerset="gcc">-fno-unit-at-a-time</compilerflag>
3228
</module>

reactos/drivers/network/tcpip/tcpip.rbuild

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,9 @@
1313
<library>chew</library>
1414
<library>ntoskrnl</library>
1515
<library>hal</library>
16-
<!-- See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38269
1716
<directory name="include">
1817
<pch>precomp.h</pch>
1918
</directory>
20-
-->
2119
<directory name="datalink">
2220
<file>lan.c</file>
2321
</directory>
@@ -36,6 +34,4 @@
3634
<file>wait.c</file>
3735
</directory>
3836
<file>tcpip.rc</file>
39-
<!-- See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38054#c7 -->
40-
<compilerflag compilerset="gcc">-fno-unit-at-a-time</compilerflag>
4137
</module>

reactos/lib/rtl/rtl.rbuild

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,5 @@
107107
<file>version.c</file>
108108
<file>wait.c</file>
109109
<file>workitem.c</file>
110-
<!-- See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38269
111110
<pch>rtl.h</pch>
112-
-->
113-
<!-- See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38054#c7 -->
114-
<compilerflag compilerset="gcc">-fno-unit-at-a-time</compilerflag>
115111
</module>

reactos/ntoskrnl/include/ntoskrnl.h

Lines changed: 98 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,101 @@
1-
#include "precomp.h"
1+
/*
2+
* COPYRIGHT: See COPYING in the top level directory
3+
* PROJECT: ReactOS Kernel
4+
* FILE: ntoskrnl/include/ntoskrnl.h
5+
* PURPOSE: Main Kernel Header
6+
* PROGRAMMER: Alex Ionescu ([email protected])
7+
*/
8+
9+
/* INCLUDES ******************************************************************/
10+
11+
/* ARM Bringup Hack */
12+
#ifdef _M_ARM
13+
#define DbgPrint DbgPrintEarly
14+
#endif
15+
16+
/* Version Data */
17+
#undef __MSVCRT__
18+
#include <psdk/ntverp.h>
19+
20+
/* DDK/IFS/NDK Headers */
21+
#define _REALLY_GET_CALLERS_CALLER
22+
#include <excpt.h>
23+
#include <ntdef.h>
24+
#undef DECLSPEC_IMPORT
25+
#define DECLSPEC_IMPORT
26+
#include <ntifs.h>
27+
#include <wdmguid.h>
28+
#include <arc/arc.h>
29+
#undef NTHALAPI
30+
#define NTHALAPI __declspec(dllimport)
31+
#include <ntndk.h>
32+
#undef TEXT
33+
#define TEXT(s) L##s
34+
#include <regstr.h>
35+
36+
/* FIXME: Temporary until Winldr is used */
37+
#include <rosldr.h>
38+
39+
/* C Headers */
40+
#include <stdlib.h>
41+
#include <stdio.h>
42+
#include <ctype.h>
43+
#include <malloc.h>
44+
#include <wchar.h>
45+
46+
/* SEH support with PSEH */
47+
#include <pseh/pseh2.h>
48+
49+
/* ReactOS Headers */
50+
#include <reactos/buildno.h>
51+
#include <reactos/bugcodes.h>
52+
53+
/* SetupLDR Support */
54+
#include <arc/setupblk.h>
55+
56+
/* KD Support */
57+
#define NOEXTAPI
58+
#include <windbgkd.h>
59+
#include <wdbgexts.h>
60+
#include <kddll.h>
61+
#ifndef _WINKD_
62+
#include <reactos/rossym.h>
63+
#endif
64+
65+
/* PNP GUIDs */
66+
#include <umpnpmgr/sysguid.h>
67+
68+
/* Internal Headers */
69+
#include "internal/ntoskrnl.h"
70+
#include "config.h"
271

3-
/* Headers that shouldn't be precompiled due to GCC bugs */
472
#include <reactos/probe.h>
573
#include "internal/probe.h"
74+
75+
//
76+
// Define the internal versions of external and public global data
77+
//
78+
#define IoFileObjectType _IoFileObjectType
79+
#define PsThreadType _PsThreadType
80+
#define PsProcessType _PsProcessType
81+
#define ExEventObjectType _ExEventObjectType
82+
#define ExSemaphoreObjectType _ExSemaphoreObjectType
83+
#define KdDebuggerEnabled _KdDebuggerEnabled
84+
#define KdDebuggerNotPresent _KdDebuggerNotPresent
85+
#define NlsOemLeadByteInfo _NlsOemLeadByteInfo
86+
extern PUSHORT _NlsOemLeadByteInfo;
87+
#define FsRtlLegalAnsiCharacterArray _FsRtlLegalAnsiCharacterArray
88+
#undef LEGAL_ANSI_CHARACTER_ARRAY
89+
#undef NLS_MB_CODE_PAGE_TAG
90+
#undef NLS_OEM_LEAD_BYTE_INFO
91+
#define LEGAL_ANSI_CHARACTER_ARRAY FsRtlLegalAnsiCharacterArray
92+
#define NLS_MB_CODE_PAGE_TAG NlsMbOemCodePageTag
93+
#define NLS_OEM_LEAD_BYTE_INFO _NlsOemLeadByteInfo
94+
#undef KD_DEBUGGER_ENABLED
95+
#undef KD_DEBUGGER_NOT_PRESENT
96+
#define KD_DEBUGGER_ENABLED KdDebuggerEnabled
97+
#define KD_DEBUGGER_NOT_PRESENT KdDebuggerNotPresent
98+
#define HalDispatchTable _HalDispatchTable
99+
#undef HALDISPATCH
100+
#define HALDISPATCH (&HalDispatchTable)
101+
#define ExRaiseStatus RtlRaiseStatus

0 commit comments

Comments
 (0)