gdb/binutils220: don't terminate bfd target list prematurely
authorSimon Schubert <corecode@dragonflybsd.org>
Thu, 29 Oct 2009 14:53:56 +0000 (15:53 +0100)
committerSimon 'corecode' Schubert <corecode@fs.ei.tum.de>
Thu, 29 Oct 2009 17:25:22 +0000 (10:25 -0700)
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
gnu/usr.bin/gdb/libbfd/Makefile

index 856ee8d..6e6e4ad 100644 (file)
@@ -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}
 
 
index bfbfafb..d9f9c99 100644 (file)
@@ -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}