Bug 241079 - WITHOUT_CROSS_COMPILER buildworld broken on amd64 with non-AVX-512 CPU
Summary: WITHOUT_CROSS_COMPILER buildworld broken on amd64 with non-AVX-512 CPU
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 12.1-RELEASE
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-bugs mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-10-05 12:25 UTC by Bernard Spil
Modified: 2019-10-05 20:33 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bernard Spil freebsd_committer 2019-10-05 12:25:22 UTC
Building 12.1-BETA3 fails on my Ivy Bridge machine with `-march=native` (or -march=ivybridge)

> cc -target x86_64-unknown-freebsd12.1 --sysroot=/usr/obj/usr/src/amd64.amd64/tmp -B/usr/obj/usr/src/amd64.amd64/tmp/usr/bin -c -x assembler-with-cpp -DLOCORE -O2 -pipe -fno-strict-aliasing -march=native -g -nostdinc  -I. -I/usr/src/sys -I/usr/src/sys/contrib/ck/include -I/usr/src/sys/contrib/libfdt -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h  -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -MD  -MF.depend.support.o -MTsupport.o -fdebug-prefixmap=./machine=/usr/src/sys/amd64/include -fdebug-prefix-map=./x86=/usr/src/sys/x86/include -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float  -fno-asynchronous-unwind-tables -ffreestanding -fwrapv -fstack-protector -g dwarf-2 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wcast-qual -Wundef -Wno-pointer-sign -D__printf__=__freebsd_kprintf__ -Wmissing-include-dirs -fdiagnostics-show-option -Wno-unknown-pragmas -Wno-error-tautological-compare -Wno-error-empty-body -Wno-error-parentheses-equality -Wno-error-unused-function -Wno-error-pointer-sign -Wno-error-shift-negative-value -Wno-address-of-packed-member  -mno-aes -mno-avx  -std=iso9899:1999  -Werror /usr/src/sys/amd64/amd64/support.S
> /usr/src/sys/amd64/amd64/support.S:1821:2: error: instruction requires: AVX-512 ISA
>  vmovdqa64 %zmm0, %gs:0x340
>  ^
> /usr/src/sys/amd64/amd64/support.S:1822:2: error: instruction requires: AVX-512 ISA
>  vpxor %zmm0, %zmm0, %zmm0
>  ^
> /usr/src/sys/amd64/amd64/support.S:1825:2: error: instruction requires: AVX-512 DQ ISA
>  vorpd (%rdx), %zmm0, %zmm0
>  ^
> /usr/src/sys/amd64/amd64/support.S:1826:2: error: instruction requires: AVX-512 DQ ISA
>  vorpd (%rdx), %zmm0, %zmm0
>  ^
> /usr/src/sys/amd64/amd64/support.S:1838:2: error: instruction requires: AVX-512 ISA
>  vmovdqa64 %gs:0x340, %zmm0
>  ^
> *** [support.o] Error code 1

CPU
> $ sysctl hw.model         
> hw.model: Intel(R) Core(TM) i7-3720QM CPU @ 2.60GHz

Source tree
> $ svn info
> Path: .
> Working Copy Root Path: /usr/src
> URL: https://svn.freebsd.org/base/releng/12.1
> Relative URL: ^/releng/12.1
> Repository Root: https://svn.freebsd.org/base
> Repository UUID: ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
> Revision: 353121
> Node Kind: directory
> Schedule: normal
> Last Changed Author: markj
> Last Changed Rev: 353108
> Last Changed Date: 2019-10-04 16:36:09 +0000 (Fri, 04 Oct 2019)
Comment 1 Bernard Spil freebsd_committer 2019-10-05 20:33:32 UTC
If your CPU doesn't natively support AVX-512, make buildworld is broken on 12.1

After commenting the 

> #WITHOUT_CROSS_COMPILER="YES"

in /etc/src.conf I was able to compile a kernel. Now runs fine.