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.cc12
1 files changed, 7 insertions, 5 deletions
diff --git a/gcc/cobol/gcobolspec.cc b/gcc/cobol/gcobolspec.cc
index 4ae8e2c..364c14c 100644
--- a/gcc/cobol/gcobolspec.cc
+++ b/gcc/cobol/gcobolspec.cc
@@ -116,8 +116,8 @@ add_arg_lib(const char *library, bool force_static ATTRIBUTE_UNUSED)
{
append_option (OPT_Wl_, LD_STATIC_OPTION, 1);
}
- append_option (OPT_l, library, 1);
#endif
+ append_option (OPT_l, library, 1);
#ifdef HAVE_LD_STATIC_DYNAMIC
if( force_static )
{
@@ -339,10 +339,8 @@ lang_specific_driver (struct cl_decoded_option **in_decoded_options,
break;
case OPT_static_libgcobol:
-#ifdef HAVE_LD_STATIC_DYNAMIC
static_libgcobol = true;
need_libgcobol = true;
-#endif
break;
case OPT_l:
@@ -548,7 +546,11 @@ lang_specific_driver (struct cl_decoded_option **in_decoded_options,
break;
case OPT_static_libgcobol:
- // Don't pass this one on to cobol1
+#if !defined (HAVE_LD_STATIC_DYNAMIC)
+ // Allow the target to use spec substitution.
+ append_arg(decoded_options[i]);
+#endif
+ // Else don't pass this one on to cobol1
break;
////#ifdef __x86_64__
@@ -598,7 +600,7 @@ lang_specific_driver (struct cl_decoded_option **in_decoded_options,
{
add_arg_lib(DL_LIBRARY, static_in_general);
}
- if( need_libstdc && static_in_general )
+ if( need_libstdc )
{
add_arg_lib(STDCPP_LIBRARY, static_in_general);
}