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