diff options
author | Andrew Cagney <cagney@redhat.com> | 1997-09-22 02:49:57 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 1997-09-22 02:49:57 +0000 |
commit | 794e9ac96aca71d2cb7683383bb445c3125d9660 (patch) | |
tree | 184c46e9b1a6aa36caa9beac96b3837845fb5f12 /sim/common/aclocal.m4 | |
parent | 6438209c609ad46dd1dc8a3cc967bfeb5e28686f (diff) | |
download | binutils-gdb-794e9ac96aca71d2cb7683383bb445c3125d9660.tar.gz |
Simplify logic behind the generic configuration option --enable-sim-alignment.
Diffstat (limited to 'sim/common/aclocal.m4')
-rw-r--r-- | sim/common/aclocal.m4 | 34 |
1 files changed, 25 insertions, 9 deletions
diff --git a/sim/common/aclocal.m4 b/sim/common/aclocal.m4 index d3e6843eacf..d05e8f813d7 100644 --- a/sim/common/aclocal.m4 +++ b/sim/common/aclocal.m4 @@ -211,13 +211,12 @@ dnl and SIM_AC_OUTPUT lines. dnl Specify the alignment restrictions of the target architecture. -dnl Without this option all possible alignment restrictions are accomidated. +dnl Without this option all possible alignment restrictions are accommodated. dnl arg[1] is hardwired target alignment dnl arg[2] is default target alignment AC_DEFUN(SIM_AC_OPTION_ALIGNMENT, -wire_alignment="ifelse([$2],,ifelse([$1],,,[$1]),[$2])" -default_alignment="ifelse([$2],,ifelse([$1],,,[$1]),[$2])" -default_sim_alignment="ifelse([$1],,ifelse([$2],,,-DWITH_DEFAULT_ALIGNMENT=[$2]),-DWITH_ALIGNMENT=[$1])" +wire_alignment="[$1]" +default_alignment="[$2]" [ AC_ARG_ENABLE(sim-alignment, [ --enable-sim-alignment=align Specify strict, nonstrict or forced alignment of memory accesses.], @@ -228,20 +227,37 @@ AC_ARG_ENABLE(sim-alignment, yes) if test x"$wire_alignment" != x; then sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}" else - echo "No hard-wired alignment for target $target" 1>&6 - sim_alignment="-DWITH_ALIGNMENT=0" + if test x"$default_alignment" != x; then + sim_alignment="-DWITH_ALIGNMENT=${default_alignment}" + else + echo "No hard-wired alignment for target $target" 1>&6 + sim_alignment="-DWITH_ALIGNMENT=0" + fi fi;; no) if test x"$default_alignment" != x; then sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}" else - echo "No default alignment for target $target" 1>&6 - sim_alignment="-DWITH_DEFAULT_ALIGNMENT=0" + if test x"$wire_alignment" != x; then + sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${wire_alignment}" + else + echo "No default alignment for target $target" 1>&6 + sim_alignment="-DWITH_DEFAULT_ALIGNMENT=0" + fi fi;; *) AC_MSG_ERROR("Unknown value $enableval passed to --enable-sim-alignment"); sim_alignment="";; esac if test x"$silent" != x"yes" && test x"$sim_alignment" != x""; then echo "Setting alignment flags = $sim_alignment" 6>&1 -fi],[sim_alignment="${default_sim_alignment}"])dnl +fi], +[if test x"$default_alignment" != x; then + sim_alignment="-DWITH_DEFAULT_ALIGNMENT=${default_alignment}" +else + if test x"$wire_alignment" != x; then + sim_alignment="-DWITH_ALIGNMENT=${wire_alignment}" + else + sim_alignment= + fi +fi])dnl AC_SUBST(sim_alignment) ])dnl |