Fix gdb/kgdb build under WITH_PIE

Explicitly specified bare .a libraries need ${PIE_SUFFIX}.

Reported by:	David E. Cross, on twitter
Sponsored by:	The FreeBSD Foundation
This commit is contained in:
Ed Maste 2019-04-01 19:19:51 +00:00
parent b2bbb74489
commit 14bffecf74
2 changed files with 8 additions and 6 deletions

View File

@ -3,9 +3,10 @@
PROG= gdb${GDB_SUFFIX}
SRCS= gdb.c
BULIBS= ${OBJ_BU}/libbfd/libbfd.a ${OBJ_BU}/libopcodes/libopcodes.a \
${OBJ_BU}/libiberty/libiberty.a
GDBLIBS= ${OBJ_GDB}/libgdb/libgdb.a
BULIBS= ${OBJ_BU}/libbfd/libbfd${PIE_SUFFIX}.a \
${OBJ_BU}/libopcodes/libopcodes${PIE_SUFFIX}.a \
${OBJ_BU}/libiberty/libiberty${PIE_SUFFIX}.a
GDBLIBS= ${OBJ_GDB}/libgdb/libgdb${PIE_SUFFIX}.a
# libthread_db.so calls back into gdb for the proc services. Make all the
# global symbols visible.

View File

@ -4,9 +4,10 @@ PROG= kgdb${GDB_SUFFIX}
SRCS= main.c kld.c kthr.c trgt.c trgt_${TARGET_CPUARCH}.c
WARNS?= 2
BULIBS= ${OBJ_BU}/libbfd/libbfd.a ${OBJ_BU}/libopcodes/libopcodes.a \
${OBJ_BU}/libiberty/libiberty.a
GDBLIBS= ${OBJ_GDB}/libgdb/libgdb.a
BULIBS= ${OBJ_BU}/libbfd/libbfd${PIE_SUFFIX}.a \
${OBJ_BU}/libopcodes/libopcodes${PIE_SUFFIX}.a \
${OBJ_BU}/libiberty/libiberty${PIE_SUFFIX}.a
GDBLIBS= ${OBJ_GDB}/libgdb/libgdb${PIE_SUFFIX}.a
DPADD= ${GDBLIBS} ${BULIBS}
LDADD= ${GDBLIBS} ${BULIBS}