summaryrefslogtreecommitdiff
path: root/libc/cbb-musl-pe.h
diff options
context:
space:
mode:
Diffstat (limited to 'libc/cbb-musl-pe.h')
-rw-r--r--libc/cbb-musl-pe.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/libc/cbb-musl-pe.h b/libc/cbb-musl-pe.h
index 13f25b15c..1c073930e 100644
--- a/libc/cbb-musl-pe.h
+++ b/libc/cbb-musl-pe.h
@@ -81,7 +81,7 @@ extern "C" {
" --as-needed -lldso}}}"
#undef STARTFILE_SPEC
-#define STARTFILE_SPEC "%R/lib/crti.o " \
+#define STARTFILE_SPEC "%{!mforeign:%R/lib/crti.o} " \
"%{!shared:%{mposix:%R/lib/crtposix.o}} " \
"%{!shared:%{mdinga:%R/lib/crtdinga.o}} " \
"%{!shared:%{mldso:" \
@@ -134,7 +134,7 @@ extern "C" {
"%{!shared:--image-base 0x1920000} " \
"%{shared:--entry __so_entry_point} " \
"%{shared:--enable-auto-image-base} " \
- "--subsystem windows " \
+ "--subsystem %{mconsole:console;:windows} " \
LINK_DSO_SYM_SPEC
#undef SUBTARGET_EXTRA_SPECS