[prev in list] [next in list] [prev in thread] [next in thread]
List: wine-devel
Subject: [PATCH 2/5] winegcc: Handle -Wl,--subsystem.
From: Zebediah Figura <z.figura12 () gmail ! com>
Date: 2018-04-30 18:59:55
Message-ID: 1525114798-23413-2-git-send-email-z.figura12 () gmail ! com
[Download RAW message or body]
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
---
tools/winegcc/winegcc.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c
index 4be35d5..f628ff2 100644
--- a/tools/winegcc/winegcc.c
+++ b/tools/winegcc/winegcc.c
@@ -210,6 +210,7 @@ struct options
const char* image_base;
const char* section_align;
const char* lib_suffix;
+ const char* subsystem;
strarray* prefix;
strarray* lib_dirs;
strarray* linker_args;
@@ -916,6 +917,9 @@ static void build(struct options* opts)
if (opts->nodefaultlibs) strarray_add(link_args, "-nodefaultlibs");
}
+ if (opts->subsystem)
+ strarray_add(link_args, strmake("-Wl,--subsystem,%s", opts->subsystem));
+
for ( j = 0 ; j < opts->linker_args->size ; j++ )
strarray_add(link_args, opts->linker_args->base[j]);
@@ -1070,6 +1074,12 @@ static void build(struct options* opts)
if (opts->large_address_aware) strarray_add( spec_args, "--large-address-aware" );
}
+ if (opts->subsystem)
+ {
+ strarray_add(spec_args, "--subsystem");
+ strarray_add(spec_args, opts->subsystem);
+ }
+
for ( j = 0; j < lib_dirs->size; j++ )
strarray_add(spec_args, strmake("-L%s", lib_dirs->base[j]));
@@ -1600,6 +1610,11 @@ int main(int argc, char **argv)
opts.large_address_aware = 1;
continue;
}
+ if (!strcmp(Wl->base[j], "--subsystem") && j < Wl->size - 1)
+ {
+ opts.subsystem = strdup( Wl->base[++j] );
+ continue;
+ }
if (!strcmp(Wl->base[j], "-static")) linking = -1;
strarray_add(opts.linker_args, strmake("-Wl,%s",Wl->base[j]));
}
--
2.7.4
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic