summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Henderson2016-07-08 06:49:36 +0200
committerRichard Henderson2016-07-10 19:05:46 +0200
commitcdbd727c20ad7aac7797dc8c95e485e1a4c6901b (patch)
tree31cfc311911c1ba23ce44fde29aa68445b7fd75b
parentlinux-user: Fix i386 safe-syscall.S (diff)
downloadqemu-cdbd727c20ad7aac7797dc8c95e485e1a4c6901b.tar.gz
qemu-cdbd727c20ad7aac7797dc8c95e485e1a4c6901b.tar.xz
qemu-cdbd727c20ad7aac7797dc8c95e485e1a4c6901b.zip
build: Use $(AS) for optionrom explicitly
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 <alex.bennee@linaro.org> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Richard Henderson <rth@twiddle.net>
-rwxr-xr-xconfigure10
-rw-r--r--pc-bios/optionrom/Makefile3
-rw-r--r--rules.mak2
3 files changed, 7 insertions, 8 deletions
diff --git a/configure b/configure
index e9090a0d29..5ada56d984 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 ce4852a4d5..2cdda87f0e 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 7d7d83b124..ed8e482780 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)$@")