aboutsummaryrefslogtreecommitdiff
path: root/gcc/cobol/gcobolspec.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cobol/gcobolspec.cc')
-rw-r--r--gcc/cobol/gcobolspec.cc13
1 files changed, 11 insertions, 2 deletions
diff --git a/gcc/cobol/gcobolspec.cc b/gcc/cobol/gcobolspec.cc
index 038aaec..1f1b463 100644
--- a/gcc/cobol/gcobolspec.cc
+++ b/gcc/cobol/gcobolspec.cc
@@ -470,7 +470,10 @@ lang_specific_driver (struct cl_decoded_option **in_decoded_options,
//// break;
////#endif
case OPT_static:
+#if defined (HAVE_LD_STATIC_DYNAMIC)
+ append_arg(decoded_options[i]);
static_in_general = true;
+#endif
break;
default:
@@ -498,17 +501,23 @@ lang_specific_driver (struct cl_decoded_option **in_decoded_options,
need_libgcobol = false;
}
+ if( static_in_general )
+ {
+ // These two options interfere with each other.
+ static_libgcobol = false;
+ }
+
if( need_libgcobol )
{
add_arg_lib(COBOL_LIBRARY, static_libgcobol);
}
if( need_libdl )
{
- add_arg_lib(DL_LIBRARY, static_in_general);
+ add_arg_lib(DL_LIBRARY, false);
}
if( need_libstdc )
{
- add_arg_lib(STDCPP_LIBRARY, static_in_general);
+ add_arg_lib(STDCPP_LIBRARY, false);
}
if( prior_main )