Date: Tue, 19 Nov 2019 19:54:46 -0800 From: Mark Millard <marklmi26-fbsd@yahoo.com> To: John Baldwin <jhb@freebsd.org> Cc: Baptiste Daroussin <bapt@FreeBSD.org>, freebsd-ppc@freebsd.org, FreeBSD Toolchain <freebsd-toolchain@freebsd.org> Subject: Re: [Bug 239813] Update lang/gcc9, lang/gcc9-devel, lang/gcc8, and lang/gcc8-devel to ELFv2 ABI on powerpc64 Message-ID: <FB89A178-3D4E-4A4E-82AA-DF8BEEE7E371@yahoo.com> In-Reply-To: <091e1406-812a-f07c-2ad7-afa96bc9b953@FreeBSD.org> References: <bug-239813-34538-V3hQNQV8PB@https.bugs.freebsd.org/bugzilla/> <59781281-A43A-4D2C-BFFD-7168C83F6B13@yahoo.com> <091e1406-812a-f07c-2ad7-afa96bc9b953@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2019-Nov-19, at 11:19, John Baldwin <jhb at freebsd.org> wrote: > On 11/19/19 10:34 AM, Mark Millard wrote: >> [A similar question to the below exists for base/gcc . The lang/gcc* = are being ELFv2 enabled for powerpc64 by checking the environment for if = it is new enough and already is ELFv2 based.] >>=20 >> Begin forwarded message: >>=20 >> From: bugzilla-noreply@freebsd.org >> Subject: [Bug 239813] Update lang/gcc9, lang/gcc9-devel, lang/gcc8, = and lang/gcc8-devel to ELFv2 ABI on powerpc64 >> Date: November 19, 2019 at 09:32:52 PST >> To: marklmi26-fbsd@yahoo.com >>=20 >> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D239813 >>=20 >> Gerald Pfeifer <gerald@FreeBSD.org> changed: >>=20 >> What |Removed |Added >> = --------------------------------------------------------------------------= -- >> Summary|Update lang/gcc8 and |Update lang/gcc9, >> |lang/gcc9 to ELFv2 ABI on |lang/gcc9-devel, = lang/gcc8, >> |powerpc64 |and lang/gcc8-devel to >> | |ELFv2 ABI on powerpc64 >>=20 >> --- Comment #38 from Gerald Pfeifer <gerald@FreeBSD.org> --- >> (In reply to Mark Millard from comment #35) >>> I do not know the intent for devel/powerpc64-gcc relative >>> to future ELFv2 ABI use. Does it need anything? (May be >>> it is updating to gcc9 or some such first?) >>=20 >> Updating to GCC 9 would be my recomendation, though I have no >> involvement with that port. >>=20 >> lang/gcc9-devel should be fine now, both wrt. the new ABI as well >> as building with clang. >>=20 >> Next I'll make the remaining equivalent changes to lang/gcc9 and >> lang/gcc8-devel. >=20 > I've just committed a new devel/freebsd-gcc6 port (with flavors) to = replace > the powerp64-gcc port (and slaves) with an intention of creating a > freebsd-gcc9 port as a followup. It seems once freebsd-gcc9 exists we = can > apply this change to that. >=20 > base/gcc will also similarly be adjusted to base/gcc6 and base/gcc9 in = the > future. >=20 > The reason to keep old versions is that gcc6 is known to work (for = some value > of work) for existing releases, so we want to provide different = packages for > different major compiler versions to cope with newer OS releases = supporting > newer compilers (e.g. we will patch head to work with freebsd-gcc9, = but if > we only had a single powerpc64-gcc port we wouldn't be able to provide = a > working compiler for stable/11 if we changed powerpc64-gcc to GCC 9). >=20 Cool. I'll adjust my src.conf variations to match the new naming. Just some FYI notes: The old devel/*-gcc ports may need CONLFICTS assignment as well (until = they are removed). In an amd64 context I tried poudriere bulk based on including (as a = test): devel/freebsd-gcc6 devel/freebsd-gcc6@aarch64 devel/freebsd-gcc6@amd64 devel/freebsd-gcc6@powerpc64 and it got: [00:00:43] [04] [00:00:00] Building devel/freebsd-gcc6@aarch64 | = aarch64-gcc6-6.4.0 [00:00:43] [05] [00:00:00] Building devel/freebsd-gcc6@amd64 | = amd64-gcc6-6.4.0 [00:00:43] [06] [00:00:00] Building devel/freebsd-gcc6@powerpc64 | = powerpc64-gcc6-6.4.0 . . . [00:05:02] [04] [00:04:19] Finished devel/freebsd-gcc6@aarch64 | = aarch64-gcc6-6.4.0: Success . . . [00:07:25] [06] [00:06:42] Finished devel/freebsd-gcc6@powerpc64 | = powerpc64-gcc6-6.4.0: Success [00:07:51] [05] [00:07:08] Finished devel/freebsd-gcc6@amd64 | = amd64-gcc6-6.4.0: Success . . . [00:34:08] Built ports: . . . devel/freebsd-gcc6 . . . = devel/freebsd-gcc6@powerpc64 devel/freebsd-gcc6@amd64 . . . The "Built ports" apparently choose to drop the @aarch64 notation and = the devel/freebsd-gcc6 was not rejected but had nothing directly built = for it. (I've not used flavors all that much so I was curious.) In part I tried devel/freebsd-gcc6 (no explicit flavor) because, as I = remember, devel/binutils without an explicit flavor does @native that is distinct = from the @(same-as-host) flavor, just like building devel/amd64-binutils in an = amd64 environment was distinct from building devel/binutils in that same = environment. Or that seemed to be the intent for devel/binutils . =3D=3D=3D I started a buildworld buildkernel experiment, targeting aarch64 uisng = the ddevel/freebsd-gcc6@aarch materials. It seemed to generally work, as far as it got. The below may well have been true if I had tried to the xtoolchain = materials instead and may well be far from new. (I've rarely done gcc based = aarch64 targeting and do not remember for sure if this resulted before or not.) = The build has -v for the gcc6/g++6 commands and so shows more context than = usual. --- locore.o --- /usr/src/sys/arm64/arm64/locore.S: Assembler messages: /usr/src/sys/arm64/arm64/locore.S:251: Error: unknown or missing system = register name at operand 2 -- `mrs x2,icc_sre_el2' /usr/src/sys/arm64/arm64/locore.S:254: Error: unknown or missing system = register name at operand 1 -- `msr icc_sre_el2,x2' The recorded commands were: # Meta data file = /usr/obj/cortexA53_xtoolchain-gcc/arm64.aarch64/usr/src/arm64.aarch64/sys/= GENERIC-NODBG/locore.o.meta CMD /usr/local/bin/aarch64-unknown-freebsd13.0-gcc6 -mcpu=3Dcortex-a53 = --sysroot=3D/usr/obj/cortexA53_xtoolchain-gcc/arm64.aarch64/usr/src/arm64.= aarch64/tmp -B/usr/local/aarch64-unknown-freebsd13.0/bin/ - c -x assembler-with-cpp -DLOCORE -O -pipe -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 = -fdebug-prefix-map=3D./machine=3D/usr/src/sys/arm64/include = -mgeneral-regs-only -ffixed-x18 -ffreestanding -fwrapv -fstack-protector = -gdwarf-2 -Wal l -Wredundant-decls -Wnested-externs -Wstrict-prototypes = -Wmissing-prototypes -Wpointer-arith -Wcast-qual -Wundef = -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs = -fdiagnostics-show-option -Wno-unknown-pragmas -Wno-error=3Daddress = -Wno-error=3Daggressive-loop-optimizations -Wno-error=3Darray-bounds = -Wno-error=3Dattributes -Wno-error=3Dcast-qual -Wno-error=3Denum-compare = -Wno-error=3Dinline -Wno-erro r=3Dmaybe-uninitialized -Wno-error=3Doverflow -Wno-error=3Dsequence-point = -Wno-unused-but-set-variable -Wno-error=3Dmisleading-indentation = -Wno-error=3Dnonnull-compare -Wno-error=3Dshift-overflow = -Wno-error=3Dtauto logical-compare -Wno-format-zero-length -v -fno-common -fms-extensions = -finline-limit=3D8000 --param inline-unit-growth=3D100 --param = large-function-growth=3D1000 -fms-extensions -std=3Diso9899:1999 = -Werro r /usr/src/sys/arm64/arm64/locore.S CWD = /usr/obj/cortexA53_xtoolchain-gcc/arm64.aarch64/usr/src/arm64.aarch64/sys/= GENERIC-NODBG TARGET locore.o -- command output -- Using built-in specs. COLLECT_GCC=3D/usr/local/bin/aarch64-unknown-freebsd13.0-gcc6 Target: aarch64-unknown-freebsd13.0 Configured with: = /wrkdirs/usr/ports/devel/freebsd-gcc6/work-aarch64/gcc-6.4.0/configure = --target=3Daarch64-unknown-freebsd13.0 --disable-nls = --enable-languages=3Dc,c++ --enable-gnu-indirect-function --ena ble-initfini-array --program-prefix=3Daarch64-unknown-freebsd13.0- = --program-suffix=3D6 --without-headers --with-gmp=3D/usr/local = --with-pkgversion=3D'FreeBSD Ports Collection for aarch64' = --with-system-zlib --with-gxx-include-dir=3D/usr/include/c++/v1/ --with-sysroot=3D/ = --with-as=3D/usr/local/bin/aarch64-unknown-freebsd13.0-as = --with-ld=3D/usr/local/bin/aarch64-unknown-freebsd13.0-ld --disable-lto = --prefix=3D/usr /local --localstatedir=3D/var --mandir=3D/usr/local/man = --infodir=3D/usr/local/share/info/ --build=3Dx86_64-unknown-freebsd13.0 Thread model: posix gcc version 6.4.0 (FreeBSD Ports Collection for aarch64) COLLECT_GCC_OPTIONS=3D'-mcpu=3Dcortex-a53' '-B' = '/usr/local/aarch64-unknown-freebsd13.0/bin/' '-c' '-D' 'LOCORE' '-O' = '-pipe' '-g' '-nostdinc' '-I' '.' '-I' '/usr/src/sys' '-I' = '/usr/src/sys/contrib/ck/in clude' '-I' '/usr/src/sys/contrib/libfdt' '-D' '_KERNEL' '-D' = 'HAVE_KERNEL_OPTION_HEADERS' '-include' 'opt_global.h' = '-fno-omit-frame-pointer' '-mno-omit-leaf-frame-pointer' = '-fdebug-prefix-map=3D./mach ine=3D/usr/src/sys/arm64/include' '-mgeneral-regs-only' '-ffixed-x18' = '-ffreestanding' '-fwrapv' '-fstack-protector' '-gdwarf-2' '-Wall' = '-Wredundant-decls' '-Wnested-externs' '-Wstrict-prototypes' '-Wm issing-prototypes' '-Wpointer-arith' '-Wcast-qual' '-Wundef' = '-Wno-pointer-sign' '-fformat-extensions' '-Wmissing-include-dirs' = '-fdiagnostics-show-option' '-Wno-unknown-pragmas' '-Wno-error=3Daddress' '-Wno-error=3Daggressive-loop-optimizations' '-Wno-error=3Darray-bounds' = '-Wno-error=3Dattributes' '-Wno-error=3Dcast-qual' = '-Wno-error=3Denum-compare' '-Wno-error=3Dinline' = '-Wno-error=3Dmaybe-uninitialized' '-Wno -error=3Doverflow' '-Wno-error=3Dsequence-point' = '-Wno-unused-but-set-variable' '-Wno-error=3Dmisleading-indentation' = '-Wno-error=3Dnonnull-compare' '-Wno-error=3Dshift-overflow' = '-Wno-error=3Dtautological-compar e' '-Wno-format-zero-length' '-v' '-fno-common' '-finline-limit=3D8000' = '--param' 'inline-unit-growth=3D100' '--param' = 'large-function-growth=3D1000' '-fms-extensions' '-std=3Dc99' '-Werror' = '-mlittle-endian' '-mabi=3Dlp64' /usr/local/libexec/gcc/aarch64-unknown-freebsd13.0/6.4.0/cc1 -E = -lang-asm -quiet -nostdinc -v -I . -I /usr/src/sys -I = /usr/src/sys/contrib/ck/include -I /usr/src/sys/contrib/libfdt -isysroot = /usr/obj /cortexA53_xtoolchain-gcc/arm64.aarch64/usr/src/arm64.aarch64/tmp -D = LOCORE -D _KERNEL -D HAVE_KERNEL_OPTION_HEADERS -include opt_global.h = /usr/src/sys/arm64/arm64/locore.S -mcpu=3Dcortex-a53 -mno-omit- leaf-frame-pointer -mgeneral-regs-only -mlittle-endian -mabi=3Dlp64 = -std=3Dc99 -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes = -Wmissing-prototypes -Wpointer-arith -Wcast-qual -Wundef -Wno-po inter-sign -Wmissing-include-dirs -Wno-unknown-pragmas = -Wno-error=3Daddress -Wno-error=3Daggressive-loop-optimizations = -Wno-error=3Darray-bounds -Wno-error=3Dattributes -Wno-error=3Dcast-qual = -Wno-error=3Denum-co mpare -Wno-error=3Dinline -Wno-error=3Dmaybe-uninitialized = -Wno-error=3Doverflow -Wno-error=3Dsequence-point = -Wno-unused-but-set-variable -Wno-error=3Dmisleading-indentation = -Wno-error=3Dnonnull-compare -Wno-erro r=3Dshift-overflow -Wno-error=3Dtautological-compare = -Wno-format-zero-length -Werror -fno-omit-frame-pointer = -fdebug-prefix-map=3D./machine=3D/usr/src/sys/arm64/include -ffixed-x18 = -ffreestanding -fwrapv -fst ack-protector -fformat-extensions -fdiagnostics-show-option -fno-common = -finline-limit=3D8000 -fms-extensions -g -gdwarf-2 -fworking-directory = -O -fno-directives-only -o - | /usr/local/bin/aarch64-unknown-freebsd13.0-as --gdwarf2 = --debug-prefix-map ./machine=3D/usr/src/sys/arm64/include -v -I . -I = /usr/src/sys -I /usr/src/sys/contrib/ck/include -I = /usr/src/sys/contrib/libf dt -EL -march=3Darmv8-a+crc -mabi=3Dlp64 -o locore.o GNU assembler version 2.33.1 (aarch64-unknown-freebsd13.0) using BFD = version (GNU Binutils) 2.33.1 #include "..." search starts here: #include <...> search starts here: . /usr/src/sys /usr/src/sys/contrib/ck/include /usr/src/sys/contrib/libfdt End of search list. /usr/src/sys/arm64/arm64/locore.S: Assembler messages: /usr/src/sys/arm64/arm64/locore.S:251: Error: unknown or missing system = register name at operand 2 -- `mrs x2,icc_sre_el2' /usr/src/sys/arm64/arm64/locore.S:254: Error: unknown or missing system = register name at operand 1 -- `msr icc_sre_el2,x2' *** Error code 1 =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?FB89A178-3D4E-4A4E-82AA-DF8BEEE7E371>