#41908 [NEW]: CFLAGS="-Os" ./configure --enable-debug fails
| From: | christian at hoffie dot info | Date: | Thu, 05 Jul 2007 17:06:18 +0000 |
| Subject: | #41908 [NEW]: CFLAGS="-Os" ./configure --enable-debug fails | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-114681@lists.php.net to get a copy of this message | ||
From: christian at hoffie dot info
Operating system: Gentoo Linux
PHP version: 5.2.3
PHP Bug Type: *Compile Issues
Bug description: CFLAGS="-Os" ./configure --enable-debug fails
Description:
------------
PHP's configure script incorrectly manipulates CFLAGS and CXXFLAGS when
running with --enable-debug or --enable-gcov. When CFLAGS or CXXFLAGS
contains -Os (optimize for size), the configure script builds a bad list of
CFLAGS/CXXFLAGS and as such configure fails in a later stage.
I created a small patch[1] which should solve that, I'm not completely
sure whether it's a good idea to remove that -O stuff at all -- does
appending -O0 after user-supplied flags not lead to the expected result
(building with -O0 and not -O2 for instance)?
[1]
http://overlays.gentoo.org/proj/php/browser/patches/php-patches/5.2.3/5.2.3/php5.2.3-configure-Os-fix.patch?rev=1237
Reproduce code:
---------------
CFLAGS="-Os" ./configure --enable-debug
(same if you replace CFLAGS by CXXFLAGS or --enable-debug with
--enable-gcov)
Actual result:
--------------
christian@tux /tmp/php-5.2.3 $ env | grep FLAGS
CXXFLAGS=-Os
CFLAGS=-Os
christian@tux /tmp/php-5.2.3 $ ./configure --disable-all --enable-debug
[...]
Configuring libtool
checking build system type... i686-pc-linux-gnu
checking for ld used by gcc... /usr/i686-pc-linux-gnu/bin/ld
checking if the linker (/usr/i686-pc-linux-gnu/bin/ld) is GNU ld... yes
checking for /usr/i686-pc-linux-gnu/bin/ld option to reload object
files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking how to recognise dependent libraries... pass_all
checking for object suffix... configure: error: installation or
configuration problem; compiler does not work
Depending on ./configure options the output looks different. For example,
with --with-xml you will see a libxml2 failure first.
--
Edit bug report at http://bugs.php.net/?id=41908&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=41908&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=41908&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=41908&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=41908&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=41908&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=41908&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=41908&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=41908&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=41908&r=support
Expected behavior: http://bugs.php.net/fix.php?id=41908&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=41908&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=41908&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=41908&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=41908&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=41908&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=41908&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=41908&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=41908&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=41908&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=41908&r=mysqlcfg