Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 01 Apr 2022 11:27:52 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 262977] Preprocessor error in sys/contrib/zlib/crc32.c on arm64
Message-ID:  <bug-262977-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D262977

            Bug ID: 262977
           Summary: Preprocessor error in sys/contrib/zlib/crc32.c on
                    arm64
           Product: Base System
           Version: CURRENT
          Hardware: arm64
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: jfc@mit.edu

On main (3256b7ca36e739a08f141a7ee52b9db9d995db85 and some earlier revision=
s)
my kernel does not compile on arm64 because of the error below.  The macro W
(word size) is not defined.

cc -target aarch64-unknown-freebsd14.0
--sysroot=3D/usr/obj/usr/home/jfc/freebsd/src/arm64.aarch64/tmp
-B/usr/obj/usr/home/jfc/freebsd/src/arm64.aarch64/tmp/usr/bin  -O2 -pipe
-fno-common -mcpu=3Dcortex-a57  -fno-strict-aliasing -Werror -D_KERNEL
-DKLD_MODULE -DKLD_TIED -nostdinc   -DHAVE_KERNEL_OPTION_HEADERS -include
/usr/obj/usr/home/jfc/freebsd/src/arm64.aarch64/sys/STRIATUS/opt_global.h -=
I.
-I/usr/home/jfc/freebsd/src/sys
-I/usr/home/jfc/freebsd/src/sys/contrib/ck/include -fno-common -g
-fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fPIC
-fdebug-prefix-map=3D./machine=3D/usr/home/jfc/freebsd/src/sys/arm64/include
-I/usr/obj/usr/home/jfc/freebsd/src/arm64.aarch64/sys/STRIATUS=20=20
-mstack-protector-guard=3Dsysreg -mstack-protector-guard-reg=3Dsp_el0
-mstack-protector-guard-offset=3D0  -MD  -MF.depend.crc32.o -MTcrc32.o
-mgeneral-regs-only -ffixed-x18 -ffreestanding -fwrapv -fstack-protector -W=
all
-Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith
-Wcast-qual -Wundef -Wno-pointer-sign -D__printf__=3D__freebsd_kprintf__
-Wmissing-include-dirs -fdiagnostics-show-option -Wno-unknown-pragmas
-Wno-error=3Dtautological-compare -Wno-error=3Dempty-body
-Wno-error=3Dparentheses-equality -Wno-error=3Dunused-function
-Wno-error=3Dpointer-sign -Wno-error=3Dshift-negative-value
-Wno-address-of-packed-member -Wno-error=3Dunused-but-set-variable
-Wno-format-zero-length     -std=3Diso9899:1999 -c
/usr/home/jfc/freebsd/src/sys/contrib/zlib/crc32.c -o crc32.o
/usr/home/jfc/freebsd/src/sys/contrib/zlib/crc32.c:106:61: error: 'W' is not
defined, evaluates to 0 [-Werror,-Wundef]
#if defined(__aarch64__) && defined(__ARM_FEATURE_CRC32) && W =3D=3D 8

--=20
You are receiving this mail because:
You are the assignee for the bug.=



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