Index: head/gnu/usr.bin/gdb/Makefile.inc =================================================================== --- head/gnu/usr.bin/gdb/Makefile.inc (revision 359773) +++ head/gnu/usr.bin/gdb/Makefile.inc (revision 359774) @@ -1,71 +1,71 @@ # $FreeBSD$ .include VERSION= "6.1.1 [FreeBSD]" VENDOR= marcel PACKAGE= gdb BMAKE_GDB= ${.CURDIR:H} BMAKE_ROOT= ${BMAKE_GDB:H} BMAKE_BU= ${BMAKE_ROOT}/binutils CNTRB_BU= ${SRCTOP}/contrib/binutils CNTRB_GDB= ${SRCTOP}/contrib/gdb OBJ_BU= ${OBJTOP}/gnu/usr.bin/binutils OBJ_GDB= ${OBJTOP}/gnu/usr.bin/gdb # These assignments duplicate much of the functionality of # MACHINE_CPUARCH, but there's no easy way to export make functions... .if defined(TARGET_ARCH) TARGET_CPUARCH=${TARGET_ARCH:${__TO_CPUARCH}} .else TARGET_CPUARCH=${MACHINE_CPUARCH} .endif TARGET_ARCH?= ${MACHINE_ARCH} TARGET_SUBDIR= ${BMAKE_GDB}/arch/${TARGET_CPUARCH} .if ${TARGET_ARCH} != ${MACHINE_ARCH} GDB_CROSS_DEBUGGER= .endif .PATH: ${CNTRB_GDB}/gdb ${CNTRB_GDB}/gdb/cli ${CNTRB_GDB}/gdb/mi \ ${CNTRB_GDB}/gdb/signals ${CNTRB_GDB}/gdb/tui ${TARGET_SUBDIR} CFLAGS+= -DHAVE_CONFIG_H -DRL_NO_COMPAT -DMI_OUT=1 CFLAGS+= -DDEBUGDIR=\"${DEBUGDIR}\" CFLAGS+= -I. CFLAGS+= -I${TARGET_SUBDIR} CFLAGS+= -I${BMAKE_BU}/libbfd -I${BMAKE_BU}/libbfd/${TARGET_CPUARCH} CFLAGS+= -I${CNTRB_GDB}/gdb CFLAGS+= -I${CNTRB_GDB}/gdb/config CFLAGS+= -I${CNTRB_BU}/include CFLAGS+= -I${CNTRB_GDB}/include CFLAGS+= -I${CNTRB_BU}/bfd CFLAGS+= -I${SYSROOT:U${DESTDIR}}/${INCLUDEDIR}/edit # Some bits here currently rely on some of the linker-merging magic that happens # with -fcommon. While this is the default right now, explicitly set -fcommon # so that it continues to build when the default flips. -CFLAGS+= -fcommon +CFCOMMONFLAG= -fcommon GENSRCS+= nm.h tm.h .if defined(GDB_CROSS_DEBUGGER) CFLAGS+= -DCROSS_DEBUGGER -I${BMAKE_ROOT:H:H} GDB_SUFFIX= -${TARGET_ARCH} MAN= .else BINDIR?= /usr/libexec MAN= .endif .include "${TARGET_SUBDIR}/Makefile" SRCS+= ${GENSRCS} CLEANFILES+= ${GENSRCS} .include "../Makefile.inc" Index: head/share/mk/src.sys.mk =================================================================== --- head/share/mk/src.sys.mk (revision 359773) +++ head/share/mk/src.sys.mk (revision 359774) @@ -1,44 +1,45 @@ # $FreeBSD$ # Note: This file is also duplicated in the sys/conf/kern.pre.mk so # it will always grab SRCCONF, even if it isn't being built in-tree # to preserve historical (and useful) behavior. Changes here need to # be reflected there so SRCCONF isn't included multiple times. .if !defined(_WITHOUT_SRCCONF) # Allow user to configure things that only effect src tree builds. SRCCONF?= /etc/src.conf .if !empty(SRCCONF) && \ (exists(${SRCCONF}) || ${SRCCONF} != "/etc/src.conf") && \ !target(_srcconf_included_) # Validate that the user didn't try setting an env-only variable in # their src.conf. This benefits from already including bsd.mkopt.mk. .for var in ${__ENV_ONLY_OPTIONS:O:u} __presrcconf_${var}:= ${MK_${var}:U-}${WITHOUT_${var}:Uno:Dyes}${WITH_${var}:Uno:Dyes} .endfor .sinclude "${SRCCONF}" _srcconf_included_: .NOTMAIN # Validate the env-only variables. .for var in ${__ENV_ONLY_OPTIONS:O:u} __postrcconf_${var}:= ${MK_${var}:U-}${WITHOUT_${var}:Uno:Dyes}${WITH_${var}:Uno:Dyes} .if ${__presrcconf_${var}} != ${__postrcconf_${var}} .error Option ${var} may only be defined in ${SRC_ENV_CONF}, environment, or make argument, not ${SRCCONF}. .endif .undef __presrcconf_${var} .undef __postrcconf_${var} .endfor .endif # SRCCONF .endif # The following should be removed no earlier than LLVM11 being imported into the # tree, to ensure we don't regress the build. LLVM11 and GCC10 will switch the # default over to -fno-common, making this redundant. -CFLAGS+= -fno-common +CFCOMMONFLAG?= -fno-common +CFLAGS+= ${CFCOMMONFLAG} # tempting, but bsd.compiler.mk causes problems this early # probably need to remove dependence on bsd.own.mk #.include "src.opts.mk"