Re: [PHP4BETA] cvs: /php4 .cvsignore configure.in
| From: | Andi Gutmans | Date: | Sat, 18 Mar 2000 20:23:01 +0000 |
| Subject: | Re: [PHP4BETA] cvs: /php4 .cvsignore configure.in | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-12378@lists.php.net to get a copy of this message | ||
How much does PIC slow down the code?
How does Linux handle shared objects which aren't PIC?
Andi
At 05:58 PM 3/18/00 +0000, Sascha Schumann wrote:
--- Andi Gutmans <andi@zend.com> http://www.zend.com/sas Sat Mar 18 09:58:39 2000 EDTModified files:/php4 .cvsignore configure.inLog: @- Added --disable-pic for disabling generating PIC for shared objectson platforms which support it (i.e. Linux) (Sascha)Additionally, we enforce passing pthread_cflags to the compiler, if libtool chooses it as linker. Index: php4/.cvsignore diff -u php4/.cvsignore:1.30 php4/.cvsignore:1.31--- php4/.cvsignore:1.30 Fri Mar 10 14:23:17 2000 +++ php4/.cvsignore Sat Mar 18 09:58:09 2000@@ -14,6 +14,8 @@ configuration-scanner.c configure generated_lists +meta_cc +meta_ccld mkinstalldirs missing install-sh Index: php4/configure.in diff -u php4/configure.in:1.103 php4/configure.in:1.104--- php4/configure.in:1.103 Sat Mar 11 12:48:44 2000+++ php4/configure.in Sat Mar 18 09:58:09 2000 @@ -1,4 +1,4 @@ -dnl ## $Id: configure.in,v 1.103 2000/03/11 20:48:44 andi Exp $ -*- sh -*- +dnl ## $Id: configure.in,v 1.104 2000/03/18 17:58:09 sas Exp $ -*- sh -*- dnl ## Process this file with autoconf to produce a configure script. divert(1) @@ -540,6 +540,15 @@ AC_MSG_RESULT(yes) ]) +AC_MSG_CHECKING(whether to enable PIC for shared objects) +AC_ARG_ENABLE(pic,+[ --disable-pic Disable PIC for shared objects],[+ PHP_PIC=$enableval +],[ + PHP_PIC=yes +]) +AC_MSG_RESULT($PHP_PIC) + DMALLOC_RESULT=no AC_MSG_CHECKING(whether to enable dmalloc) AC_ARG_ENABLE(dmalloc, @@ -657,15 +666,6 @@ fi fi -dnl *** Commented out - generates slow code and consumes a lot of -dnl *** resources during compilation - we need to figure out how -dnl *** to supply it only when absolutely necessary -dnl If we are using gcc add -fpic to make dl() work on some platforms -dnl test -n "$GCC" && CFLAGS="$CFLAGS -fpic" - -dnl add -fPIC option on Solaris if we are building dynamic extensions -dnl PHP_SOLARIS_PIC_WEIRDNESS - EXTRA_LIBS="$EXTRA_LIBS $DLIBS $LIBS" LIBS="" LDFLAGS="" @@ -742,6 +742,18 @@ PHP_SUBST(YACC) PHP_CONFIGURE_PART(Configuring libtool) + +old_CC="$CC" + +if test "$PHP_THREAD_SAFETY" = "yes" && test -n "$ac_cv_pthreads_cflags"; then + cat >meta_ccld<<EOF +#! /bin/sh +exec $CC $ac_cv_pthreads_cflags \$@ +EOF + CC="$abs_builddir/meta_ccld" + chmod +x meta_ccld +fi + AM_PROG_LIBTOOL if test "$enable_debug" != "yes"; then AM_SET_LIBTOOL_VARIABLE([--silent]) @@ -760,6 +772,20 @@PHP_COMPILE='$(COMPILE) -c $< && touch $@'fi fi + +CC="$old_CC" + +changequote({,}) +if test "$PHP_PIC" = "no"; then + cat >meta_cc<<EOF +#! /bin/sh +cmd="$CC \echo \$@|sed s/-[fFD]PIC//g\" +exec \$cmd +EOF + chmod +x meta_cc + CC="$abs_builddir/meta_cc" +fi +changequote([,]) test "$prefix" = "NONE" && prefix="/usr/local" test "$exec_prefix" = "NONE" && exec_prefix='$(prefix)' -- PHP 4.0 Beta Mailing List <http://www.php.net/version4/> To unsubscribe, e-mail: php4beta-unsubscribe@lists.php.net For additional commands, e-mail: php4beta-help@lists.php.net To contact the list administrators, e-mail: php4beta-admin@lists.php.net