On Fri, Sep 8, 2023 at 7:28 PM Kevin Wolf <kw...@redhat.com> wrote:
> Maybe the calls aren't eliminated because --enable-debug implies -O0?

My experience is that it will still fold simple dead code like "0 &&
foo()" or even "if (0) { ... }", but maybe it's a GCC vs. clang
difference. Philippe, I take it that you are looking at it?

Paolo

> Kevin
>
> > > What are your ./configure command options?
> >
> > '/home/kwolf/source/qemu/configure' '--cc=clang' 
> > '--target-list=x86_64-linux-user,x86_64-softmmu,arm-softmmu,aarch64-softmmu'
> >  '--enable-debug' '--cxx=clang++' '--disable-blkio'
> >
> > Kevin
> >
> > > >    /usr/bin/ld: libqemu-x86_64-linux-user.fa.p/target_i386_cpu.c.o: in 
> > > > function `x86_cpu_filter_features':
> > > >    /home/kwolf/source/qemu/build-clang/../target/i386/cpu.c:7158: 
> > > > undefined reference to `kvm_arch_get_supported_cpuid'
> > > >    /usr/bin/ld: 
> > > > /home/kwolf/source/qemu/build-clang/../target/i386/cpu.c:7159: 
> > > > undefined reference to `kvm_arch_get_supported_cpuid'
> > > >    /usr/bin/ld: 
> > > > /home/kwolf/source/qemu/build-clang/../target/i386/cpu.c:7160: 
> > > > undefined reference to `kvm_arch_get_supported_cpuid'
> > > >    /usr/bin/ld: 
> > > > /home/kwolf/source/qemu/build-clang/../target/i386/cpu.c:7161: 
> > > > undefined reference to `kvm_arch_get_supported_cpuid'
> > > >    /usr/bin/ld: 
> > > > libqemu-x86_64-linux-user.fa.p/target_i386_cpu.c.o:/home/kwolf/source/qemu/build-clang/../target/i386/cpu.c:7162:
> > > >  more undefined references to `kvm_arch_get_supported_cpuid' follow
> > > >    clang-15: error: linker command failed with exit code 1 (use -v to 
> > > > see invocation)
> > > >
> > > > In case it makes a difference, I'm using clang on F37.
> > > >
> > > > Kevin
> > >
>


Reply via email to