aboutsummaryrefslogtreecommitdiff
path: root/ld/configure.ac
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2015-04-08 04:55:07 -0700
committerH.J. Lu <hjl.tools@gmail.com>2015-04-08 04:55:23 -0700
commitc58212eaf957ef39484ed71316074fd8366e9c4a (patch)
tree9ae83a3ffcd15b0661e03f89269f059f91910682 /ld/configure.ac
parent4496bed7f346afbb2f2b4f939373920a4d69da11 (diff)
downloadgdb-c58212eaf957ef39484ed71316074fd8366e9c4a.zip
gdb-c58212eaf957ef39484ed71316074fd8366e9c4a.tar.gz
gdb-c58212eaf957ef39484ed71316074fd8366e9c4a.tar.bz2
Add ld_list_options
This patch adds ld_list_options for ELF targets to avoid duplicated outputs from ld --help. * Makefile.am (ELF_CLFAGS): New. (AM_CFLAGS): Add $(ELF_CLFAGS). * configure.ac (elf_list_options): New. AC_SUBST. (elf_shlib_list_options): Likewise. (elf_plt_unwind_list_options): Likewise. * lexsup.c (elf_shlib_list_options): New. (elf_static_list_options): Likewise. (elf_plt_unwind_list_options): Likewise. (ld_list_options): Likewise. (help): Call ld_list_options. * Makefile.in: Regenerated. * configure: Likewise. * emulparams/plt_unwind.sh (PLT_UNWIND): New. (PARSE_AND_LIST_OPTIONS): Removed. * emultempl/elf32.em (gld_list_options): New. (gld${EMULATION_NAME}_list_options): Define only if BNDPLT or PARSE_AND_LIST_OPTIONS is defined. (ld_${EMULATION_NAME}_emulation): Replace gld${EMULATION_NAME}_list_options with ${gld_list_options.
Diffstat (limited to 'ld/configure.ac')
-rw-r--r--ld/configure.ac21
1 files changed, 20 insertions, 1 deletions
diff --git a/ld/configure.ac b/ld/configure.ac
index a885b7b..572440c 100644
--- a/ld/configure.ac
+++ b/ld/configure.ac
@@ -281,6 +281,9 @@ if test x${want64} = xfalse; then
fi
fi
+elf_list_options=FALSE
+elf_shlib_list_options=FALSE
+elf_plt_unwind_list_options=FALSE
for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
do
if test "$targ_alias" = "all"; then
@@ -311,7 +314,20 @@ do
for i in $targ_emul $targ_extra_emuls $targ_extra_libpath; do
case " $all_emuls " in
- *" e${i}.o "*) ;;
+ *" e${i}.o "*)
+ case "${i}" in
+ *elf*)
+ elf_list_options=TRUE
+ . ${srcdir}/emulparams/${i}.sh
+ if test x${GENERATE_SHLIB_SCRIPT} = xyes; then
+ elf_shlib_list_options=TRUE
+ fi
+ if test x${PLT_UNWIND} = xyes; then
+ elf_plt_unwind_list_options=TRUE
+ fi
+ ;;
+ esac
+ ;;
*)
all_emuls="$all_emuls e${i}.o"
eval result=\$tdir_$i
@@ -346,6 +362,9 @@ do
fi
done
+AC_SUBST(elf_list_options)
+AC_SUBST(elf_shlib_list_options)
+AC_SUBST(elf_plt_unwind_list_options)
AC_SUBST(EMUL)
TDIRS=tdirs