From 5a862c98ca57c0940ea0477fba217f215174aaec Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Wed, 7 Mar 2018 01:51:30 +0100 Subject: [PATCH 1/1] also let the SMPI_PRETEND_CC trick work with dlopen interception --- src/smpi/smpi_main.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/smpi/smpi_main.c b/src/smpi/smpi_main.c index c38ac086f8..7d94af6e32 100644 --- a/src/smpi/smpi_main.c +++ b/src/smpi/smpi_main.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2007-2017. The SimGrid Team. All rights reserved. */ +/* Copyright (c) 2007-2018. The SimGrid Team. All rights reserved. */ /* This program is free software; you can redistribute it and/or modify it * under the terms of the license (GNU LGPL) which comes with this package. */ @@ -10,6 +10,12 @@ int main(int argc, char **argv) { + if (getenv("SMPI_PRETEND_CC") != NULL) { + /* Hack to ensure that smpicc can pretend to be a simple compiler. Particularly handy to pass it to the + * configuration tools. This one is used with dlopen privatization. */ + return 0; + } + if (argc < 2) { fprintf(stderr, "Usage: smpimain \n"); exit(1); -- 2.20.1