On Wed, 24 Sep 2003, Loren James Rittle wrote: > >I was looking through gcc last night to see how conceptually difficult > >it would be to do something like this. But instead of a file, I was > >thinking of this process: > > > >* if env("PTHREADS_LIBS") then LDFLAGS += PTHREADS_LIBS > >* elseif fileexists("libpthread") then LDFLAGS += -lpthread > >* elseif fileexists("libthr") then LDFLAGS += -lthr > >* elseif fileexists("libc_r") then LDFLAGS += -lc_r > >* else error("Threading not supported.") > > Hello Mike, > > I too thought about making -pthread an exact alias for > env("PTHREADS_LIBS") (and, if empty, pick -lpthread or the classic > default -lc_r). The main issue is that the FSF gcc has not accepted > any code into the gcc driver which depends on environment variables. What is FSF gcc policy with regard to having multiple thread switches, ala Solaris? An alternative would be to retain -pthread = -lc_r and switch it over to -lpthread once sparc64 and alpha ports are done, then add a -thread switch for -lthr if folks want similar treatment for libthr. -- Dan EischenReceived on Wed Sep 24 2003 - 20:10:39 UTC
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:23 UTC