#~ #(module, def, deps, ldflags, libs, entry, base)
#~ RBUILD_LINK_RULE=${call RBUILD_LINK,$(1),$(value $(1)_OBJS),$(3),$(4),$(value $(1)_TARGET),$(2),$(5) $(value $(1)_LIBS) $(5),$(6),$(7)}
#(module, def, deps, ldflags, libs, entry, base, extralibs)
-RBUILD_LINK_RULE=${call RBUILD_LINK,$(1),$(value $(1)_OBJS),$(3),$(4),$(value $(1)_TARGET),$(2),$(value $(1)_LIBS),$(6),$(7),$(5)}
+RBUILD_LINK_RULE=${call RBUILD_LINK,$(1),$(value $(1)_OBJS),$(3),$(4),$(value $(1)_TARGET),$(2),$(value $(1)_LIBS),$(6),$(7),$(5)}
\ No newline at end of file
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-libgcc-file-name)\" \"$(shell ${TARGET_CPP} -print-file-name=libmingw32.a)\" \"$(shell ${TARGET_CPP} -print-file-name=libmingwex.a)\" " );
+
/* hack to get libgcc_eh.a, should check mingw version or something */
if (Environment::GetArch() == "amd64")
+ fprintf ( fMakefile, " \"$(shell ${TARGET_CPP} -print-file-name=libgcc_eh.a)\"" );
/* hack to get _get_output_format, needed by libmingwex */
else if (Environment::GetArch() == "i386")
fprintf ( fMakefile, "\"$(shell ${TARGET_CPP} -print-file-name=ofmt_stub.a)\"");
{
int digit = binutilsVersion.find_last_of(".");
if(digit == -1)
- {
+ {
printf("Unable to detect binutils version!\n");
return false;
}
module.name.c_str(),
definitionFilename.c_str(),
module.xmlbuildFile.c_str(),
- linkerScriptArgument.c_str (),
+ linkerScriptArgument.c_str(),
extraLibraries.c_str(),
module.GetEntryPoint().c_str(),
module.baseaddress.c_str() );
- }
+}
void
MingwModuleHandler::GenerateObjectFileTargets ( const IfableData& data )
&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" );
}
const FileLocation* ar_target = GenerateArchiveTarget ();
if ( ar_target )
- delete ar_target;
+ delete ar_target;
}
void
MingwKernelModuleHandler::GenerateKernelModuleTarget ()
{
- GenerateRules ();
+ GenerateRules ();
GenerateLinkerCommand ();
- }
+}
MingwKernelModeDLLModuleHandler::MingwKernelModeDLLModuleHandler (
void
MingwKernelModeDLLModuleHandler::GenerateKernelModeDLLModuleTarget ()
{
- GenerateRules ();
+ GenerateRules ();
GenerateLinkerCommand ();
- }
+}
MingwNativeDLLModuleHandler::MingwNativeDLLModuleHandler (
void
MingwNativeDLLModuleHandler::GenerateNativeDLLModuleTarget ()
{
- GenerateRules ();
+ GenerateRules ();
GenerateLinkerCommand ();
- }
+}
MingwNativeCUIModuleHandler::MingwNativeCUIModuleHandler (
void
MingwNativeCUIModuleHandler::GenerateNativeCUIModuleTarget ()
{
- GenerateRules ();
+ GenerateRules ();
GenerateLinkerCommand ();
- }
+}
MingwWin32DLLModuleHandler::MingwWin32DLLModuleHandler (
void
MingwWin32DLLModuleHandler::GenerateWin32DLLModuleTarget ()
{
- GenerateRules ();
+ GenerateRules ();
GenerateLinkerCommand ();
- }
+}
void
void
MingwWin32OCXModuleHandler::GenerateWin32OCXModuleTarget ()
{
- GenerateRules ();
+ GenerateRules ();
GenerateLinkerCommand ();
- }
+}
MingwWin32CUIModuleHandler::MingwWin32CUIModuleHandler (
void
MingwWin32CUIModuleHandler::GenerateWin32CUIModuleTarget ()
{
- GenerateRules ();
+ GenerateRules ();
GenerateLinkerCommand ();
- }
+}
MingwWin32GUIModuleHandler::MingwWin32GUIModuleHandler (
void
MingwWin32GUIModuleHandler::GenerateWin32GUIModuleTarget ()
{
- GenerateRules ();
+ GenerateRules ();
GenerateLinkerCommand ();
- }
+}
MingwBootLoaderModuleHandler::MingwBootLoaderModuleHandler (
void
MingwTestModuleHandler::GenerateTestModuleTarget ()
{
- GenerateRules ();
+ GenerateRules ();
GenerateLinkerCommand ();
- }
+}
MingwAliasModuleHandler::MingwAliasModuleHandler (
delete target_file;
fprintf ( fMakefile, "#/ELF EXECUTABLE TARGET\n" );
-}
+}
\ No newline at end of file