Eric Farman <[email protected]> writes:

> On 9/4/26 8:45 AM, Alex Bennée wrote:
>> From: Pierrick Bouvier <[email protected]>
>> We have now implemented the same in meson directly, so no need to
>> keep
>> it on configure side. Also, we have no more Makefile consumers, so we
>> don't need to export all those variables anymore.
>
> (Thanks, Josh, for the bisect work that led to blaming this commit...)
>
> ...snip...
>
>> @@ -1659,48 +1299,6 @@ fi
>>     echo "# Automatically generated by configure - do not modify" >
>> Makefile.prereqs
>>   -# Mac OS X ships with a broken assembler
>> -if have_target i386-softmmu x86_64-softmmu && \
>> -        test "$host_os" != "darwin" && test "$host_os" != "sunos" && \
>> -        test "$host_os" != "haiku" && \
>> -        probe_target_compiler i386-softmmu; then
>> -    subdirs="$subdirs pc-bios/optionrom"
>> -    config_mak=pc-bios/optionrom/config.mak
>> -    echo "# Automatically generated by configure - do not modify" > 
>> $config_mak
>> -    echo "TOPSRC_DIR=$source_path" >> $config_mak
>> -    write_target_makefile >> $config_mak
>> -fi
>> -
>> -if have_target ppc-softmmu ppc64-softmmu && \
>> -        probe_target_compiler ppc-softmmu; then
>> -    subdirs="$subdirs pc-bios/vof"
>> -    config_mak=pc-bios/vof/config.mak
>> -    echo "# Automatically generated by configure - do not modify" > 
>> $config_mak
>> -    echo "SRC_DIR=$source_path/pc-bios/vof" >> $config_mak
>> -    write_target_makefile >> $config_mak
>> -fi
>> -
>> -# Only build s390-ccw bios if the compiler has -march=z900 or -march=z10
>> -# (which is the lowest architecture level that Clang supports)
>> -if have_target s390x-softmmu && probe_target_compiler s390x-softmmu && \
>> -    GIT=git "$source_path/scripts/git-submodule.sh" 
>> "$git_submodules_action" roms/SLOF >> config.log 2>&1; then
>> -  write_c_skeleton
>> -  do_compiler "$target_cc" $target_cc_cflags -march=z900 -o $TMPO -c $TMPC
>> -  has_z900=$?
>> -  if [ $has_z900 = 0 ] || do_compiler "$target_cc" $target_cc_cflags 
>> -march=z10 -msoft-float -Werror -o $TMPO -c $TMPC; then
>> -    if [ $has_z900 != 0 ]; then
>> -      echo "WARNING: Your compiler does not support the z900!"
>> -      echo "         The s390-ccw bios will only work with guest CPUs >= 
>> z10."
>> -    fi
>> -    subdirs="$subdirs pc-bios/s390-ccw"
>> -    config_mak=pc-bios/s390-ccw/config-host.mak
>> -    echo "# Automatically generated by configure - do not modify" > 
>> $config_mak
>> -    echo "SRC_PATH=$source_path/pc-bios/s390-ccw" >> $config_mak
>> -    echo "GIT_SUBMODULES_ACTION=$git_submodules_action" >> $config_mak
>> -    write_target_makefile >> $config_mak
>> -  fi
>> -fi
>> -
>
> Now we're unable to build the s390 bios used for boot (no idea about
> the state of the other items in pc-bios that were removed here too).
> Surely reverting this hunk (and its dependencies) won't be great based
> on the size of this pull request, so what's the preferred solution
> here?

Thanks for pointing this out. I hadn't noticed the issue as I guess we
don't build firmware in the CI. That said on my current tree:

 cd /home/alex/lsrc/qemu.git/builds/all/pc-bios/s390-ccw
 make
 -Wno-stringop-overflow detected
 -fno-stack-protector detected
 -Wno-array-bounds detected
 -Wno-gnu detected
 -march=z900 detected
 Assembling start.o
 Compiling main.o
 Compiling bootmap.o
 Compiling jump2ipl.o
 Compiling sclp.o
 Compiling menu.o
 Compiling netmain.o
 Compiling virtio.o
 Compiling virtio-net.o
 Compiling virtio-scsi.o
 Compiling virtio-blkdev.o
 Compiling cio.o
 Compiling dasd-ipl.o
 Compiling virtio-ccw.o
 Compiling clp.o
 Compiling pci.o
 Compiling virtio-pci.o
 Compiling secure-ipl.o
 Linking s390-ccw.elf
 Stripping s390-ccw.elf into s390-ccw.img

So it seems to be working. How do you usually invoke the build?

> Fearing the worst, I started converting to use meson directly (which
> is probably a noble goal anyway). I still don't have a workable image,
> as inheriting the common meson cc/ld flags exposes a bunch of other
> problems. Will keep poking, but I'd like to know if there's an
> easier/better option here?

I suspect the easiest way would be to move the rom specific cross
compiler detection into a configure script within pc-bios. Paolo wdyt?


>
> Thanks,
> Eric

-- 
Alex Bennée
Virtualisation Tech Lead @ Linaro

Reply via email to