summaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/i386/midipix.c9
-rw-r--r--gcc/config/i386/midipix.opt4
2 files changed, 10 insertions, 3 deletions
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))
diff --git a/gcc/config/i386/midipix.opt b/gcc/config/i386/midipix.opt
index 3b6d4c235..9d171b0c5 100644
--- a/gcc/config/i386/midipix.opt
+++ b/gcc/config/i386/midipix.opt
@@ -27,6 +27,10 @@ mposix
Target
always join or create a posix session
+mstatic
+Target Report Var(flag_assume_static_linking)
+assume static linking, set the default visibility of all declarations to internal
+
mout-dsolib
Target
upon linking the dynamic library foo.so, generate an accompanying custom (.dsometa) import library foo.lib.a