From 187b297ab6cc32ae42014c3f5bd17ad810c9657d Mon Sep 17 00:00:00 2001 From: Simon Schubert Date: Thu, 29 Oct 2009 15:53:56 +0100 Subject: [PATCH] gdb/binutils220: don't terminate bfd target list prematurely We must not insert a NULL field into the list of targets, since targets.c appends some default vectors (namely binary and hex, etc.). With the NULL termination, these vectors never show up. --- gnu/usr.bin/binutils220/libbfd/Makefile | 9 +++++++-- gnu/usr.bin/gdb/libbfd/Makefile | 9 +++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/gnu/usr.bin/binutils220/libbfd/Makefile b/gnu/usr.bin/binutils220/libbfd/Makefile index 856ee8de3e..6e6e4ad09d 100644 --- a/gnu/usr.bin/binutils220/libbfd/Makefile +++ b/gnu/usr.bin/binutils220/libbfd/Makefile @@ -31,11 +31,16 @@ elf64-target.h: elfxx-target.h TARGET_ARCH?= ${MACHINE_ARCH} .include "Makefile.${TARGET_ARCH}" +_selvec= .for _v in ${VECTORS} CFLAGS+= -DHAVE_${_v} +.if !empty(_selvec) +_selvec+= , +.endif +_selvec+= &${_v} .endfor -CFLAGS+= -DSELECT_VECS='${VECTORS:S/^/\&/:S/$/,/} NULL' -CFLAGS+= -DSELECT_ARCHITECTURES='${ARCHITECTURES:S/^/\&/:S/$/,/} NULL' +CFLAGS+= -DSELECT_VECS='${_selvec}' +CFLAGS+= -DSELECT_ARCHITECTURES='${ARCHITECTURES:S/^/\&/:S/$/,/} 0' CFLAGS+= -DDEFAULT_VECTOR=${DEFAULT_VECTOR} diff --git a/gnu/usr.bin/gdb/libbfd/Makefile b/gnu/usr.bin/gdb/libbfd/Makefile index bfbfafb29e..d9f9c9968f 100644 --- a/gnu/usr.bin/gdb/libbfd/Makefile +++ b/gnu/usr.bin/gdb/libbfd/Makefile @@ -31,11 +31,16 @@ elf64-target.h: elfxx-target.h TARGET_ARCH?= ${MACHINE_ARCH} .include "Makefile.${TARGET_ARCH}" +_selvec= .for _v in ${VECTORS} CFLAGS+= -DHAVE_${_v} +.if !empty(_selvec) +_selvec+= , +.endif +_selvec+= &${_v} .endfor -CFLAGS+= -DSELECT_VECS='${VECTORS:S/^/\&/:S/$/,/} NULL' -CFLAGS+= -DSELECT_ARCHITECTURES='${ARCHITECTURES:S/^/\&/:S/$/,/} NULL' +CFLAGS+= -DSELECT_VECS='${_selvec}' +CFLAGS+= -DSELECT_ARCHITECTURES='${ARCHITECTURES:S/^/\&/:S/$/,/} 0' CFLAGS+= -DDEFAULT_VECTOR=${DEFAULT_VECTOR} -- 2.41.0