aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorIain Sandoe <iain@sandoe.co.uk>2025-03-16 10:31:44 +0000
committerIain Sandoe <iain@sandoe.co.uk>2025-03-18 20:05:27 +0000
commit57d1424efe934caeda222174a3e8bbc1e5ba65f4 (patch)
tree088106a33337ed85781e80bfad578e35c719b1ef /gcc
parent544a9d9e49a1ff1d031cf9c85518f7c95179834a (diff)
downloadgcc-57d1424efe934caeda222174a3e8bbc1e5ba65f4.zip
gcc-57d1424efe934caeda222174a3e8bbc1e5ba65f4.tar.gz
gcc-57d1424efe934caeda222174a3e8bbc1e5ba65f4.tar.bz2
cobol: Remove dead code from the driver.
EXEC_LIB is no longer defined anywhere, so that the dependent code is now dead. The rpath code (if required) would need to be conditional since rpath support is not available on all hosts. Remove now and then address if/when it is needed (other drivers do not do this). gcc/cobol/ChangeLog: * gcobolspec.cc (append_rpath): Remove. (lang_specific_driver): Remove hard-wired rpath and library names. Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cobol/gcobolspec.cc38
1 files changed, 1 insertions, 37 deletions
diff --git a/gcc/cobol/gcobolspec.cc b/gcc/cobol/gcobolspec.cc
index 5bd6853..4ae8e2c 100644
--- a/gcc/cobol/gcobolspec.cc
+++ b/gcc/cobol/gcobolspec.cc
@@ -141,21 +141,6 @@ append_rdynamic()
}
static void
-append_rpath()
- {
-#ifdef EXEC_LIB
- // Handing append_option() something on the stack Just Doesn't Work
- if( strlen(EXEC_LIB) )
- {
- static char ach[256];
- snprintf(ach, sizeof(ach), "-rpath=%s", EXEC_LIB);
- append_option (OPT_Wl_, ach, 1);
- }
-#endif
- return;
- }
-
-static void
append_allow_multiple_definition()
{
append_option (OPT_Wl_, "--allow-multiple-definition", 1);
@@ -250,9 +235,6 @@ lang_specific_driver (struct cl_decoded_option **in_decoded_options,
int index_libgcobol_a = 0;
- // This is for the -Wl,-rpath=<EXEC_LIB>
- bool need_rpath = true;
-
bool no_files_error = true;
#ifdef NOISY
@@ -339,16 +321,6 @@ lang_specific_driver (struct cl_decoded_option **in_decoded_options,
{
need_allow_multiple_definition = false;
}
- if( strstr(decoded_options[i].orig_option_with_args_text, "-rpath") )
- {
- // The caller is doing something with -rpath. Assume they know what
- // they are doing
-
- // On second thought, always install our rpath. It goes at the end,
- // so if the user specifies and rpath that they prefer, it'll get
- // taken first.
- need_rpath = true;
- }
break;
case OPT_nostdlib:
@@ -616,12 +588,9 @@ lang_specific_driver (struct cl_decoded_option **in_decoded_options,
if( need_libgcobol )
{
-#ifdef EXEC_LIB
- append_option(OPT_L, EXEC_LIB, 1);
-#endif
add_arg_lib(COBOL_LIBRARY, static_libgcobol);
}
- if( need_libmath )
+ if( need_libmath)
{
add_arg_lib(MATH_LIBRARY, static_in_general);
}
@@ -649,11 +618,6 @@ lang_specific_driver (struct cl_decoded_option **in_decoded_options,
append_allow_multiple_definition();
}
- if( need_rpath && (n_infiles || n_outfiles) )
- {
- append_rpath();
- }
-
if( prior_main )
{
char ach[] = "\"-main\" without a source file";