Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Sep 2019 08:17:18 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 240492] graphics/glew: unexpected optimizations in debug build
Message-ID:  <bug-240492-7788@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D240492

            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@FreeBSD.org
          Reporter: jbeich@FreeBSD.org
          Assignee: zeising@FreeBSD.org
             Flags: maintainer-feedback?(zeising@FreeBSD.org)

Created attachment 207372
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D207372&action=
=3Dedit
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 STR=
IP.

$ make WITH_DEBUG=3D
[...]
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 CF=
LAGS
from the ports framework have to be passed after vendor CFLAGS.

$ CFLAGS=3D-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

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-240492-7788>