Date: Wed, 14 Nov 2018 15:40:48 -0800 From: Mark Millard <marklmi@yahoo.com> To: Bryan Drewery <bdrewery@FreeBSD.org> Cc: ports-list freebsd <freebsd-ports@freebsd.org>, freebsd-x11@freebsd.org, Jan Beich <jbeich@FreeBSD.org> Subject: Re: ports head -r487783: on armv7 x11/pixman fails to build: /usr/bin/ld: error: can't create dynamic relocation R_ARM_V4BX against local symbol in readonly segment; recompile object files with -fPIC Message-ID: <C2658D3B-E706-4556-BFE4-2496C7CD2B7E@yahoo.com> In-Reply-To: <51a82f62-13df-a485-4d5a-7dbfa3d1107f@FreeBSD.org> References: <56BE95DD-61E5-43CB-923D-10E968003FE3@yahoo.com> <5FF705ED-B019-4CB1-B516-796C2E7A6FF9@yahoo.com> <F589E76E-072F-4A89-AA4A-F5209FBDFBC0@yahoo.com> <E85CED1A-7AAA-4415-9154-A7C90E7B3D09@yahoo.com> <51a82f62-13df-a485-4d5a-7dbfa3d1107f@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
[Evidence from inside poudriere bulk -j... -i ports-mgmt/pkg . Use of native /nxb-bin/. . . leads to MACHINE_ARCH being amd64 instead of armv7 or the like. See later supporting material.] On 2018-Nov-14, at 14:38, Bryan Drewery <bdrewery@FreeBSD.org> wrote: > On 11/14/18 2:35 PM, Mark Millard wrote: >> [Looking at package fallout logs: the official armv6 and armv7 >> builds are using -O2 because of MACHINE_ARCH being defined >> because of qemu-user-static use. (mips too?) The logic in >> share/mk/sys.mk is not causing -O . An implication >> is that -O2 for armv6 and armv7 is probably far more tested >> than people generally expect. The share/mk/sys.mk change >> goes back to -r319861 2017-Jun-12 . Previously the logic >> would have caused -O use for armv6 or armv7 in MACHINE_ARCH .] >=20 > r319861 doesn't look related here. # more /etc/make.conf=20 .sinclude "/etc/make.nxb.conf" USE_PACKAGE_DEPENDS=3Dyes BATCH=3Dyes WRKDIRPREFIX=3D/wrkdirs PORTSDIR=3D/usr/ports PACKAGES=3D/packages DISTDIR=3D/distfiles FORCE_PACKAGE=3Dyes PACKAGE_BUILDING=3Dyes PACKAGE_BUILDING_FLAVORS=3Dyes MACHINE=3Darm MACHINE_ARCH=3Darmv7 ARCH=3D${MACHINE_ARCH} #### /usr/local/etc/poudriere.d/make.conf #### #### /usr/ports/Mk/Scripts/ports_env.sh #### _CCVERSION_9d218390=3DFreeBSD clang version 6.0.1 = (tags/RELEASE_601/final 335540) (based on LLVM 6.0.1) Target: = armv7-unknown-freebsd13.0-gnueabihf Thread model: posix InstalledDir: = /nxb-bin/usr/bin _ALTCCVERSION_9d218390=3Dnone _CXXINTERNAL_9c45a5b1=3DFreeBSD clang version 6.0.1 = (tags/RELEASE_601/final 335540) (based on LLVM 6.0.1) Target: = armv7-unknown-freebsd13.0-gnueabihf Thread model: posix InstalledDir: = /nxb-bin/usr/bin "/nxb-bin/usr/bin/ld" "--eh-frame-hdr" = "-dynamic-linker" "/libexec/ld-elf.so.1" "--hash-style=3Dboth" = "--enable-new-dtags" "-o" "a.out" "/usr/lib/crt1.o" "/usr/lib/crti.o" = "/usr/lib/crtbegin.o" "-L/usr/lib" "/dev/null" "-lc++" "-lm" "-lgcc" = "--as-needed" "-lgcc_s" "--no-as-needed" "-lc" "-lgcc" "--as-needed" = "-lgcc_s" "--no-as-needed" "/usr/lib/crtend.o" "/usr/lib/crtn.o" CC_OUTPUT_9d218390_58173849=3Dyes CC_OUTPUT_9d218390_9bdba57c=3Dyes CC_OUTPUT_9d218390_6a4fe7f5=3Dyes CC_OUTPUT_9d218390_6bcac02b=3Dyes CC_OUTPUT_9d218390_67d20829=3Dyes CC_OUTPUT_9d218390_bfa62e83=3Dyes CC_OUTPUT_9d218390_f0b4d593=3Dyes CC_OUTPUT_9d218390_308abb44=3Dyes CC_OUTPUT_9d218390_f00456e5=3Dyes CC_OUTPUT_9d218390_65ad290d=3Dyes CC_OUTPUT_9d218390_f2776b26=3Dyes CC_OUTPUT_9d218390_b2657cc3=3Dyes CC_OUTPUT_9d218390_380987f7=3Dyes CC_OUTPUT_9d218390_160933ec=3Dyes CC_OUTPUT_9d218390_fb62803b=3Dyes _OBJC_CCVERSION_9d218390=3DFreeBSD clang version 6.0.1 = (tags/RELEASE_601/final 335540) (based on LLVM 6.0.1) Target: = armv7-unknown-freebsd13.0-gnueabihf Thread model: posix InstalledDir: = /nxb-bin/usr/bin _OBJC_ALTCCVERSION_9d218390=3Dnone ARCH=3Darmv7 OPSYS=3DFreeBSD _OSRELEASE=3D13.0-CURRENT OSREL=3D13.0 OSVERSION=3D1300003 PYTHONBASE=3D/usr/local _SMP_CPUS=3D32 CONFIGURE_MAX_CMD_LEN=3D262144 HAVE_PORTS_ENV=3D1 #### Misc Poudriere #### GID=3D0 UID=3D0 PACKAGES=3D/packages # more /etc/src.conf /etc/src.conf: No such file or directory # more Makefile all: echo ${MACHINE_ARCH} echo ${MACHINE_CPUARCH} echo ${CFLAGS} # make echo armv7 armv7 echo arm arm echo -O2 -pipe -O2 -pipe # grep -r "\-O2" /usr/src/share/mk/ /usr/src/share/mk/sys.mk:CFLAGS ?=3D -O2 -pipe # grep -r "\-pipe" /usr/src/share/mk/ /usr/src/share/mk/sys.mk:CFLAGS ?=3D -O -pipe /usr/src/share/mk/sys.mk:CFLAGS ?=3D -O2 -pipe Those lines come from: .if ${MACHINE_CPUARCH} =3D=3D "arm" || ${MACHINE_CPUARCH} =3D=3D "mips" CFLAGS ?=3D -O -pipe .else CFLAGS ?=3D -O2 -pipe .endif So I used: # make -dA 2>2mmjnk.txt 1>1mmjnk.txt and looked for the first -pipe in 2mmjnk.txt. (It is also the first -O , in this case -O2 .) . . . Got = 'C/mips(n32|64)?(el)?(hf)?/mips/:C/arm(v[67])?(eb)?/arm/:C/powerpc(64|spe)= /powerpc/:C/riscv64(sf)?/riscv/' from '${__TO_CPUARCH}'} Applying[MACHINE_ARCH] :C to "amd64" Modifier pattern: "mips(n32|64)?(el)?(hf)?" Modifier pattern: "mips" Result[MACHINE_ARCH] of :C is "amd64" Applying[MACHINE_ARCH] :C to "amd64" Modifier pattern: "arm(v[67])?(eb)?" Modifier pattern: "arm" Result[MACHINE_ARCH] of :C is "amd64" Applying[MACHINE_ARCH] :C to "amd64" Modifier pattern: "powerpc(64|spe)" Modifier pattern: "powerpc" Result[MACHINE_ARCH] of :C is "amd64" Applying[MACHINE_ARCH] :C to "amd64" Modifier pattern: "riscv64(sf)?" Modifier pattern: "riscv" Result[MACHINE_ARCH] of :C is "amd64" lhs =3D "amd64", rhs =3D "arm", op =3D =3D=3D Got = 'C/mips(n32|64)?(el)?(hf)?/mips/:C/arm(v[67])?(eb)?/arm/:C/powerpc(64|spe)= /powerpc/:C/riscv64(sf)?/riscv/' from '${__TO_CPUARCH}'} Applying[MACHINE_ARCH] :C to "amd64" Modifier pattern: "mips(n32|64)?(el)?(hf)?" Modifier pattern: "mips" Result[MACHINE_ARCH] of :C is "amd64" Applying[MACHINE_ARCH] :C to "amd64" Modifier pattern: "arm(v[67])?(eb)?" Modifier pattern: "arm" Result[MACHINE_ARCH] of :C is "amd64" Applying[MACHINE_ARCH] :C to "amd64" Modifier pattern: "powerpc(64|spe)" Modifier pattern: "powerpc" Result[MACHINE_ARCH] of :C is "amd64" Applying[MACHINE_ARCH] :C to "amd64" Modifier pattern: "riscv64(sf)?" Modifier pattern: "riscv" Result[MACHINE_ARCH] of :C is "amd64" lhs =3D "amd64", rhs =3D "mips", op =3D =3D=3D ParseReadLine (172): 'CFLAGS ?=3D -O2 -pipe' Global:CFLAGS =3D -O2 -pipe It looks like the poudriere builds based on /nxb-bin/. . . See the amd64 MACHINE_ARCH in the context that shows: # uname -apKU FreeBSD FBSDamd64TR 13.0-CURRENT FreeBSD 13.0-CURRENT arm armv7 1300003 = 1300003 =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?C2658D3B-E706-4556-BFE4-2496C7CD2B7E>