diff options
author | Richard Henderson <rth@twiddle.net> | 2016-06-23 10:39:18 -0700 |
---|---|---|
committer | Richard Henderson <rth@twiddle.net> | 2016-07-05 20:50:11 -0700 |
commit | 5f6f0e27fb242fe985591b16ad604ac52822a0dd (patch) | |
tree | 43a90cb961dc1b5840958532de22bd699e7c1629 /configure | |
parent | 791b7d2340cfafcac9af7864343cf23504d57804 (diff) | |
download | qemu-5f6f0e27fb242fe985591b16ad604ac52822a0dd.tar.gz qemu-5f6f0e27fb242fe985591b16ad604ac52822a0dd.tar.bz2 qemu-5f6f0e27fb242fe985591b16ad604ac52822a0dd.zip |
build: Use $(CCAS) for compiling .S files
We fail to pass to $(AS) all of the different flags that may be required
for a given set of CFLAGS. Rather than figuring out the host-specific
mapping, it's better to allow the compiler driver to do that.
However, simply using $(CC) runs afoul of clang trying to build the
option roms. C.f. 3dd46c78525a30e98c68, wherein we changed from
using $(CC) to using $(AS) in the first place.
Work around this by passing -fno-integrated-as to clang, so that we use
the external assembler, and the clang driver still passes along all of
the options that the assembler might require.
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <rth@twiddle.net>
Message-Id: <1466703558-7723-1-git-send-email-rth@twiddle.net>
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 13 |
1 files changed, 10 insertions, 3 deletions
@@ -368,7 +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}" ld="${LD-${cross_prefix}ld}" @@ -4490,6 +4490,13 @@ 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 @@ -5508,7 +5515,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 echo "LD=$ld" >> $config_host_mak @@ -5981,7 +5988,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 echo "CPP=$cpp" >> $config_mak |