2022-11-08 06:43:27 +00:00
|
|
|
--- crash-7.3.2/Makefile.orig
|
|
|
|
+++ crash-7.3.2/Makefile
|
|
|
|
@@ -201,7 +201,7 @@ GDB_FLAGS=
|
2019-05-07 13:44:18 +00:00
|
|
|
# TARGET_CFLAGS will be configured automatically by configure
|
|
|
|
TARGET_CFLAGS=
|
|
|
|
|
|
|
|
-CRASH_CFLAGS=-g -D${TARGET} ${TARGET_CFLAGS} ${GDB_FLAGS} ${CFLAGS}
|
|
|
|
+CRASH_CFLAGS=-g -D${TARGET} ${TARGET_CFLAGS} ${GDB_FLAGS} ${CFLAGS} ${CPPFLAGS} -fPIE
|
|
|
|
|
2020-11-03 12:07:52 +00:00
|
|
|
GPL_FILES=
|
2019-05-07 13:44:18 +00:00
|
|
|
TAR_FILES=${SOURCE_FILES} Makefile ${GPL_FILES} README .rh_rpm_package crash.8 \
|
2022-11-08 06:43:27 +00:00
|
|
|
@@ -253,7 +253,7 @@ all: make_configure
|
2019-05-07 13:44:18 +00:00
|
|
|
gdb_merge: force
|
|
|
|
@if [ ! -f ${GDB}/README ]; then \
|
2022-11-08 06:43:27 +00:00
|
|
|
$(MAKE) gdb_unzip; fi
|
2022-05-10 07:04:45 +00:00
|
|
|
- @echo "${LDFLAGS} -lz -llzo2 -lsnappy -lzstd -ldl -rdynamic" > ${GDB}/gdb/mergelibs
|
|
|
|
+ @echo "${LDFLAGS} -lz -llzo2 -lsnappy -lzstd -ldl -rdynamic -Wl,-z,now -fpie" > ${GDB}/gdb/mergelibs
|
2019-05-07 13:44:18 +00:00
|
|
|
@echo "../../${PROGRAM} ../../${PROGRAM}lib.a" > ${GDB}/gdb/mergeobj
|
|
|
|
@rm -f ${PROGRAM}
|
|
|
|
@if [ ! -f ${GDB}/config.status ]; then \
|
2022-11-08 06:43:27 +00:00
|
|
|
--- crash-7.3.2/configure.c.orig
|
|
|
|
+++ crash-7.3.2/configure.c
|
2022-05-10 07:04:45 +00:00
|
|
|
@@ -800,7 +800,8 @@ build_configure(struct supported_gdb_version *sp)
|
2019-05-07 13:44:18 +00:00
|
|
|
fprintf(fp2, "%s\n", sp->GDB);
|
|
|
|
sprintf(target_data.gdb_version, "%s", &sp->GDB[4]);
|
|
|
|
} else if (strncmp(buf, "LDFLAGS=", strlen("LDFLAGS=")) == 0) {
|
|
|
|
- fprintf(fp2, "LDFLAGS=%s\n", ldflags ? ldflags : "");
|
|
|
|
+ if (ldflags)
|
2020-11-03 12:07:52 +00:00
|
|
|
+ fprintf(fp2, "LDFLAGS=%s\n", ldflags ? ldflags : "");
|
2019-05-07 13:44:18 +00:00
|
|
|
} else
|
|
|
|
fprintf(fp2, "%s", buf);
|
2022-05-10 07:04:45 +00:00
|
|
|
|
2022-11-08 06:43:27 +00:00
|
|
|
--
|