summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2019-02-23 00:52:50 -0500
committermidipix <writeonce@midipix.org>2019-02-23 12:53:51 -0500
commit1627c6bcd7dbacaa5e781a2042f8eade55bd6634 (patch)
tree1b9e914935d7548cbf056871181d414c66668f8a /gcc
parentbda112ee7a425643fbf9141f2857c58f776b209c (diff)
downloadcbb-gcc-4.6.4-1627c6bcd7dbacaa5e781a2042f8eade55bd6634.tar.bz2
cbb-gcc-4.6.4-1627c6bcd7dbacaa5e781a2042f8eade55bd6634.tar.xz
midipix targets: added -mstatic (assume static linking).
Diffstat (limited to 'gcc')
-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