summaryrefslogtreecommitdiff
path: root/ld/ldmain.c
diff options
context:
space:
mode:
Diffstat (limited to 'ld/ldmain.c')
-rw-r--r--ld/ldmain.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ld/ldmain.c b/ld/ldmain.c
index 04672f3b5d..ca532515a4 100644
--- a/ld/ldmain.c
+++ b/ld/ldmain.c
@@ -370,6 +370,9 @@ main (int argc, char **argv)
einfo (_("%P%F: -r and -shared may not be used together\n"));
}
+ if (!config.dynamic_link && link_info.shared)
+ einfo (_("%P%F: -static and -shared may not be used together\n"));
+
if (! link_info.shared)
{
if (command_line.filter_shlib)