clang broken on current?

Steve Kargl sgk at troutmask.apl.washington.edu
Sun Feb 10 15:25:46 UTC 2019


On Sun, Feb 10, 2019 at 12:03:55PM +0100, Dimitry Andric wrote:
> On 10 Feb 2019, at 06:00, Steve Kargl <sgk at troutmask.apl.washington.edu> wrote:
> > 
> > I have
> > 
> > % uname -a
> > FreeBSD mobile 13.0-CURRENT FreeBSD 13.0-CURRENT r343477 MOBILE  i386
> > 
> > % dmesg | more
> > ...
> > FreeBSD clang version 7.0.1 (tags/RELEASE_701/final 349250) (based on LLVM 7.0.1)
> > VT(vga): resolution 640x480
> > CPU: Intel(R) Core(TM)2 Duo CPU     T7250  @ 2.00GHz (1995.05-MHz 686-class CPU)
> >  Origin="GenuineIntel"  Id=0x6fd  Family=0x6  Model=0xf  Stepping=13
> >  Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
> >  Features2=0xe3bd<SSE3,DTES64,MON,DS_CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM>
> >  AMD Features=0x20000000<LM>
> >  AMD Features2=0x1<LAHF>
> >  VT-x: (disabled in BIOS) HLT,PAUSE
> >  TSC: P-state invariant, performance statistics
> > ...
> > 
> > If I add 'CFLAGS+=-march=native -mtune=native', I can build
> > world and kernel without a problem.  If I try to build
> > x11-toolkits/qt5-gui the build dies with
> > 
> > c++ -Wl,--as-needed -fstack-protector -Wl,--no-undefined
> > -Wl,--version-script,QtGui.version -pthread -Wl,-rpath,/usr/local/lib/qt5
> > -shared -Wl,-Bsymbolic-functions
> > -Wl,--dynamic-list,/usr/ports/x11-toolkits/qt5-gui/work/qtbase-everywhere-src-
> > 5.12.0/src/gui/QtGui.dynlist -Wl,-soname,libQt5Gui.so.5 -o libQt5Gui.so.5.12.0
> > 
> > (long list of *.o files)
> > 
> > -L/usr/ports/x11-toolkits/qt5-gui/work/qtbase-everywhere-src-5.12.0/lib -L/lib
> > -L/usr/local/lib/qt5 -lQt5Core -L/usr/local/lib -lGL -lpng16 -lharfbuzz -lz
> > .obj/qimage.o: In function `QImage::fill(unsigned int)':
> > qimage.cpp:(.text+0x2442): undefined reference to `qt_memfill32(unsigned int*,
> > unsigned int, int)'
> > qimage.cpp:(.text+0x2477): undefined reference to `qt_memfill16(unsigned
> > short*, unsigned short, int)'
> 
> How did you arrive at the conclusion that this has anything to do with
> the specific compiler?  From these errors, I think it is more likely
> something in Qt5 that is erroneously convinced that those qt_memfillXY
> functions exist.  Or they get referenced, but not compiled at all, for
> some reason.
> 

If I have "CFLAGS+=-march=native -mtune=native" in /etc/make.conf,
the building of qt5-gui dies.

If I remove "CFLAGS+=-march=native -mtune=native" from /etc/make.conf,
the bulding of qt5-gui completes without incidence.

The only difference in command lines is the inclusion/exclusion of
-march=native -mtune=native.

I came to my conclusion by noticing noticing argv[0], argv[4] and argv[5]
below.

c++ -c -O2 -pipe -march=native -mtune=native -fstack-protector -isystem /usr/local/include -fno-strict-aliasing -isystem /usr/local/include -O3 -std=c++1y -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -Wall -W -Wdate-time -Winconsistent-missing-override -pthread -fPIC -DQT_ACCESSIBILITY -DQT_DBUS -DQT_FONTCONFIG -DQT_FREETYPE -DQT_GLIB -DQT_IMAGEFORMAT_PNG -DQT_OPENGL -DQT_SHAPE -DQT_XCB -DQT_XKB -DQT_XKBCOMMON -DQT_XRENDER -DQT_NO_USING_NAMESPACE -DQT_NO_FOREACH -DENABLE_PIXMAN_DRAWHELPERS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_BUILD_GUI_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_CORE_LIB -I. -I../../include -I../../include/QtGui -I../../include/QtGui/5.12.0 -I../../include/QtGui/5.12.0/QtGui -I.tracegen -I/usr/local/include -I/usr/local/include/libdrm -I/usr/local/include/qt5/QtCore/5.12.0 -I/usr/local/include/qt5/QtCore/5.12.0/QtCore -I/usr/local/include/qt5 -I/usr/local/include/qt5/QtCore -I.moc -I/usr/local/include/libpng16 -I/usr/local/include -I/usr/local/lib/qt5/mkspecs/freebsd-clang -o .obj/qdrawhelper.o painting/qdrawhelper.cpp

-- 
Steve


More information about the freebsd-toolchain mailing list