From: Arnaud Giersch Date: Tue, 8 Jan 2013 13:52:46 +0000 (+0100) Subject: Avoid to put smpi symbols in libsimgrid. X-Git-Tag: v3_9_rc1~86^2~37 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/dd26d1201071250f4cd4c99201c503d17c2bc1a4?hp=cd13a63269973552c66aaf4e5cc621e70d59c34c Avoid to put smpi symbols in libsimgrid. This was visibly introduced by commit 6cf3e5a62a7a4a685ddce69bac69d71fe0966a86 (Move module tracing into corresponding modules), but it broke builds with -flto and GOLD ld. --- diff --git a/buildtools/Cmake/DefinePackages.cmake b/buildtools/Cmake/DefinePackages.cmake index 985e9a995d..b3b10954cb 100644 --- a/buildtools/Cmake/DefinePackages.cmake +++ b/buildtools/Cmake/DefinePackages.cmake @@ -465,7 +465,6 @@ set(simgrid_sources ${SIMGRID_SRC} ${SIMIX_SRC} ${SURF_SRC} - ${SMPI_SRC} ${TRACING_SRC} ${XBT_SRC} ) diff --git a/src/simgrid/sg_config.c b/src/simgrid/sg_config.c index 88e7ea70ee..c325e2a691 100644 --- a/src/simgrid/sg_config.c +++ b/src/simgrid/sg_config.c @@ -346,9 +346,6 @@ void sg_config_init(int *argc, char **argv) int i; TRACE_add_start_function(TRACE_surf_alloc); - TRACE_add_start_function(TRACE_smpi_alloc); - - TRACE_add_end_function(TRACE_smpi_release); TRACE_add_end_function(TRACE_surf_release); /* Create the configuration support */ diff --git a/src/smpi/smpi_global.c b/src/smpi/smpi_global.c index 572cddae18..acbd4ce774 100644 --- a/src/smpi/smpi_global.c +++ b/src/smpi/smpi_global.c @@ -319,8 +319,13 @@ int smpi_main(int (*realmain) (int argc, char *argv[]),int argc, char *argv[]) } /* Connect log categories. See xbt/log.c */ - XBT_LOG_CONNECT(smpi); /* Keep this line as soon as possible in this function: xbt_log_appender_file.c depends on it - DO NOT connect this in XBT or so, or it will be useless to xbt_log_appender_file.c */ + XBT_LOG_CONNECT(smpi); /* Keep this line as soon as possible in this + function: xbt_log_appender_file.c depends on it + DO NOT connect this in XBT or so, or it will be + useless to xbt_log_appender_file.c */ +#ifdef HAVE_TRACING + XBT_LOG_CONNECT(instr_smpi); +#endif XBT_LOG_CONNECT(smpi_base); XBT_LOG_CONNECT(smpi_bench); XBT_LOG_CONNECT(smpi_coll); @@ -334,6 +339,9 @@ int smpi_main(int (*realmain) (int argc, char *argv[]),int argc, char *argv[]) #ifdef HAVE_TRACING TRACE_global_init(&argc, argv); + + TRACE_add_start_function(TRACE_smpi_alloc); + TRACE_add_end_function(TRACE_smpi_release); #endif SIMIX_global_init(&argc, argv); diff --git a/src/xbt/log.c b/src/xbt/log.c index 0736592c25..94f7c606fa 100644 --- a/src/xbt/log.c +++ b/src/xbt/log.c @@ -588,7 +588,6 @@ static void xbt_log_connect_categories(void) XBT_LOG_CONNECT(instr_paje_values); XBT_LOG_CONNECT(instr_resource); XBT_LOG_CONNECT(instr_routing); - XBT_LOG_CONNECT(instr_smpi); XBT_LOG_CONNECT(instr_surf); #endif