[Fedora-packaging] Re: about compiler flags

Ralf Corsepius rc040203 at freenet.de
Sat Apr 25 06:48:03 UTC 2009


Orcan Ogetbil wrote:
> On Fri, Apr 24, 2009 at 4:31 PM, Pavel Alexeev (aka Pahan-Hubbitus) wrote:
>> As I can understand primarily this required for the allowing Fedora set of
>> optimisation for current platform, for which package build. So, in case when
>> maintainer add flags which is important fo building, performance, or changed
>> as some workaround to bug - it is acceptable, but need comment. Otherwise,
>> we MUST rewrite developer flags to fedora default %optflags.
>>
>> Michael Schwendt point me in one of my own review request to this
>> guidelines: https://bugzilla.redhat.com/show_bug.cgi?id=454980#c37
>>
> 
> I just took two random examples from the first page of koji (no
> offence to anyone):
> 
> 1- From the qt-4.5.1-3 build on x86_64:
> http://koji.fedoraproject.org/koji/taskinfo?taskID=1319567
> g++ -c -m64 -pipe -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2
> -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -Wall
> -W  -I../../../mkspecs/linux-g++-64 -I. -I/usr/X11R6/include -I. -o
> xrandr.o xrandr.cpp
> 
> Here -W needs to be removed?

man gcc

-W are harmless

> 2- From the lxpanel-0.4.0-1 build on i586:
> http://koji.fedoraproject.org/koji/buildinfo?buildID=99531
> /bin/sh ../../../libtool --tag=CC   --mode=link gcc  -O2 -g -pipe
> -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
> --param=ssp-buffer-size=4 -m32 -march=i586 -mtune=generic
> -fasynchronous-unwind-tables -module -avoid-version -rpath
> /usr/lib/lxpanel/plugins -no-undefined -export-symbols-regex "^[^_].*"
> -Wl,--as-needed -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,--sort-common -o
> netstatus.la -rpath /usr/lib/lxpanel/plugins netstatus-sysdeps.lo
> glade-support.lo netstatus-dialog-ui.lo netstatus-icon.lo
> netstatus-util.lo netstatus.lo netstatus-enums.lo netstatus-iface.lo
> netstatus-dialog.lo -pthread -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0
> -lgio-2.0 -lpangoft2-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lcairo
> -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0
> -lgthread-2.0 -lrt -lglib-2.0   -lmenu-cache -lglib-2.0
> 
> Here, "-fasynchronous-unwind-tables -module -avoid-version -rpath
> /usr/lib/lxpanel/plugins -no-undefined -export-symbols-regex "^[^_].*"
> -Wl,--as-needed -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,--sort-common
> -rpath /usr/lib/lxpanel/plugins" need to be removed?

-f* flags are not harmless. -Wl,-O1 is harmless, but likely is an ugly 
hack around to something deeply broken inside of the code.

> If what you are saying is correct, we need to "fix" hundreds of
> packages. Are you sure that's the right way?

Yes.

Ralf




More information about the Fedora-packaging mailing list