Changeset View
Standalone View
stand/defs.mk
Show First 20 Lines • Show All 93 Lines • ▼ Show 20 Lines | |||||
.endif | .endif | ||||
# Machine specific flags for all builds here | # Machine specific flags for all builds here | ||||
# All PowerPC builds are 32 bit. We have no 64-bit loaders on powerpc | # All PowerPC builds are 32 bit. We have no 64-bit loaders on powerpc | ||||
# or powerpc64. | # or powerpc64. | ||||
.if ${MACHINE_ARCH} == "powerpc64" | .if ${MACHINE_ARCH} == "powerpc64" | ||||
CFLAGS+= -m32 -mcpu=powerpc | CFLAGS+= -m32 -mcpu=powerpc | ||||
# Use ld.bfd to workaround ld.lld issues on PowerPC 32 bit | |||||
.if "${COMPILER_TYPE}" == "clang" && "${LINKER_TYPE}" == "lld" | |||||
bdragon: I'm seeing build failures at cleandir stage. I guess LINKER_TYPE isn't being defined at that… | |||||
CFLAGS+= -fuse-ld=${LD_BFD} | |||||
Done Inline Actionshow does LIB32LD get defined? That's 100% opaque to me imp: how does LIB32LD get defined? That's 100% opaque to me | |||||
Done Inline ActionsIt's defined by in Makefile.libcompat.inc1 and passed to 'stand' by Makefile.inc1 through CROSSENV variable. alfredo: It's defined by in Makefile.libcompat.inc1 and passed to 'stand' by Makefile.inc1 through… | |||||
Not Done Inline ActionsThis will fail when compiled stand alone outside of buildworld. imp: This will fail when compiled stand alone outside of buildworld. | |||||
Done Inline ActionsLIB32LD will be passed to stand either through buildworld or by first performing a 'make buildenv' before changing to stand and trying to build it. But when trying to build stand without calling buildenv first, LIB32LD will be undefined. Is that ok? If not, what would be the alternative? Put the LIB32LD detection code in a separate make file that could be included by stand/defs.mk? luporl: LIB32LD will be passed to stand either through buildworld or by first performing a 'make… | |||||
Not Done Inline ActionsNo. I'd say that's not OK. It's almost never OK to have .error statements based on things not being defined. there's too many use cases to know you covered them all. imp: No. I'd say that's not OK. It's almost never OK to have .error statements based on things not… | |||||
Done Inline ActionsLIB32LD still isn't defined in a file that gets included in the build. imp: LIB32LD still isn't defined in a file that gets included in the build.
Defining it all in bsd. | |||||
.endif | |||||
.endif | .endif | ||||
# For amd64, there's a bit of mixed bag. Some of the tree (i386, lib*32) is | # For amd64, there's a bit of mixed bag. Some of the tree (i386, lib*32) is | ||||
# build 32-bit and some 64-bit (lib*, efi). Centralize all the 32-bit magic here | # build 32-bit and some 64-bit (lib*, efi). Centralize all the 32-bit magic here | ||||
# and activate it when DO32 is explicitly defined to be 1. | # and activate it when DO32 is explicitly defined to be 1. | ||||
.if ${MACHINE_ARCH} == "amd64" && ${DO32:U0} == 1 | .if ${MACHINE_ARCH} == "amd64" && ${DO32:U0} == 1 | ||||
CFLAGS+= -m32 | CFLAGS+= -m32 | ||||
# LD_FLAGS is passed directly to ${LD}, not via ${CC}: | # LD_FLAGS is passed directly to ${LD}, not via ${CC}: | ||||
▲ Show 20 Lines • Show All 128 Lines • Show Last 20 Lines |
I'm seeing build failures at cleandir stage. I guess LINKER_TYPE isn't being defined at that point. So ${LINKER_TYPE} would need to be wrapped in quotes, or for LINKER_TYPE to be defined at all stages.