Kernel analysis utility for live systems, netdump, diskdump, kdump, LKCD or mcore dumpfiles
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
1.4 KiB

  1. --- crash-7.3.2/Makefile.orig
  2. +++ crash-7.3.2/Makefile
  3. @@ -201,7 +201,7 @@ GDB_FLAGS=
  4. # TARGET_CFLAGS will be configured automatically by configure
  5. TARGET_CFLAGS=
  6. -CRASH_CFLAGS=-g -D${TARGET} ${TARGET_CFLAGS} ${GDB_FLAGS} ${CFLAGS}
  7. +CRASH_CFLAGS=-g -D${TARGET} ${TARGET_CFLAGS} ${GDB_FLAGS} ${CFLAGS} ${CPPFLAGS} -fPIE
  8. GPL_FILES=
  9. TAR_FILES=${SOURCE_FILES} Makefile ${GPL_FILES} README .rh_rpm_package crash.8 \
  10. @@ -253,7 +253,7 @@ all: make_configure
  11. gdb_merge: force
  12. @if [ ! -f ${GDB}/README ]; then \
  13. $(MAKE) gdb_unzip; fi
  14. - @echo "${LDFLAGS} -lz -llzo2 -lsnappy -lzstd -ldl -rdynamic" > ${GDB}/gdb/mergelibs
  15. + @echo "${LDFLAGS} -lz -llzo2 -lsnappy -lzstd -ldl -rdynamic -Wl,-z,now -fpie" > ${GDB}/gdb/mergelibs
  16. @echo "../../${PROGRAM} ../../${PROGRAM}lib.a" > ${GDB}/gdb/mergeobj
  17. @rm -f ${PROGRAM}
  18. @if [ ! -f ${GDB}/config.status ]; then \
  19. --- crash-7.3.2/configure.c.orig
  20. +++ crash-7.3.2/configure.c
  21. @@ -800,7 +800,8 @@ build_configure(struct supported_gdb_version *sp)
  22. fprintf(fp2, "%s\n", sp->GDB);
  23. sprintf(target_data.gdb_version, "%s", &sp->GDB[4]);
  24. } else if (strncmp(buf, "LDFLAGS=", strlen("LDFLAGS=")) == 0) {
  25. - fprintf(fp2, "LDFLAGS=%s\n", ldflags ? ldflags : "");
  26. + if (ldflags)
  27. + fprintf(fp2, "LDFLAGS=%s\n", ldflags ? ldflags : "");
  28. } else
  29. fprintf(fp2, "%s", buf);
  30. --