From patchwork Sun Jul 10 17:10:05 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 9222719 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 8368460890 for ; Sun, 10 Jul 2016 17:10:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6C81522F4A for ; Sun, 10 Jul 2016 17:10:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6044826929; Sun, 10 Jul 2016 17:10:39 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID 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 246182621E for ; Sun, 10 Jul 2016 17:10:36 +0000 (UTC) Received: from localhost ([::1]:56003 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMIFW-0000ov-7t for patchwork-qemu-devel@patchwork.kernel.org; Sun, 10 Jul 2016 13:10:34 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37207) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMIFA-0000nW-Fa for qemu-devel@nongnu.org; Sun, 10 Jul 2016 13:10:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bMIF7-0003Ow-L7 for qemu-devel@nongnu.org; Sun, 10 Jul 2016 13:10:11 -0400 Received: from mail-pa0-x242.google.com ([2607:f8b0:400e:c03::242]:36827) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMIF7-0003ON-Ag for qemu-devel@nongnu.org; Sun, 10 Jul 2016 13:10:09 -0400 Received: by mail-pa0-x242.google.com with SMTP id ib6so11447935pad.3 for ; Sun, 10 Jul 2016 10:10:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ioCMUCRWrcZRvtGFU1xJRbjhUTkLI8SuA94acTh1WPM=; b=laQ1LQ1351IwyD7j4Q2A1l+Etc6K5Jyc6fl35qH0haU6PFvto3opIipoAwLvLW7sDp 4ioQd3F0q59K90iTK7Fw4M2YXYLRiHfTrlk4Urltldv12/p0gyfn9nu3o6GrhAMGNzYw d9vaUaQ/jV0aezZ6DnpndnVR8sO/Divs6KywTTgWingghvx8I7mSFa6y0HX29IA9iSq3 pBIu8QeTaxUdcNAd4QxZ7BH0dQtTHp684mLVQPLE+PlOcQr45RL0qGY/c1iAouBs2F9D SDMdcTVW8rnZcE6aQb8xzGiuo/urQIjSWO+xqXqXYPGIpbVjD0s7mxJSLxScJ+4D9ISB ESQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=ioCMUCRWrcZRvtGFU1xJRbjhUTkLI8SuA94acTh1WPM=; b=FZBnhYNR/uDMIKn+bFQ+2ZW0U5jK11jVEkEHkSO/m/LHM3KTj0L5HyDGJIWl6rE7zt AEkB+hKiVPEG+UU+PjDrxcUUu2q5lh8TIp9bXseRXEPA4lIFYYdJwfqxwBVrNr1670gz tXps4cebAJntqzeeEuHxrMMafYQUSaUW2tzho9ls9ofqcXWl5P3Jb58OFPRvsBEkGlHx UV1QLU8ZbPypctqFVURozytwWcWsPbd7glsAqNRztFlzY7eBh1WrsrySLeRBs/PNGz41 76FjCmD0bUu2L5wyXZLyAghYO4kJBph8y/+wBWwEQMcil0uoXileIGkvL/Mx+2X3F9Gh tn2A== X-Gm-Message-State: ALyK8tK7Q3eJgcwr0So1+WmEY9o3z1fBJKv20qSabkle+t90AUK0xVIu27T2z7mhlIuv+g== X-Received: by 10.66.51.137 with SMTP id k9mr27797964pao.49.1468170608704; Sun, 10 Jul 2016 10:10:08 -0700 (PDT) Received: from bigtime.twiddle.net (71-37-54-227.tukw.qwest.net. [71.37.54.227]) by smtp.gmail.com with ESMTPSA id o6sm4283886pab.11.2016.07.10.10.10.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 10 Jul 2016 10:10:08 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Sun, 10 Jul 2016 10:10:05 -0700 Message-Id: <1468170605-13725-3-git-send-email-rth@twiddle.net> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1468170605-13725-1-git-send-email-rth@twiddle.net> References: <1468170605-13725-1-git-send-email-rth@twiddle.net> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400e:c03::242 Subject: [Qemu-devel] [PULL 2/2] build: Use $(AS) for optionrom explicitly 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: peter.maydell@linaro.org Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP For clang before 3.5, -fno-integrated-as does not exist, so the workaround in 5f6f0e27fb24 fails to build. Use clang's default assembler for linux-user/safe-syscall.S, and explicitly change to use the system assembler for the option roms. Tested-by: Alex Bennée Reviewed-by: Alex Bennée Signed-off-by: Richard Henderson --- configure | 10 +++------- pc-bios/optionrom/Makefile | 3 +++ rules.mak | 2 +- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/configure b/configure index e9090a0..5ada56d 100755 --- a/configure +++ b/configure @@ -368,6 +368,7 @@ else fi ar="${AR-${cross_prefix}ar}" +as="${AS-${cross_prefix}as}" ccas="${CCAS-$cc}" cpp="${CPP-$cc -E}" objcopy="${OBJCOPY-${cross_prefix}objcopy}" @@ -4490,13 +4491,6 @@ if test "$fortify_source" != "no"; then fi fi -################################################# -# clang does not support the 16-bit assembly for roms - -if echo | $ccas -dM -E - | grep __clang__ > /dev/null 2>&1 ; then - ccas="$ccas -fno-integrated-as" -fi - ########################################## # check if struct fsxattr is available via linux/fs.h @@ -5515,6 +5509,7 @@ echo "CXX=$cxx" >> $config_host_mak echo "OBJCC=$objcc" >> $config_host_mak echo "AR=$ar" >> $config_host_mak echo "ARFLAGS=$ARFLAGS" >> $config_host_mak +echo "AS=$as" >> $config_host_mak echo "CCAS=$ccas" >> $config_host_mak echo "CPP=$cpp" >> $config_host_mak echo "OBJCOPY=$objcopy" >> $config_host_mak @@ -5988,6 +5983,7 @@ for rom in seabios vgabios ; do config_mak=roms/$rom/config.mak echo "# Automatically generated by configure - do not modify" > $config_mak echo "SRC_PATH=$source_path/roms/$rom" >> $config_mak + echo "AS=$as" >> $config_mak echo "CCAS=$ccas" >> $config_mak echo "CC=$cc" >> $config_mak echo "BCC=bcc" >> $config_mak diff --git a/pc-bios/optionrom/Makefile b/pc-bios/optionrom/Makefile index ce4852a..2cdda87 100644 --- a/pc-bios/optionrom/Makefile +++ b/pc-bios/optionrom/Makefile @@ -20,6 +20,9 @@ build-all: multiboot.bin linuxboot.bin kvmvapic.bin # suppress auto-removal of intermediate files .SECONDARY: +%.o: %.S + $(call quiet-command,$(CPP) $(QEMU_INCLUDES) $(QEMU_DGFLAGS) $(CFLAGS) -c -o - $< | $(AS) $(ASFLAGS) -o $@," AS $(TARGET_DIR)$@") + %.img: %.o $(call quiet-command,$(LD) $(LDFLAGS_NOPIE) -Ttext 0 -e _start -s -o $@ $<," Building $(TARGET_DIR)$@") diff --git a/rules.mak b/rules.mak index 7d7d83b..ed8e482 100644 --- a/rules.mak +++ b/rules.mak @@ -69,7 +69,7 @@ LINK = $(call quiet-command, $(LINKPROG) $(QEMU_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $(version-obj-y) $(call extract-libs,$1) $(LIBS)," LINK $(TARGET_DIR)$@") %.o: %.S - $(call quiet-command,$(CCAS) $(QEMU_INCLUDES) $(QEMU_CFLAGS) $(QEMU_DGFLAGS) $(CFLAGS) -c -o $@ $<," AS $(TARGET_DIR)$@") + $(call quiet-command,$(CCAS) $(QEMU_INCLUDES) $(QEMU_CFLAGS) $(QEMU_DGFLAGS) $(CFLAGS) -c -o $@ $<," CCAS $(TARGET_DIR)$@") %.o: %.cc $(call quiet-command,$(CXX) $(QEMU_INCLUDES) $(QEMU_CXXFLAGS) $(QEMU_DGFLAGS) $(CFLAGS) $($@-cflags) -c -o $@ $<," CXX $(TARGET_DIR)$@")