[ https://issues.apache.org/jira/browse/SERF-133?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Branko Čibej resolved SERF-133. ------------------------------- Fix Version/s: serf-trunk Resolution: Fixed The extra {{CCFLAGS}} are added during configuration ({{CheckFunc}}, etc), but it seems to be platform-specific: on macOS with SCons from MacPorts, it adds '{{-g -O2}}'; on my Debian 12 VM, it doesn't add anything. In any case, that's a different issue. This one is fixed on trunk in [r1926709|http://svn.apache.org/viewvc?rev=1926709&view=rev]. > SConstruct should not force -O2 > ------------------------------- > > Key: SERF-133 > URL: https://issues.apache.org/jira/browse/SERF-133 > Project: serf > Issue Type: Bug > Reporter: Serf Importer > Priority: Major > Labels: Priority-Medium, Type-Defect > Fix For: serf-trunk > > > Handling of CFLAGS etc. is misdesigned. Environmental variables are ignored. > Even when I explicitly specify CFLAGS on command line, then they are not > fully respected: > $ scons CFLAGS="-march=native -O3" > scons: Reading SConscript files ... > scons: done reading SConscript files. > scons: Building targets ... > gcc -o context.o -c -march=native -O3 -std=c89 -Wdeclaration-after-statement > -Wmissing-prototypes -Wall -O2 -pthread -DNDEBUG -DLINUX -D_REENTRANT > -D_GNU_SOURCE -I. -I/usr/include/apr-1 -I/usr/include/db5.2 -I/usr/include > context.c > gcc -o incoming.o -c -march=native -O3 -std=c89 -Wdeclaration-after-statement > -Wmissing-prototypes -Wall -O2 -pthread -DNDEBUG -DLINUX -D_REENTRANT > -D_GNU_SOURCE -I. -I/usr/include/apr-1 -I/usr/include/db5.2 -I/usr/include > incoming.c > gcc -o outgoing.o -c -march=native -O3 -std=c89 -Wdeclaration-after-statement > -Wmissing-prototypes -Wall -O2 -pthread -DNDEBUG -DLINUX -D_REENTRANT > -D_GNU_SOURCE -I. -I/usr/include/apr-1 -I/usr/include/db5.2 -I/usr/include > outgoing.c > gcc -o ssltunnel.o -c -march=native -O3 -std=c89 > -Wdeclaration-after-statement -Wmissing-prototypes -Wall -O2 -pthread > -DNDEBUG -DLINUX -D_REENTRANT -D_GNU_SOURCE -I. -I/usr/include/apr-1 > -I/usr/include/db5.2 -I/usr/include ssltunnel.c > ... > -O2 is appended and overrides flags set by user (which include -O3 in above > example). > Original issue reported by *Arfrever.FTA* -- This message was sent by Atlassian Jira (v8.20.10#820010)