Date: Sat, 29 Apr 2017 00:01:43 -0700 From: Mark Millard <markmi@dsl-only.net> To: Mark Linimon <linimon@lonesome.com> Cc: svn-ports-head@freebsd.org, Baptiste Daroussin <bapt@FreeBSD.org>, Alexander Kabaev <kabaev@gmail.com> Subject: Re: svn commit: r439595 - in head/devel: aarch64-gcc aarch64-none-elf-gcc amd64-gcc arm-none-eabi-gcc arm-none-eabi-gcc492 mips-gcc mips64-gcc powerpc64-gcc riscv64-gcc sparc64-gcc Message-ID: <6BBEEE64-04D3-464B-BF42-3836C3E90AD4@dsl-only.net> In-Reply-To: <20170429063450.GA16576@lonesome.com> References: <8E45FA57-8D2E-4159-8E02-6A5044000CC2@dsl-only.net> <20170429022831.GB15674@lonesome.com> <A6D8B25D-27F6-4216-BD96-1C07E08E7847@dsl-only.net> <20170429033730.GA15960@lonesome.com> <CF547B15-A677-4D23-83B3-985E37664710@dsl-only.net> <20170429063450.GA16576@lonesome.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2017-Apr-28, at 11:34 PM, Mark Linimon <linimon at lonesome.com> = wrote: On Fri, Apr 28, 2017 at 11:19:25PM -0700, Mark Millard wrote: >> Your powerpc64 testing might be of gcc 4.2.1 and old libstdc++ as a >> context. That would be different than my powerpc64 tests. >=20 > # uname -a > FreeBSD 9133-1 11.0-STABLE FreeBSD 11.0-STABLE #17 r316443: Mon Apr 3 = 08:11:34 UTC 2017 = linimon@srcjail:/usr/obj/powerpc.powerpc64/home/linimon/src/stable/11/sys/= PACKAGE_NODE_powerpc64 powerpc > # cc --version > cc (GCC) 4.2.1 20070831 patched [FreeBSD] >=20 > Reasonably stock. A few debug features are added, and so forth. My powerpc64 context details (for self-hosted buildworld buildkernel): # uname -paKU FreeBSD FBSDG5L 12.0-CURRENT FreeBSD 12.0-CURRENT r317015M powerpc = powerpc64 1200028 1200028 # cc --version FreeBSD clang version 4.0.0 (tags/RELEASE_400/final 297347) (based on = LLVM 4.0.0) Target: powerpc64-unknown-freebsd12.0 Thread model: posix InstalledDir: /usr/bin # c++ --version FreeBSD clang version 4.0.0 (tags/RELEASE_400/final 297347) (based on = LLVM 4.0.0) Target: powerpc64-unknown-freebsd12.0 Thread model: posix InstalledDir: /usr/bin /usr/src/contrib/llvm/tools/lld/ELF/Target.cpp has a required clang patch for this to work: # svnlite diff /usr/src/contrib/llvm/ Index: /usr/src/contrib/llvm/tools/lld/ELF/Target.cpp =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- /usr/src/contrib/llvm/tools/lld/ELF/Target.cpp (revision = 317015) +++ /usr/src/contrib/llvm/tools/lld/ELF/Target.cpp (working copy) @@ -1070,7 +1070,8 @@ } =20 PPC64TargetInfo::PPC64TargetInfo() { - PltRel =3D GotRel =3D R_PPC64_GLOB_DAT; + GotRel =3D R_PPC64_GLOB_DAT; + PltRel =3D R_PPC64_JMP_SLOT; RelativeRel =3D R_PPC64_RELATIVE; GotEntrySize =3D 8; GotPltEntrySize =3D 8; # svnlite status /usr/src | sort ? /usr/src/sys/amd64/conf/GENERIC-DBG ? /usr/src/sys/amd64/conf/GENERIC-NODBG ? /usr/src/sys/arm/conf/GENERIC-DBG ? /usr/src/sys/arm/conf/GENERIC-NODBG ? /usr/src/sys/arm64/conf/GENERIC-DBG ? /usr/src/sys/arm64/conf/GENERIC-NODBG ? /usr/src/sys/powerpc/conf/GENERIC64vtsc-DBG ? /usr/src/sys/powerpc/conf/GENERIC64vtsc-NODBG ? /usr/src/sys/powerpc/conf/GENERICvtsc-DBG ? /usr/src/sys/powerpc/conf/GENERICvtsc-NODBG M /usr/src/contrib/llvm/tools/lld/ELF/Target.cpp M /usr/src/crypto/openssl/crypto/armcap.c M /usr/src/sys/arm/arm/gic.h M /usr/src/sys/boot/ofw/Makefile.inc M /usr/src/sys/boot/powerpc/Makefile.inc M /usr/src/sys/boot/powerpc/kboot/Makefile M /usr/src/sys/boot/uboot/Makefile.inc M /usr/src/sys/conf/kmod.mk M /usr/src/sys/ddb/db_main.c M /usr/src/sys/ddb/db_script.c M /usr/src/sys/powerpc/powerpc/exec_machdep.c (The Makefile* and *.mk stuff has tended to be from/for historical compatibility for using system and xtoolchain-gcc based builds. powerpc/powerpc/exec_machdep.c is for powerpc, not powerpc64 as far as its changes go.) # more /usr/src/sys/powerpc/conf/GENERIC64vtsc-NODBG # # GENERIC -- Custom configuration for the powerpc/powerpc64 # include "GENERIC64" ident GENERIC64vtsc-NODGB makeoptions DEBUG=3D-g # Build kernel with gdb(1) = debug symbols nooptions PS3 # Sony Playstation 3 = HACK!!! to allow sc options KDB # Enable kernel debugger support # For minimum debugger support (stable branch) use: options KDB_TRACE # Print a stack trace for a = panic options DDB # Enable the kernel debugger options GDB # HACK!!! ... # Extra stuff: #options VERBOSE_SYSINIT # Enable verbose sysinit = messages #options BOOTVERBOSE=3D1 #options BOOTHOWTO=3DRB_VERBOSE #options KTR #options KTR_MASK=3DKTR_TRAP ##options KTR_CPUMASK=3D0xF #options KTR_VERBOSE # HACK!!! to allow sc for 2560x1440 display on Radeon X1950 that vt = historically mishandled during booting device sc #device kbdmux # HACK: already listed by vt options SC_OFWFB # OFW frame buffer options SC_DFLT_FONT # compile font in makeoptions SC_DFLT_FONT=3Dcp437 # Disable any extra checking for. . . nooptions DEADLKRES # Enable the deadlock resolver nooptions INVARIANTS # Enable calls of extra sanity = checking nooptions INVARIANT_SUPPORT # Extra sanity checks of = internal structures, required by INVARIANTS nooptions WITNESS # Enable checks to detect = deadlocks and cycles nooptions WITNESS_SKIPSPIN # Don't run witness on spinlocks = for speed nooptions DIAGNOSTIC nooptions MALLOC_DEBUG_MAXZONES # Separate malloc(9) zones # more = ~/src.configs/src.conf.powerpc64-clang_altbinutils-bootstrap.powerpc64-hos= t TO_TYPE=3Dpowerpc64 TOOLS_TO_TYPE=3D${TO_TYPE} VERSION_CONTEXT=3D12.0 # KERNCONF=3DGENERIC64vtsc-NODBG TARGET=3Dpowerpc .if ${.MAKE.LEVEL} =3D=3D 0 TARGET_ARCH=3D${TO_TYPE} .export TARGET_ARCH .endif # #WITH_CROSS_COMPILER=3D WITH_SYSTEM_COMPILER=3D # # llvm's libunwind assserts during its build # and two of its .S files get tons of error reports. # So avoid llvm's libunwind for now. WITHOUT_LLVM_LIBUNWIND=3D WITH_LIBCPLUSPLUS=3D WITHOUT_BINUTILS_BOOTSTRAP=3D WITH_ELFTOOLCHAIN_BOOTSTRAP=3D #WITH_CLANG_BOOTSTRAP=3D WITH_CLANG=3D WITH_CLANG_IS_CC=3D WITH_CLANG_FULL=3D WITH_CLANG_EXTRAS=3D WITHOUT_LLD_BOOTSTRAP=3D WITH_LLD=3D WITHOUT_LLD_IS_LD=3D WITH_LLDB=3D # WITH_BOOT=3D WITH_LIB32=3D # WITHOUT_GCC_BOOTSTRAP=3D WITHOUT_GCC=3D WITHOUT_GCC_IS_CC=3D WITHOUT_GNUCXX=3D # NO_WERROR=3D # # Avoid converts between pointers to integer types with different sign = [-Werror,-Wpointer-sign] # and such from blocking the build. WERROR=3D # MALLOC_PRODUCTION=3D # WITH_REPRODUCIBLE_BUILD=3D WITH_DEBUG_FILES=3D # # # For TO (so-called "cross") stages . . . # So-called-cross via ${TO_TYPE}-xtoolchain-gcc/${TO_TYPE}-gcc. . . # TOOLS_TO_TYPE based on ${TO_TYPE}-xtoolchain-gcc related binutils. . . # # # =46rom based on clang (via system). . . # CROSS_BINUTILS_PREFIX=3D/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/ .if ${.MAKE.LEVEL} =3D=3D 0 # CFLAGS.clang+=3D -B${CROSS_BINUTILS_PREFIX} CXXFLAGS.clang+=3D -B${CROSS_BINUTILS_PREFIX} .export CFLAGS.clang .export CXXFLAGS.clang AS=3D/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/as AR=3D/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/ar NM=3D/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/nm OBJCOPY=3D/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/objcopy OBJDUMP=3D/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/objdump RANLIB=3D/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/ranlib XSIZE=3D/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/size #NO-SUCH: STRINGS=3D/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/strings STRINGS=3D/usr/local/bin/${TOOLS_TO_TYPE}-freebsd-strings .export AS .export AR .export NM .export OBJCOPY .export OBJDUMP .export RANLIB .export SIZE .export STRINGS LD=3D/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/ld .export LD .endif # more = ~/sys_build_scripts.powerpc64-host/make_powerpc64vtsc_nodebug_clang_altbin= utils-powerpc64-host = kldload -n filemon && \ script = ~/sys_typescripts/typescript_make_powerpc64vtsc_nodebug_clang_altbinutils-= powerpc64-host-$(date +%Y-%m-%d:%H:%M:%S) \ env __MAKE_CONF=3D"/root/src.configs/make.conf" \ SRCCONF=3D"/dev/null" = SRC_ENV_CONF=3D"/root/src.configs/src.conf.powerpc64-clang_altbinutils-boo= tstrap.powerpc64-host" \ WITH_META_MODE=3Dyes \ = MAKEOBJDIRPREFIX=3D"/usr/obj/powerpc64vtsc_clang_altbinutils/powerpc.power= pc64" \ make $* (I also cross build from amd64 a lot.) =3D=3D=3D Mark Millard markmi at dsl-only.net
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6BBEEE64-04D3-464B-BF42-3836C3E90AD4>