<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 28 May 2019 at 22:05, Jed Brown <<a href="mailto:jed@jedbrown.org">jed@jedbrown.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
Note that all of these compilers (including Sun C, which doesn't define<br>
the macro) recognize -fPIC. (Blue Gene xlc requires -qpic.) Do we<br>
still need to test the other alternatives?<br>
<br></blockquote><div><br></div><div>Well, worst case, if the configure test always fails with and without all the possible variants of the PIC flag (-fPIC, -kPIC, -qpic, etc.) because they do not define the __PIC__ macro, then you are free to abort configure and ask users to pass the pic flag in CFLAGS and remove --with-pic=1 from the configure line, as we do today for all compilers.<br></div><div><br></div><div>BTW, my trick seems to works with the Cray compiler.</div><div><br></div><div>$ cc <br>CC-2107 craycc: ERROR in command line<br> No valid filenames are specified on the command line.<br><br></div><div>$ cc -c check-pic.c -fPIC<br><br></div><div>$ cc -c check-pic.c<br>CC-35 craycc: ERROR File = check-pic.c, Line = 2<br> #error directive: "no-PIC"<br> #error "no-PIC"<br> ^<br><br></div></div><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>Lisandro Dalcin<br>============<br>Research Scientist<br>Extreme Computing Research Center (ECRC)<br>King Abdullah University of Science and Technology (KAUST)<br><a href="http://ecrc.kaust.edu.sa/" target="_blank">http://ecrc.kaust.edu.sa/</a><br></div></div></div></div>