From patchwork Mon Jul 25 19:08:42 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Bruno X-Patchwork-Id: 9246343 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D1A65607F2 for ; Mon, 25 Jul 2016 19:09:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C28BB209CD for ; Mon, 25 Jul 2016 19:09:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B7466252D2; Mon, 25 Jul 2016 19:09:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5BD67209CD for ; Mon, 25 Jul 2016 19:09:22 +0000 (UTC) Received: from localhost ([::1]:34651 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bRlFh-0005n9-FI for patchwork-qemu-devel@patchwork.kernel.org; Mon, 25 Jul 2016 15:09:21 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36608) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bRlFH-0005lN-FN for qemu-devel@nongnu.org; Mon, 25 Jul 2016 15:08:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bRlFB-0000x1-E4 for qemu-devel@nongnu.org; Mon, 25 Jul 2016 15:08:54 -0400 Received: from ignoranthack.me ([199.102.79.106]:55943 helo=mail.ignoranthack.me) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bRlFB-0000ws-86 for qemu-devel@nongnu.org; Mon, 25 Jul 2016 15:08:49 -0400 Received: from bruno.llnw.corp.root (67-0-51-151.albq.qwest.net [67.0.51.151]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: sbruno@ignoranthack.me) by mail.ignoranthack.me (Postfix) with ESMTPSA id 6D3FC192928; Mon, 25 Jul 2016 19:08:46 +0000 (UTC) From: Sean Bruno To: qemu-devel@nongnu.org Date: Mon, 25 Jul 2016 13:08:42 -0600 Message-Id: <20160725190842.2348-1-sbruno@freebsd.org> X-Mailer: git-send-email 2.8.4 X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x [fuzzy] X-Received-From: 199.102.79.106 Subject: [Qemu-devel] [PATCH v2] Unbreak FreeBSD build after optionrom update. X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: pbonzini@redhat.com, markmb@redhat.com, rjones@redhat.com, Sean Bruno Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Update the build flags appropriately for FreeBSD and add the correct LD_EMULATION type for the FreeBSD build case. Signed-off-by: Sean Bruno --- pc-bios/optionrom/Makefile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pc-bios/optionrom/Makefile b/pc-bios/optionrom/Makefile index d88ce11..5cf7c93 100644 --- a/pc-bios/optionrom/Makefile +++ b/pc-bios/optionrom/Makefile @@ -28,7 +28,11 @@ endif CFLAGS := $(filter -O% -g%, $(CFLAGS)) QEMU_INCLUDES += -I$(SRC_PATH) +ifdef CONFIG_BSD +Wa = -Wa +else Wa = -Wa, +endif ASFLAGS += -32 QEMU_CFLAGS += $(call cc-option, $(QEMU_CFLAGS), $(Wa)-32) @@ -44,8 +48,12 @@ build-all: multiboot.bin linuxboot.bin linuxboot_dma.bin kvmvapic.bin ifdef CONFIG_WIN32 LD_EMULATION = i386pe else +ifdef CONFIG_BSD +LD_EMULATION = elf_i386_fbsd +else LD_EMULATION = elf_i386 endif +endif %.img: %.o $(call quiet-command,$(LD) $(LDFLAGS_NOPIE) -m $(LD_EMULATION) -Ttext 0 -e _start -s -o $@ $<," Building $(TARGET_DIR)$@")