From 57e6abd2770d71f8f9dd3bd29befc19ccc2e8ad1 Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Thu, 24 May 2001 02:44:06 +0000 Subject: [PATCH] * emultempl/elf32.em (ELF_INTERPRETER_SET_DEFAULT): Use this new variable to avoid non-portable shell construct. --- ld/ChangeLog | 5 +++++ ld/emultempl/elf32.em | 22 +++++++++++++--------- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/ld/ChangeLog b/ld/ChangeLog index d5f5eb5..80be489 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,8 @@ +2001-05-23 Alexandre Oliva + + * emultempl/elf32.em (ELF_INTERPRETER_SET_DEFAULT): Use this new + variable to avoid non-portable shell construct. + 2001-05-23 Thiemo Seufer * ldmain.c (get_emulation): Add -mips5 command line argument. diff --git a/ld/emultempl/elf32.em b/ld/emultempl/elf32.em index 0b38c1f..c5ffe14 100644 --- a/ld/emultempl/elf32.em +++ b/ld/emultempl/elf32.em @@ -789,6 +789,18 @@ gld${EMULATION_NAME}_find_statement_assignment (s) EOF if test x"$LDEMUL_BEFORE_ALLOCATION" != xgld"$EMULATION_NAME"_before_allocation; then + if test x"${ELF_INTERPRETER_NAME+set}" = xset; then + ELF_INTERPRETER_SET_DEFAULT=" + if (sinterp != NULL) + { + sinterp->contents = ${ELF_INTERPRETER_NAME}; + sinterp->_raw_size = strlen (sinterp->contents) + 1; + } + +" + else + ELF_INTERPRETER_SET_DEFAULT= + fi cat >>e${EMULATION_NAME}.c <contents = ${ELF_INTERPRETER_NAME}; - sinterp->_raw_size = strlen (sinterp->contents) + 1; - } - -"} +${ELF_INTERPRETER_SET_DEFAULT} /* Let the user override the dynamic linker we are using. */ if (command_line.interpreter != NULL && sinterp != NULL) -- 2.7.4