From 1627c6bcd7dbacaa5e781a2042f8eade55bd6634 Mon Sep 17 00:00:00 2001 From: midipix Date: Sat, 23 Feb 2019 00:52:50 -0500 Subject: midipix targets: added -mstatic (assume static linking). --- gcc/config/i386/midipix.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'gcc/config/i386/midipix.c') diff --git a/gcc/config/i386/midipix.c b/gcc/config/i386/midipix.c index b30448eb2..1dd2618e0 100644 --- a/gcc/config/i386/midipix.c +++ b/gcc/config/i386/midipix.c @@ -133,6 +133,9 @@ static void midipix_pe_create_got_entry(FILE * stream, const char * name, tree d { int visibility; + if (flag_assume_static_linking) + return; + const char * ptrsize = TARGET_64BIT ? winnt_ptrsize_quad : winnt_ptrsize_long; @@ -557,7 +560,7 @@ int midipix_symbol_ref_dllimport_p(rtx symbol) { tree decl = SYMBOL_REF_DECL(symbol); - if (!decl || !decl->base.public_flag) + if (!decl || !decl->base.public_flag || flag_assume_static_linking) return 0; return (decl->decl_with_vis.visibility == VISIBILITY_DEFAULT) @@ -578,7 +581,7 @@ bool midipix_asm_assemble_integer(rtx x, unsigned int size, int aligned_p) extern int flag_constructor_decl; /* filter out c++ constructors */ - if (flag_constructor_decl) + if (flag_constructor_decl || flag_assume_static_linking) return default_assemble_integer(x,size,aligned_p); /* xref, xoff */ @@ -601,7 +604,7 @@ bool midipix_asm_assemble_integer(rtx x, unsigned int size, int aligned_p) /* visibility */ visibility = falt && decl ? (decl->decl_with_vis.visibility == VISIBILITY_DEFAULT) - : VISIBILITY_DEFAULT); + : VISIBILITY_DEFAULT; /* defer? */ if (!falt || (visibility != VISIBILITY_DEFAULT)) -- cgit v1.2.3