Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 Nov 2014 13:37:10 -0800
From:      Sean Bruno <sbruno@ignoranthack.me>
To:        freebsd-arch@freebsd.org
Subject:   How is MACHINE_ARCH dervived by make?
Message-ID:  <1417037830.4680.4.camel@ignoranthack.me>

next in thread | raw e-mail | index | archive | help
I have yet to find the magic bit in the build sys that causes ports to
go off and think that I'm building for amd64.  Building on a real amd64
box inside of an emulated jail via qemu and I still am getting tripped
up by something in our system thinking that I want amd64 as the
MACHINE_ARCH.

----  emulation jail, showing arm/armv6 ------
root@crack:/usr/share/mk # uname -a
FreeBSD crack.ysv.freebsd.org 11.0-CURRENT FreeBSD 11.0-CURRENT #0
r274799: Fri Nov 21 17:29:42 UTC 2014     
sbruno@crack.ysv.freebsd.org:/usr/obj/usr/src/sys/CRACK  arm

root@crack:/usr/share/mk # sysctl hw.machine_arch hw.machine
hw.machine_arch: armv6
hw.machine: arm
----------

e.g. math/fftw3 --> make -DBATCH -dA
------

Global:.CURDIR = /usr/ports/math/fftw3
Caching /usr/ports/math/fftw3 ...done
Global:.OBJDIR = /usr/ports/math/fftw3
Caching . ...done
Global:delete .PATH (not found)
Global:.PATH = .
Global:.PATH = . /usr/ports/math/fftw3
Global:.TARGETS = 
Caching /usr/share/mk ...done
Expanding "sys.mk"... /usr/share/mk/sys.mk 
Internal:MAKEFILE = /usr/share/mk/sys.mk
Global:.MAKE.MAKEFILES = /usr/share/mk/sys.mk
Parse_SetInput: file /usr/share/mk/sys.mk, line 0, fd -1, nextbuf
0x413210, arg 0x800c5d370
Global:.PARSEDIR = /usr/share/mk
Global:.PARSEFILE = sys.mk
ParseSetParseFile: ${.PARSEDIR} = `/usr/share/mk' ${.PARSEFILE} =
`sys.mk'
ParseReadLine (4): 'unix                ?=      We run FreeBSD, not
UNIX.'
Global:unix = We run FreeBSD, not UNIX.
ParseReadLine (5): '.FreeBSD    ?=      true'
Global:.FreeBSD = true
ParseReadLine (16): 'MACHINE_CPUARCH=${MACHINE_ARCH:C/mips(n32|
64)?(el)?/mips/:C/arm(v6)?(eb|hf)?/arm/:C/powerpc64/powerpc/}'
Global:MACHINE_CPUARCH = ${MACHINE_ARCH:C/mips(n32|
64)?(el)?/mips/:C/arm(v6)?(eb|hf)?/arm/:C/powerpc64/powerpc/}
ParseReadLine (31):
'.SUFFIXES: .out .a .ln .o .c .cc .cpp .cxx .C .m .F .f .e .r .y .l .S .asm .s .cl .p .h .sh'
ParseDoDependency(.SUFFIXES:    .out .a .ln .o .c .cc .cpp .cxx .C .m .F .f .e .r .y .l .S .asm .s .cl .p .h .sh)
ParseReadLine (34): 'AR         ?=      ar'
Global:AR = ar
ParseReadLine (38): 'ARFLAGS            ?=      -crD'
Global:ARFLAGS = -crD
ParseReadLine (40): 'RANLIB             ?=      ranlib'
Global:RANLIB = ranlib
ParseReadLine (42): 'RANLIBFLAGS        ?=      -D'
Global:RANLIBFLAGS = -D
ParseReadLine (45): 'AS         ?=      as'
Global:AS = as
ParseReadLine (46): 'AFLAGS             ?='
Global:AFLAGS = 
ParseReadLine (47): 'ACFLAGS            ?='
Global:ACFLAGS = 
ParseReadLine (53): 'CC         ?=      cc'
Global:CC = cc
Applying[MACHINE_ARCH] :C to "amd64"
Modifier pattern: "mips(n32|64)?(el)?"
Modifier pattern: "mips"
Result[MACHINE_ARCH] of :C is "amd64"
Applying[MACHINE_ARCH] :C to "amd64"
Modifier pattern: "arm(v6)?(eb|hf)?"
Modifier pattern: "arm"
Result[MACHINE_ARCH] of :C is "amd64"
Applying[MACHINE_ARCH] :C to "amd64"
Modifier pattern: "powerpc64"
Modifier pattern: "powerpc"
Result[MACHINE_ARCH] of :C is "amd64"
lhs = "amd64", rhs = "arm", op = ==
Applying[MACHINE_ARCH] :C to "amd64"
Modifier pattern: "mips(n32|64)?(el)?"
Modifier pattern: "mips"
Result[MACHINE_ARCH] of :C is "amd64"
Applying[MACHINE_ARCH] :C to "amd64"
Modifier pattern: "arm(v6)?(eb|hf)?"
Modifier pattern: "arm"








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