[CDRIVER-599] ./configure --disable-optimizations should not touch CFLAGS Created: 31/Mar/15  Updated: 08/Jan/24  Resolved: 26/Oct/15

Status: Closed
Project: C Driver
Component/s: None
Affects Version/s: 1.1.2
Fix Version/s: 1.3.0-beta0

Type: Bug Priority: Major - P3
Reporter: Petr Pisar Assignee: Hannes Magnusson
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

glibc on Linux


Attachments: File libbson-1.1.2-Preserve-CFLAGS.patch    

 Description   

./configure --disable-optimizations appends -O0 to CFLAGS. ./configure --enable-optimizations appends -O2. I'd like to see possibility not to change the optimization level at all. This is especially useful for distributions which want to build software uniformly with their own compiler flags.

Attached patch changes --disable-optimizations to preserve CFLAGS.



 Comments   
Comment by Hannes Magnusson [ 26/Oct/15 ]

Err. Missed amending your commit message to include the ticket#

Its here though: https://github.com/mongodb/libbson/commit/70557dff8fa0dfb486eb8b2376556fb769f63ed5

Thanks for the fix!

Comment by Githook User [ 26/Oct/15 ]

Author:

{u'username': u'bjori', u'name': u'Hannes Magnusson', u'email': u'bjori@php.net'}

Message: CDRIVER-599: Don't set -D_FORTIFY_SOURCE for --enable-optimizations

It is part of --enable-hardening which makes far more sense
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/fff00ccd9dde9ef787f24d806c7d4881e3340f30

Comment by Githook User [ 26/Oct/15 ]

Author:

{u'username': u'bjori', u'name': u'Hannes Magnusson', u'email': u'bjori@php.net'}

Message: CDRIVER-599: Don't manipulate CFLAGS when not-setting an option
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/37dc552ed5d1ac30b47972bdda0822e525f4666a

Generated at Wed Feb 07 21:10:01 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.