リビジョン | cdbd727c20ad7aac7797dc8c95e485e1a4c6901b (tree) |
---|---|
日時 | 2016-07-11 02:05:46 |
作者 | Richard Henderson <rth@twid...> |
コミッター | Richard Henderson |
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>
@@ -368,6 +368,7 @@ else | ||
368 | 368 | fi |
369 | 369 | |
370 | 370 | ar="${AR-${cross_prefix}ar}" |
371 | +as="${AS-${cross_prefix}as}" | |
371 | 372 | ccas="${CCAS-$cc}" |
372 | 373 | cpp="${CPP-$cc -E}" |
373 | 374 | objcopy="${OBJCOPY-${cross_prefix}objcopy}" |
@@ -4490,13 +4491,6 @@ if test "$fortify_source" != "no"; then | ||
4490 | 4491 | fi |
4491 | 4492 | fi |
4492 | 4493 | |
4493 | -################################################# | |
4494 | -# clang does not support the 16-bit assembly for roms | |
4495 | - | |
4496 | -if echo | $ccas -dM -E - | grep __clang__ > /dev/null 2>&1 ; then | |
4497 | - ccas="$ccas -fno-integrated-as" | |
4498 | -fi | |
4499 | - | |
4500 | 4494 | ########################################## |
4501 | 4495 | # check if struct fsxattr is available via linux/fs.h |
4502 | 4496 |
@@ -5515,6 +5509,7 @@ echo "CXX=$cxx" >> $config_host_mak | ||
5515 | 5509 | echo "OBJCC=$objcc" >> $config_host_mak |
5516 | 5510 | echo "AR=$ar" >> $config_host_mak |
5517 | 5511 | echo "ARFLAGS=$ARFLAGS" >> $config_host_mak |
5512 | +echo "AS=$as" >> $config_host_mak | |
5518 | 5513 | echo "CCAS=$ccas" >> $config_host_mak |
5519 | 5514 | echo "CPP=$cpp" >> $config_host_mak |
5520 | 5515 | echo "OBJCOPY=$objcopy" >> $config_host_mak |
@@ -5988,6 +5983,7 @@ for rom in seabios vgabios ; do | ||
5988 | 5983 | config_mak=roms/$rom/config.mak |
5989 | 5984 | echo "# Automatically generated by configure - do not modify" > $config_mak |
5990 | 5985 | echo "SRC_PATH=$source_path/roms/$rom" >> $config_mak |
5986 | + echo "AS=$as" >> $config_mak | |
5991 | 5987 | echo "CCAS=$ccas" >> $config_mak |
5992 | 5988 | echo "CC=$cc" >> $config_mak |
5993 | 5989 | echo "BCC=bcc" >> $config_mak |
@@ -20,6 +20,9 @@ build-all: multiboot.bin linuxboot.bin kvmvapic.bin | ||
20 | 20 | # suppress auto-removal of intermediate files |
21 | 21 | .SECONDARY: |
22 | 22 | |
23 | +%.o: %.S | |
24 | + $(call quiet-command,$(CPP) $(QEMU_INCLUDES) $(QEMU_DGFLAGS) $(CFLAGS) -c -o - $< | $(AS) $(ASFLAGS) -o $@," AS $(TARGET_DIR)$@") | |
25 | + | |
23 | 26 | %.img: %.o |
24 | 27 | $(call quiet-command,$(LD) $(LDFLAGS_NOPIE) -Ttext 0 -e _start -s -o $@ $<," Building $(TARGET_DIR)$@") |
25 | 28 |
@@ -69,7 +69,7 @@ LINK = $(call quiet-command, $(LINKPROG) $(QEMU_CFLAGS) $(CFLAGS) $(LDFLAGS) -o | ||
69 | 69 | $(version-obj-y) $(call extract-libs,$1) $(LIBS)," LINK $(TARGET_DIR)$@") |
70 | 70 | |
71 | 71 | %.o: %.S |
72 | - $(call quiet-command,$(CCAS) $(QEMU_INCLUDES) $(QEMU_CFLAGS) $(QEMU_DGFLAGS) $(CFLAGS) -c -o $@ $<," AS $(TARGET_DIR)$@") | |
72 | + $(call quiet-command,$(CCAS) $(QEMU_INCLUDES) $(QEMU_CFLAGS) $(QEMU_DGFLAGS) $(CFLAGS) -c -o $@ $<," CCAS $(TARGET_DIR)$@") | |
73 | 73 | |
74 | 74 | %.o: %.cc |
75 | 75 | $(call quiet-command,$(CXX) $(QEMU_INCLUDES) $(QEMU_CXXFLAGS) $(QEMU_DGFLAGS) $(CFLAGS) $($@-cflags) -c -o $@ $<," CXX $(TARGET_DIR)$@") |