|
|
b255b1 |
diff --git crash-7.2.8/Makefile crash-7.2.8/Makefile
|
|
|
b255b1 |
index d0574d8f07d3..9dbb61d0dbc8 100644
|
|
|
b255b1 |
--- crash-7.2.8/Makefile
|
|
|
b255b1 |
+++ crash-7.2.8/Makefile
|
|
|
7f4b96 |
@@ -198,7 +198,7 @@ GDB_FLAGS=
|
|
|
7f4b96 |
# TARGET_CFLAGS will be configured automatically by configure
|
|
|
7f4b96 |
TARGET_CFLAGS=
|
|
|
7f4b96 |
|
|
|
7f4b96 |
-CRASH_CFLAGS=-g -D${TARGET} ${TARGET_CFLAGS} ${GDB_FLAGS} ${CFLAGS}
|
|
|
7f4b96 |
+CRASH_CFLAGS=-g -D${TARGET} ${TARGET_CFLAGS} ${GDB_FLAGS} ${CFLAGS} ${CPPFLAGS} -fPIE
|
|
|
7f4b96 |
|
|
|
b255b1 |
GPL_FILES=
|
|
|
7f4b96 |
TAR_FILES=${SOURCE_FILES} Makefile ${GPL_FILES} README .rh_rpm_package crash.8 \
|
|
|
7f4b96 |
@@ -228,7 +228,7 @@ all: make_configure
|
|
|
7f4b96 |
gdb_merge: force
|
|
|
7f4b96 |
@if [ ! -f ${GDB}/README ]; then \
|
|
|
7f4b96 |
make --no-print-directory gdb_unzip; fi
|
|
|
7f4b96 |
- @echo "${LDFLAGS} -lz -llzo2 -lsnappy -ldl -rdynamic" > ${GDB}/gdb/mergelibs
|
|
|
7f4b96 |
+ @echo "${LDFLAGS} -lz -llzo2 -lsnappy -ldl -rdynamic -Wl,-z,now -fpie" > ${GDB}/gdb/mergelibs
|
|
|
7f4b96 |
@echo "../../${PROGRAM} ../../${PROGRAM}lib.a" > ${GDB}/gdb/mergeobj
|
|
|
7f4b96 |
@rm -f ${PROGRAM}
|
|
|
7f4b96 |
@if [ ! -f ${GDB}/config.status ]; then \
|
|
|
b255b1 |
diff --git crash-7.2.8/configure.c crash-7.2.8/configure.c
|
|
|
b255b1 |
index 75006e881f5a..06c94d58c56c 100644
|
|
|
b255b1 |
--- crash-7.2.8/configure.c
|
|
|
b255b1 |
+++ crash-7.2.8/configure.c
|
|
|
b255b1 |
@@ -780,7 +780,8 @@ build_configure(struct supported_gdb_version *sp)
|
|
|
7f4b96 |
fprintf(fp2, "%s\n", sp->GDB);
|
|
|
7f4b96 |
sprintf(target_data.gdb_version, "%s", &sp->GDB[4]);
|
|
|
7f4b96 |
} else if (strncmp(buf, "LDFLAGS=", strlen("LDFLAGS=")) == 0) {
|
|
|
7f4b96 |
- fprintf(fp2, "LDFLAGS=%s\n", ldflags ? ldflags : "");
|
|
|
7f4b96 |
+ if (ldflags)
|
|
|
b255b1 |
+ fprintf(fp2, "LDFLAGS=%s\n", ldflags ? ldflags : "");
|
|
|
7f4b96 |
} else
|
|
|
7f4b96 |
fprintf(fp2, "%s", buf);
|