--- ld/ldmain.c.mps Fri Nov 19 14:31:45 2004 +++ ld/ldmain.c Fri Nov 19 15:28:46 2004 @@ -361,6 +361,22 @@ einfo (_("%P%F: --relax and -r may not be used together\n")); if (link_info.shared) einfo (_("%P%F: -r and -shared may not be used together\n")); + else if (link_info.pie) + einfo (_("%P%F: -r and -pie may not be used together\n")); + } + + if (link_info.shared) + { + if (link_info.static_link) + einfo (_("%P%F: -static and -shared may not be used together\n")); + } + + if (link_info.pie) + { + if (link_info.shared) + einfo (_("%P%F: -shared and -pie may not be used together\n")); + if (link_info.static_link) + einfo (_("%P%F: -static and -pie may not be used together\n")); } if (! link_info.shared)