diff options
Diffstat (limited to 'ld/ldmain.c')
-rw-r--r-- | ld/ldmain.c | 3 |
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) |