[Bug 240492] graphics/glew: unexpected optimizations in debug build
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Wed Sep 11 08:17:19 UTC 2019
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=240492
Bug ID: 240492
Summary: graphics/glew: unexpected optimizations in debug build
Product: Ports & Packages
Version: Latest
Hardware: Any
OS: Any
Status: New
Keywords: patch
Severity: Affects Only Me
Priority: ---
Component: Individual Port(s)
Assignee: zeising at FreeBSD.org
Reporter: jbeich at FreeBSD.org
Assignee: zeising at FreeBSD.org
Flags: maintainer-feedback?(zeising at FreeBSD.org)
Created attachment 207372
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=207372&action=edit
blind fix
Mk/bsd.port.mk strips -O* flags by default when building WITH_DEBUG. If user
wants optimized debug build it should pass -g manually and define empty STRIP.
$ make WITH_DEBUG=
[...]
cc -DGLEW_NO_GLU -DGLEW_BUILD -pipe -g -fstack-protector-strong
-fno-strict-aliasing -O2 -Wall -W -Iinclude -I/usr/local/include -fPIC -o
tmp/freebsd/default/shared/glew.o -c src/glew.c
cc -DGLEW_NO_GLU -DGLEW_STATIC -pipe -g -fstack-protector-strong
-fno-strict-aliasing -O2 -Wall -W -Iinclude -I/usr/local/include -fPIC -o
tmp/freebsd/default/static/glew.o -c src/glew.c
cc -DGLEW_NO_GLU -pipe -g -fstack-protector-strong -fno-strict-aliasing -O2
-Wall -W -Iinclude -I/usr/local/include -fPIC -o
tmp/freebsd/default/shared/glewinfo.o -c src/glewinfo.c
cc -DGLEW_NO_GLU -pipe -g -fstack-protector-strong -fno-strict-aliasing -O2
-Wall -W -Iinclude -I/usr/local/include -fPIC -o
tmp/freebsd/default/shared/visualinfo.o -c src/visualinfo.c
Alternatively, a user may want to increase optimizations. To take effect CFLAGS
from the ports framework have to be passed after vendor CFLAGS.
$ CFLAGS=-Ofast make
[...]
cc -DGLEW_NO_GLU -DGLEW_BUILD -Ofast -fstack-protector-strong
-fno-strict-aliasing -O2 -Wall -W -Iinclude -I/usr/local/include -fPIC -o
tmp/freebsd/default/shared/glew.o -c src/glew.c
cc -DGLEW_NO_GLU -DGLEW_STATIC -Ofast -fstack-protector-strong
-fno-strict-aliasing -O2 -Wall -W -Iinclude -I/usr/local/include -fPIC -o
tmp/freebsd/default/static/glew.o -c src/glew.c
cc -DGLEW_NO_GLU -Ofast -fstack-protector-strong -fno-strict-aliasing -O2
-Wall -W -Iinclude -I/usr/local/include -fPIC -o
tmp/freebsd/default/shared/glewinfo.o -c src/glewinfo.c
cc -DGLEW_NO_GLU -Ofast -fstack-protector-strong -fno-strict-aliasing -O2
-Wall -W -Iinclude -I/usr/local/include -fPIC -o
tmp/freebsd/default/shared/visualinfo.o -c src/visualinfo.c
https://www.freebsd.org/doc/en/books/porters-handbook/dads-cflags.html
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-ports-bugs
mailing list