- if test x$cpu_x86_64 = xtrue; then
- SILC_ASSEMBLER="$NASM -O2 -felf64"
- else
- SILC_ASSEMBLER="$NASM -O2 -felf"
- fi
+ case "$target" in
+ *-*-*darwin*)
+ if test x$cpu_x86_64 = xtrue; then
+ SILC_ASSEMBLER="$NASM -O2 -fmacho64"
+ else
+ SILC_ASSEMBLER="$NASM -O2 -fmacho"
+ fi
+ ;;
+ *)
+ if test x$cpu_x86_64 = xtrue; then
+ SILC_ASSEMBLER="$NASM -O2 -felf64"
+ else
+ SILC_ASSEMBLER="$NASM -O2 -felf"
+ fi
+ ;;
+ esac