From 15ce95c40c4fa1bb224c5823c15b69bcb40da983 Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Sun, 22 Sep 2013 03:26:11 +0200 Subject: [PATCH] * configure.ac: On FreeBSD use -melf_*_fbsd format. --- ChangeLog | 4 ++++ configure.ac | 28 ++++++++++++++++++++-------- 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index c9de2e698..356fc8e20 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2013-09-22 Vladimir Serbinenko + + * configure.ac: On FreeBSD use -melf_*_fbsd format. + 2013-09-21 Ales Nesrsta * grub-core/bus/usb/ehci.c: Correceted EHCI QH handling (async./sync.) diff --git a/configure.ac b/configure.ac index 457aafa45..e6ad049f1 100644 --- a/configure.ac +++ b/configure.ac @@ -633,14 +633,26 @@ if test "x$target_m64" = x1; then TARGET_MODULE_FORMAT="elf64" fi -if test x"$target_os" != xcygwin; then - if test x"$target_cpu" = xi386; then - TARGET_LDFLAGS="$TARGET_LDFLAGS -Wl,-melf_i386" - fi - if test x"$target_cpu" = xx86_64; then - TARGET_LDFLAGS="$TARGET_LDFLAGS -Wl,-melf_x86_64" - fi -fi +case "$target_os" in + cygwin) + ;; + freebsd) + if test x"$target_cpu" = xi386; then + TARGET_LDFLAGS="$TARGET_LDFLAGS -Wl,-melf_i386_fbsd" + fi + if test x"$target_cpu" = xx86_64; then + TARGET_LDFLAGS="$TARGET_LDFLAGS -Wl,-melf_x86_64_fbsd" + fi + ;; + *) + if test x"$target_cpu" = xi386; then + TARGET_LDFLAGS="$TARGET_LDFLAGS -Wl,-melf_i386" + fi + if test x"$target_cpu" = xx86_64; then + TARGET_LDFLAGS="$TARGET_LDFLAGS -Wl,-melf_x86_64" + fi + ;; +esac if test "$target_cpu" = x86_64; then # Use large model to support 4G memory