| Summary: | devel/cdecl: Needs to be compiled in ANSI C (C89) mode | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Ports & Packages | Reporter: | Robert Clausecker <fuz> | ||||
| Component: | Individual Port(s) | Assignee: | Dmitry Marakasov <amdmi3> | ||||
| Status: | Closed Not A Bug | ||||||
| Severity: | Affects Some People | CC: | koobs, w.schwarzenfeld | ||||
| Priority: | --- | Keywords: | needs-qa | ||||
| Version: | Latest | Flags: | koobs:
merge-quarterly?
|
||||
| Hardware: | Any | ||||||
| OS: | Any | ||||||
| Attachments: |
|
||||||
|
Description
Robert Clausecker
2016-08-25 11:46:36 UTC
Thanks for your report Robert. The port appears to use USE_CSTD=c89 which I have confirmed adds -std=c89 to CFLAGS What are the observed symptoms? Can you provide a build output log (as an attachment) and the systems full FreeBSD uname -a output as well please Here is the output of uname -a:
FreeBSD miso 10.3-RELEASE FreeBSD 10.3-RELEASE #0 r297264: Fri Mar 25 02:10:02 UTC 2016 root@releng1.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64
Here is the content of /etc/make.conf, without this configuration the port runs compiles just fine. It is likely that the configuration is somehow incorrect.
CFLAGS=-O3
CPUTYPE=corei7-avx
OVERRIDE_LINUX_BASE_PORT=c6_64
OVERRIDE_LINUX_NONBASE_PORTS=c6_64
A buildlog has been attached.
Created attachment 174079 [details]
build log of devel/cdecl
@Robert Can you test using CPUTYPE?= (not =) in /etc/make.conf and see whether -std=c89 appears in /usr/ports/devel/cdecl && make -V CFLAGS` output please I can reproduce the error with CFLAGS=-O3. This causes it, without it works fine. BtW;
cdecl.c:428:18: warning: using the result of an assignment as a condition without parentheses [-Wparentheses]
while (command = commands[index]) {
this seems not very good.
> It is likely that the configuration is somehow incorrect. Rather it is unsupported. It works correctly on ports level: % make -V CFLAGS -O3 -march=nocona -fstack-protector -fno-strict-aliasing -std=c89 however upstream Makefile sucks in /etc/make.conf again, and whole CFLAGS are replaced with just -O3, and -std=c89 is lost. You could try something like: .if ${.CURDIR:H:H} == "/usr/ports" CFLAGS= -O3 .endif instead. > this seems not very good. There's no problem in this code. |