Regen charmonizer.c for --rpath fix
@@ -664,6 +664,7 @@ chaz_HeadCheck_size_of_type(const char *type, const char *includes, int hint);
#define H_CHAZ_MAKE
/* #include "Charmonizer/Core/CFlags.h" */
+/* #include "Charmonizer/Core/CLI.h" */
typedef struct chaz_MakeFile chaz_MakeFile;
typedef struct chaz_MakeVar chaz_MakeVar;
@@ -2107,7 +2108,15 @@ chaz_CFlags_add_rpath(chaz_CFlags *flags, const char *path) {
if (chaz_CC_binary_format() != CHAZ_CC_BINFMT_ELF) { return; }
if (flags->style == CHAZ_CFLAGS_STYLE_GNU) {
- string = chaz_Util_join("", "-Wl,-rpath,", path, NULL);
+ /* If "new dtags" are enabled by default, DT_RUNPATH is set instead of
+ * DT_RPATH. Unfortunately, DT_RUNPATH is not applied transitively
+ * when searching for indirect dependencies. See
+ *
+ * https://bugs.launchpad.net/ubuntu/+source/eglibc/+bug/1253638
+ * https://sourceware.org/bugzilla/show_bug.cgi?id=13945
+ */
+ string = chaz_Util_join("", "-Wl,--disable-new-dtags -Wl,-rpath,",
+ path, NULL);
}
else if (flags->style == CHAZ_CFLAGS_STYLE_SUN_C) {
string = chaz_Util_join(" ", "-R", path, NULL);
@@ -3590,6 +3599,7 @@ chaz_ConfWriterC_end_module(void) {
}
/* Write out short names. */
+ if (chaz_ConfWriterC.def_count > 0) {
fprintf(chaz_ConfWriterC.fh,
"\n#if defined(CHY_USE_SHORT_NAMES) "
"|| defined(CHAZ_USE_SHORT_NAMES)\n"
@@ -3623,6 +3633,7 @@ chaz_ConfWriterC_end_module(void) {
}
fprintf(chaz_ConfWriterC.fh, "#endif /* USE_SHORT_NAMES */\n");
+ }
/* Write out global definitions and system includes. */
if (num_globals) {
