Sounds reasonable to make the useshrplib to default to false (because of the significant startup slowness otherwise) and at the very least make it conditional (and I got a nod from Ed Moy of Apple, too). So I did (change #19681).
Thank you.
How about the -prebind flags et alia? Should they be made default, too?
I think we should but the biggest problem on slow startup was primarily libperl.dylib (too may symbols for fix_prebinding daemon to tweak). I am now working on benchmarking the difference but even without -prebind flag the launch speed increase was significant.
One more caution if we want to make -prebind a default is here.
hints/darwin.sh
122:case "$osvers" in
123:1.[0-3].*)
124: lddlflags="${ldflags} -bundle -undefined suppress"
125: ;;
126:1.*)
127: ldflags="${ldflags} -flat_namespace"
128: lddlflags="${ldflags} -bundle -undefined suppress"
129: ;;
130:[2-6].*)
131: ldflags="${ldflags} -flat_namespace"
132: lddlflags="${ldflags} -bundle -undefined suppress"
133: ;;
134:*) lddlflags="${ldflags} -bundle -undefined dynamic_lookup"
135: case "$ld" in
136: *MACOSX_DEVELOPMENT_TARGET*) ;;
137: *) ld="MACOSX_DEPLOYMENT_TARGET=10.3 ${ld}" ;;
138: esac
139: ;;
140:esacAs you see ${ldflags} is injected into $lddlflags but in case of -prebind we need to avoid that. $ldflags is for perl linking while $lddlflags is for XS. Since -prebind and -bundle are mutually exclusive, we do not want -prebind in $lddlflags (though CC on darwin is smart enough to ignore -prebind when -bundle, it still issues warnings and I don't want to see that warning for each XS gets built).
Dan the "Prebound" Man
