On 23 June 2016 at 18:39, Richard Henderson <r...@twiddle.net> wrote:
> 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.
>
> Signed-off-by: Richard Henderson <r...@twiddle.net>

> +#################################################
> +# 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

It would be neater to directly check whether assembling
the relevant constructs worked rather than just looking
for __clang__, but this works I guess.

Reviewed-by: Peter Maydell <peter.mayd...@linaro.org>

thanks
-- PMM

Reply via email to