Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 11 Feb 2023 13:55:18 -0800
From:      Mark Millard <marklmi@yahoo.com>
To:        freebsd-current <freebsd-current@freebsd.org>
Subject:   devel/freebsd-gcc12 based aarch64 buildkernel: rejection of sys/arm64/arm64/locore.S assembler notation
Message-ID:  <CEBEEC49-DA46-496C-9A14-E12EA8C6CE83@yahoo.com>
In-Reply-To: <FDE03895-DAFC-4EDA-901D-CCB90D192548@yahoo.com>
References:  <D14D0F97-ECBA-4964-8702-F58670872458@yahoo.com> <FDE03895-DAFC-4EDA-901D-CCB90D192548@yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
[For the buildworld notice that I reported elsewhere, the
debug build got the same type of notices/stopping issue.]

After the buildworld notices that I reported I tried
buildkernel by itself. Again the non-debug and debug
builds basically matched.

An early message (that did not stop the build) was:

make[2]: =
"/usr/obj/BUILDs/main-CA72-nodbg-gccxtc/usr/main-src/arm64.aarch64/sys/GEN=
ERIC-NODBG/Makefile" line 47: warning: "Compiler is too old to support =
PERTHREAD_SSP"

The logic structure in the Makefile only considers clang
as capable:

PERTHREAD_SSP_ENABLED!=3D grep PERTHREAD_SSP opt_global.h || true ; echo
.if !empty(PERTHREAD_SSP_ENABLED)
. if ${COMPILER_TYPE} =3D=3D "clang" && ${COMPILER_VERSION} >=3D 130000
ARM64_SSP_CFLAGS =3D -mstack-protector-guard=3Dsysreg
ARM64_SSP_CFLAGS +=3D -mstack-protector-guard-reg=3Dsp_el0
ARM64_SSP_CFLAGS +=3D -mstack-protector-guard-offset=3D0
. else
ARM64_SSP_CFLAGS +=3D -DPERTHREAD_SSP_WARNING
.  warning "Compiler is too old to support PERTHREAD_SSP"
. endif
CFLAGS +=3D ${ARM64_SSP_CFLAGS}
ARCH_FLAGS +=3D ${ARM64_SSP_CFLAGS}
.endif

I've not checked if devel/freebsd-gcc12 has alternatives that
would give support for PERTHREAD_SSP_ENABLED vs. not.

As for the first notices tied to stopping the build:

--- locore.o ---
/usr/main-src/sys/arm64/arm64/locore.S: Assembler messages:
/usr/main-src/sys/arm64/arm64/locore.S:839: Error: found 'U', expected: =
')'
/usr/main-src/sys/arm64/arm64/locore.S:839: Error: found 'U', expected: =
')'
/usr/main-src/sys/arm64/arm64/locore.S:839: Error: found 'U', expected: =
')'
/usr/main-src/sys/arm64/arm64/locore.S:839: Error: junk at end of line, =
first unrecognized character is `U'
*** [locore.o] Error code 1

make[2]: stopped in =
/usr/obj/BUILDs/main-CA72-nodbg-gccxtc/usr/main-src/arm64.aarch64/sys/GENE=
RIC-NODBG
.ERROR_TARGET=3D'locore.o'
=
.ERROR_META_FILE=3D'/usr/obj/BUILDs/main-CA72-nodbg-gccxtc/usr/main-src/ar=
m64.aarch64/sys/GENERIC-NODBG/locore.o.meta'

Or, as shown in the .meta file:

. . . |
 /usr/local/bin/aarch64-unknown-freebsd14.0-as --debug-prefix-map =
./machine=3D/usr/main-src/sys/arm64/include -v -I . -I /usr/main-src/sys =
-I /usr/main-src/sys/contrib/ck/include -I /usr/main-src/sys/co
ntrib/libfdt -I /usr/main-src/sys/contrib/device-tree/include --gdwarf-5 =
-EL -march=3Darmv8-a+crc -mabi=3Dlp64 -o locore.o
GNU assembler version 2.39 (aarch64-unknown-freebsd14.0) using BFD =
version (GNU Binutils) 2.39
#include "..." search starts here:
#include <...> search starts here:
 .
 /usr/main-src/sys
 /usr/main-src/sys/contrib/ck/include
 /usr/main-src/sys/contrib/libfdt
 /usr/main-src/sys/contrib/device-tree/include
End of search list.
/usr/main-src/sys/arm64/arm64/locore.S: Assembler messages:
/usr/main-src/sys/arm64/arm64/locore.S:839: Error: found 'U', expected: =
')'
/usr/main-src/sys/arm64/arm64/locore.S:839: Error: found 'U', expected: =
')'
/usr/main-src/sys/arm64/arm64/locore.S:839: Error: found 'U', expected: =
')'
/usr/main-src/sys/arm64/arm64/locore.S:839: Error: junk at end of line, =
first unrecognized character is `U'

*** Error code 1


With that, I've provided debug & non-debug tier 1 notes
(amd64 and aarch64).( http://ci.freebsd.org/ only has
amd64 debug.) But mostly I've commented on notices
associated with stopping the build in an incomplete
state --not the many other warnings/notes produced.

While I also have access to armv7 (and armv7 chroot/jail
on aarch64), I do not expect to be experimenting with armv7
and devel/freebsd-gcc12@armv7 for such just for my own
curiosity.

Note:
My builds were not a detailed replication of the FreeBSD
ci server's type of build context, even ignoring the
debug vs. non-debug coverage and the aarch64 testing.
The results are based on my normal, personal buildworld
buildkernel context.

=3D=3D=3D
Mark Millard
marklmi at yahoo.com




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CEBEEC49-DA46-496C-9A14-E12EA8C6CE83>