Don't link kernel-mode modules to kernel32.dll

svn path=/branches/xmlbuildsystem/; revision=14716
This commit is contained in:
Casper Hornstrup
2005-04-20 17:57:26 +00:00
parent fde9a780c8
commit 40242e030f
9 changed files with 27 additions and 7 deletions

View File

@@ -35,7 +35,6 @@
#
# ROS_RBUILDFLAGS
# Pass parameters to rbuild.
#
.PHONY: all
.PHONY: clean

View File

@@ -1,9 +1,9 @@
<module name="null" type="kernelmodedriver" installbase="system32/drivers" installname="null.sys">
<include base="null">.</include>
<define name="__USE_W32API" />
<library>pseh</library>
<library>ntoskrnl</library>
<library>hal</library>
<library>pseh</library>
<file>null.c</file>
<file>null.rc</file>
</module>

View File

@@ -2,6 +2,7 @@
<bootstrap base="reactos" />
<include base="vfatfs">.</include>
<define name="__USE_W32API" />
<linkerflag>-lgcc</linkerflag>
<library>ntoskrnl</library>
<library>hal</library>
<file>blockdev.c</file>

View File

@@ -3,6 +3,7 @@
<define name="BZ_NO_STDIO" />
<define name="BZ_DECOMPRESS_ONLY" />
<define name="__USE_W32API" />
<linkerflag>-lgcc</linkerflag>
<library>ntoskrnl</library>
<library>hal</library>
<file>bzlib.c</file>

View File

@@ -2,11 +2,11 @@
<include base="afd">include</include>
<include base="ReactOS">include/afd</include>
<define name="__USE_W32API" />
<library>pseh</library>
<library>ntoskrnl</library>
<library>hal</library>
<library>pseh</library>
<directory name="include">
<pch>afd.h</pch>
<pch>afd.h</pch>
</directory>
<directory name="afd">
<file>bind.c</file>

View File

@@ -1,5 +1,6 @@
<module name="disk" type="kernelmodedriver" installbase="system32/drivers" installname="debugout.sys">
<bootstrap base="reactos" />
<linkerflag>-lgcc</linkerflag>
<library>ntoskrnl</library>
<library>hal</library>
<library>class2</library>

View File

@@ -9,10 +9,10 @@
<define name="_WIN32_WINNT">0x0501</define>
<define name="WINVER">0x600</define>
<define name="_WIN32K_" />
<library>pseh</library>
<library>rosrtl</library>
<library>ntoskrnl</library>
<library>hal</library>
<library>pseh</library>
<library>freetype</library>
<pch>w32k.h</pch>
<directory name="dib">

View File

@@ -1511,6 +1511,15 @@ MingwModuleHandler::GenerateOtherMacros ()
nasmflags.c_str () );
}
string linkerflags = TypeSpecificLinkerFlags();
if ( linkerflags.size() > 0 )
{
fprintf ( fMakefile,
"%s += %s\n\n",
linkerflagsMacro.c_str (),
linkerflags.c_str () );
}
fprintf ( fMakefile, "\n\n" );
// future references to the macros will be to get their values

View File

@@ -49,6 +49,7 @@ public:
virtual void Process () = 0;
virtual std::string TypeSpecificCFlags() { return ""; }
virtual std::string TypeSpecificNasmFlags() { return ""; }
virtual std::string TypeSpecificLinkerFlags() { return ""; }
void GenerateInvocations () const;
void GenerateCleanTarget () const;
static bool ReferenceObjects ( const Module& module );
@@ -196,6 +197,7 @@ public:
MingwKernelModuleHandler ( const Module& module );
virtual HostType DefaultHost() { return HostFalse; }
virtual void Process ();
std::string TypeSpecificCFlags() { return "-D_SEH_NO_NATIVE_NLG"; }
private:
void GenerateKernelModuleTarget ();
};
@@ -229,6 +231,8 @@ public:
MingwKernelModeDLLModuleHandler ( const Module& module );
virtual HostType DefaultHost() { return HostFalse; }
virtual void Process ();
std::string TypeSpecificCFlags() { return "-D_SEH_NO_NATIVE_NLG"; }
std::string TypeSpecificLinkerFlags() { return "-nostartfiles -nostdlib"; }
private:
void GenerateKernelModeDLLModuleTarget ();
};
@@ -240,7 +244,8 @@ public:
MingwKernelModeDriverModuleHandler ( const Module& module );
virtual HostType DefaultHost() { return HostFalse; }
virtual void Process ();
std::string TypeSpecificCFlags() { return "-D__NTDRIVER__"; }
std::string TypeSpecificCFlags() { return "-D__NTDRIVER__ -D_SEH_NO_NATIVE_NLG"; }
std::string TypeSpecificLinkerFlags() { return "-nostartfiles -nostdlib"; }
private:
void GenerateKernelModeDriverModuleTarget ();
};
@@ -252,6 +257,8 @@ public:
MingwNativeDLLModuleHandler ( const Module& module );
virtual HostType DefaultHost() { return HostFalse; }
virtual void Process ();
std::string TypeSpecificCFlags() { return "-D_SEH_NO_NATIVE_NLG"; }
std::string TypeSpecificLinkerFlags() { return "-nostartfiles -nostdlib"; }
private:
void GenerateNativeDLLModuleTarget ();
};
@@ -263,7 +270,8 @@ public:
MingwNativeCUIModuleHandler ( const Module& module );
virtual HostType DefaultHost() { return HostFalse; }
virtual void Process ();
std::string TypeSpecificCFlags() { return "-D__NTAPP__"; }
std::string TypeSpecificCFlags() { return "-D__NTAPP__ -D_SEH_NO_NATIVE_NLG"; }
std::string TypeSpecificLinkerFlags() { return "-nostartfiles -nostdlib"; }
private:
void GenerateNativeCUIModuleTarget ();
};
@@ -309,6 +317,7 @@ public:
MingwBootLoaderModuleHandler ( const Module& module );
virtual HostType DefaultHost() { return HostFalse; }
virtual void Process ();
std::string TypeSpecificLinkerFlags() { return "-nostartfiles -nostdlib"; }
private:
void GenerateBootLoaderModuleTarget ();
};