All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Henderson <rth@twiddle.net>
To: "Alex Bennée" <alex.bennee@linaro.org>
Cc: qemu-devel@nongnu.org, peter.maydell@linaro.org
Subject: Re: [Qemu-devel] [PULL v2 1/4] build: Use $(CCAS) for compiling .S files
Date: Thu, 7 Jul 2016 19:30:43 -0700	[thread overview]
Message-ID: <2c3bbb2d-d91a-251f-3d15-79d9f47dcaae@twiddle.net> (raw)
In-Reply-To: <87a8htmnj5.fsf@linaro.org>

[-- Attachment #1: Type: text/plain, Size: 662 bytes --]

On 07/07/2016 09:16 AM, Alex Bennée wrote:
>> +if echo | $ccas -dM -E - | grep __clang__ > /dev/null 2>&1 ; then
>> +  ccas="$ccas -fno-integrated-as"
>> +fi
>
> Hi Richard,
>
> This looks like it breaks the Travis clang:
>
>     https://travis-ci.org/qemu/qemu/builds/142825178
>
> We get the error:
>
>     AS    optionrom/multiboot.o
>     clang: error: unknown argument: '-fno-integrated-as'
>     make[1]: *** [multiboot.o] Error 1
>     make: *** [romsubdir-optionrom] Error 2
>     make: *** Waiting for unfinished jobs....
>
> Clang in Travis is:
>
>     clang version 3.4 (tags/RELEASE_34/final)

Please try this.  It works here for clang 3.9.


r~




[-- Attachment #2: z --]
[-- Type: text/plain, Size: 2641 bytes --]

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)$@")

  parent reply	other threads:[~2016-07-08  2:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-06 16:18 [Qemu-devel] [PULL v2 0/4] tcg-ish updates Richard Henderson
2016-07-06 16:18 ` [Qemu-devel] [PULL v2 1/4] build: Use $(CCAS) for compiling .S files Richard Henderson
2016-07-07 16:16   ` Alex Bennée
2016-07-07 16:29     ` Richard Henderson
2016-07-07 16:32       ` Peter Maydell
2016-07-08  2:30     ` Richard Henderson [this message]
2016-07-06 16:18 ` [Qemu-devel] [PULL v2 2/4] tcg: Fix name for high-half register Richard Henderson
2016-07-06 16:18 ` [Qemu-devel] [PULL v2 3/4] tcg: Optimize spills of constants Richard Henderson
2016-07-06 16:18 ` [Qemu-devel] [PULL v2 4/4] tcg: Improve the alignment check infrastructure Richard Henderson
2016-07-07  9:28 ` [Qemu-devel] [PULL v2 0/4] tcg-ish updates Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2c3bbb2d-d91a-251f-3d15-79d9f47dcaae@twiddle.net \
    --to=rth@twiddle.net \
    --cc=alex.bennee@linaro.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.