Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 Feb 2019 07:25:43 -0800
From:      Steve Kargl <sgk@troutmask.apl.washington.edu>
To:        Dimitry Andric <dim@freebsd.org>
Cc:        freebsd-toolchain@freebsd.org
Subject:   Re: clang broken on current?
Message-ID:  <20190210152543.GD34772@troutmask.apl.washington.edu>
In-Reply-To: <F26ACA01-4132-4020-8089-FB862347F37E@FreeBSD.org>
References:  <20190210050003.GA31811@troutmask.apl.washington.edu> <F26ACA01-4132-4020-8089-FB862347F37E@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Feb 10, 2019 at 12:03:55PM +0100, Dimitry Andric wrote:
> On 10 Feb 2019, at 06:00, Steve Kargl <sgk@troutmask.apl.washington.edu> =
wrote:
> >=20
> > I have
> >=20
> > % uname -a
> > FreeBSD mobile 13.0-CURRENT FreeBSD 13.0-CURRENT r343477 MOBILE  i386
> >=20
> > % dmesg | more
> > ...
> > FreeBSD clang version 7.0.1 (tags/RELEASE_701/final 349250) (based on L=
LVM 7.0.1)
> > VT(vga): resolution 640x480
> > CPU: Intel(R) Core(TM)2 Duo CPU     T7250  @ 2.00GHz (1995.05-MHz 686-c=
lass CPU)
> >  Origin=3D"GenuineIntel"  Id=3D0x6fd  Family=3D0x6  Model=3D0xf  Steppi=
ng=3D13
> >  Features=3D0xbfebfbff<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=3D0xe3bd<SSE3,DTES64,MON,DS_CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,=
PDCM>
> >  AMD Features=3D0x20000000<LM>
> >  AMD Features2=3D0x1<LAHF>
> >  VT-x: (disabled in BIOS) HLT,PAUSE
> >  TSC: P-state invariant, performance statistics
> > ...
> >=20
> > If I add 'CFLAGS+=3D-march=3Dnative -mtune=3Dnative', I can build
> > world and kernel without a problem.  If I try to build
> > x11-toolkits/qt5-gui the build dies with
> >=20
> > c++ -Wl,--as-needed -fstack-protector -Wl,--no-undefined
> > -Wl,--version-script,QtGui.version -pthread -Wl,-rpath,/usr/local/lib/q=
t5
> > -shared -Wl,-Bsymbolic-functions
> > -Wl,--dynamic-list,/usr/ports/x11-toolkits/qt5-gui/work/qtbase-everywhe=
re-src-
> > 5.12.0/src/gui/QtGui.dynlist -Wl,-soname,libQt5Gui.so.5 -o libQt5Gui.so=
=2E5.12.0
> >=20
> > (long list of *.o files)
> >=20
> > -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(unsigne=
d int*,
> > unsigned int, int)'
> > qimage.cpp:(.text+0x2477): undefined reference to `qt_memfill16(unsigned
> > short*, unsigned short, int)'
>=20
> 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.
>=20

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

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

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

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

c++ -c -O2 -pipe -march=3Dnative -mtune=3Dnative -fstack-protector -isystem=
 /usr/local/include -fno-strict-aliasing -isystem /usr/local/include -O3 -s=
td=3Dc++1y -fvisibility=3Dhidden -fvisibility-inlines-hidden -fno-exception=
s -Wall -W -Wdate-time -Winconsistent-missing-override -pthread -fPIC -DQT_=
ACCESSIBILITY -DQT_DBUS -DQT_FONTCONFIG -DQT_FREETYPE -DQT_GLIB -DQT_IMAGEF=
ORMAT_PNG -DQT_OPENGL -DQT_SHAPE -DQT_XCB -DQT_XKB -DQT_XKBCOMMON -DQT_XREN=
DER -DQT_NO_USING_NAMESPACE -DQT_NO_FOREACH -DENABLE_PIXMAN_DRAWHELPERS -DQ=
T_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_QSTR=
INGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=3D0x0500=
00 -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEB=
UG -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/in=
clude -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 p=
ainting/qdrawhelper.cpp

--=20
Steve



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20190210152543.GD34772>