Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 9 Feb 2019 21:00:03 -0800
From:      Steve Kargl <sgk@troutmask.apl.washington.edu>
To:        freebsd-toolchain@freebsd.org
Subject:   clang broken on current? 
Message-ID:  <20190210050003.GA31811@troutmask.apl.washington.edu>

next in thread | raw e-mail | index | archive | help
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)'
qimage.cpp:(.text+0x268f): undefined reference to `qt_memfill32(unsigned int*,
unsigned int, int)'
qimage.cpp:(.text+0x26cf): undefined reference to `qt_memfill16(unsigned
short*, unsigned short, int)'
.obj/qcompositionfunctions.o: In function `comp_func_solid_Clear(unsigned
int*, int, unsigned int, unsigned int)':
qcompositionfunctions.cpp:(.text+0x33): undefined reference to
`qt_memfill32(unsigned int*, unsigned int, int)'
.obj/qcompositionfunctions.o: In function `comp_func_Clear(unsigned int*,
unsigned int const*, int, unsigned int)':
qcompositionfunctions.cpp:(.text+0x293): undefined reference to
`qt_memfill32(unsigned int*, unsigned int, int)'
.obj/qcompositionfunctions.o: In function `comp_func_solid_Source(unsigned
int*, int, unsigned int, unsigned int)':
qcompositionfunctions.cpp:(.text+0x4f1): undefined reference to
`qt_memfill32(unsigned int*, unsigned int, int)'
.obj/qcompositionfunctions.o: In function `comp_func_solid_SourceOver(unsigned
int*, int, unsigned int, unsigned int)':
qcompositionfunctions.cpp:(.text+0xc4b): undefined reference to
`qt_memfill32(unsigned int*, unsigned int, int)'
.obj/qcompositionfunctions.o: In function `rasterop_solid_NotSource(unsigned
int*, int, unsigned int, unsigned int)':
qcompositionfunctions.cpp:(.text+0x2da8b): undefined reference to
`qt_memfill32(unsigned int*, unsigned int, int)'
.obj/qcompositionfunctions.o:qcompositionfunctions.cpp:(.text+0x2e603): more
undefined references to `qt_memfill32(unsigned int*, unsigned int, int)'
follow
.obj/qdrawhelper.o: In function `blend_color_rgb16(int, QT_FT_Span_ const*,
void*)':
qdrawhelper.cpp:(.text+0x14968): undefined reference to `qt_memfill16(unsigned
short*, unsigned short, int)'
.obj/qdrawhelper.o: In function `qt_bitmapblit_quint16(QRasterBuffer*, int,
int, QRgba64 const&, unsigned char const*, int, int, int)':
qdrawhelper.cpp:(.text+0x14ea1): undefined reference to `qt_memfill16(unsigned
short*, unsigned short, int)'
qdrawhelper.cpp:(.text+0x14eed): undefined reference to `qt_memfill16(unsigned
short*, unsigned short, int)'
qdrawhelper.cpp:(.text+0x14f3e): undefined reference to `qt_memfill16(unsigned
short*, unsigned short, int)'
qdrawhelper.cpp:(.text+0x14f8f): undefined reference to `qt_memfill16(unsigned
short*, unsigned short, int)'
.obj/qdrawhelper.o:qdrawhelper.cpp:(.text+0x14fde): more undefined references
to `qt_memfill16(unsigned short*, unsigned short, int)' follow
.obj/qdrawhelper.o: In function `qt_rectfill_rgba(QRasterBuffer*, int, int,
int, int, QRgba64 const&)':
qdrawhelper.cpp:(.text+0x16b7b): undefined reference to `qt_memfill32(unsigned
int*, unsigned int, int)'
qdrawhelper.cpp:(.text+0x16b9f): undefined reference to `qt_memfill32(unsigned
int*, unsigned int, int)'
.obj/qdrawhelper.o: In function `qt_rectfill_nonpremul_rgba(QRasterBuffer*,
int, int, int, int, QRgba64 const&)':
qdrawhelper.cpp:(.text+0x16cfc): undefined reference to `qt_memfill32(unsigned
int*, unsigned int, int)'
qdrawhelper.cpp:(.text+0x16d21): undefined reference to `qt_memfill32(unsigned
int*, unsigned int, int)'
.obj/qdrawhelper.o: In function
`_ZL17qt_rectfill_rgb30IL12QtPixelOrder1EEvP13QRasterBufferiiiiRK7QRgba64':
qdrawhelper.cpp:(.text+0x17054): undefined reference to `qt_memfill32(unsigned
int*, unsigned int, int)'
.obj/qdrawhelper.o:qdrawhelper.cpp:(.text+0x1707c): more undefined references
to `qt_memfill32(unsigned int*, unsigned int, int)' follow
.obj/qdrawhelper.o: In function `_GLOBAL__sub_I_qdrawhelper.cpp':
qdrawhelper.cpp:(.text+0x2cfe7): undefined reference to
`qt_bitmapblit32_sse2(QRasterBuffer*, int, int, QRgba64 const&, unsigned char
const*, int, int, int)'
qdrawhelper.cpp:(.text+0x2cfff): undefined reference to
`qt_bitmapblit16_sse2(QRasterBuffer*, int, int, QRgba64 const&, unsigned char
const*, int, int, int)'
qdrawhelper.cpp:(.text+0x2d00b): undefined reference to
`qt_bitmapblit8888_sse2(QRasterBuffer*, int, int, QRgba64 const&, unsigned
char const*, int, int, int)'
qdrawhelper.cpp:(.text+0x2d023): undefined reference to
`qt_scale_image_argb32_on_argb32_sse2(unsigned char*, int, unsigned char
const*, int, int, QRectF const&, QRectF const&, QRect const&, int)'
qdrawhelper.cpp:(.text+0x2d047): undefined reference to
`qt_blend_rgb32_on_rgb32_sse2(unsigned char*, int, unsigned char const*, int,
int, int, int)'
qdrawhelper.cpp:(.text+0x2d05f): undefined reference to
`qt_blend_argb32_on_argb32_sse2(unsigned char*, int, unsigned char const*,
int, int, int, int)'
qdrawhelper.cpp:(.text+0x2d089): undefined reference to
`qt_fetch_radial_gradient_sse2(unsigned int*, Operator const*, QSpanData
const*, int, int, int)'
qdrawhelper.cpp:(.text+0x2d095): undefined reference to
`comp_func_SourceOver_sse2(unsigned int*, unsigned int const*, int, unsigned
int)'
qdrawhelper.cpp:(.text+0x2d0a3): undefined reference to
`comp_func_solid_SourceOver_sse2(unsigned int*, int, unsigned int, unsigned
int)'
qdrawhelper.cpp:(.text+0x2d0b1): undefined reference to
`comp_func_Source_sse2(unsigned int*, unsigned int const*, int, unsigned int)'
qdrawhelper.cpp:(.text+0x2d0ba): undefined reference to
`comp_func_Plus_sse2(unsigned int*, unsigned int const*, int, unsigned int)'
c++: error: linker command failed with exit code 1 (use -v to see invocation)
*** Error code 1

Removing the additional of -march=native -mtune=native fixes the
build.
-- 
Steve



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