Bug 239311 - cad/lepton-eda: respect CFLAGS
Summary: cad/lepton-eda: respect CFLAGS
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
Depends on:
Reported: 2019-07-19 17:52 UTC by Piotr Kubaj
Modified: 2019-09-26 19:13 UTC (History)
1 user (show)

See Also:
graahnul.grom: maintainer-feedback+

patch (3.40 KB, patch)
2019-07-19 17:52 UTC, Piotr Kubaj
pkubaj: maintainer-approval? (graahnul.grom)
Details | Diff
build log (79.67 KB, text/plain)
2019-07-20 20:15 UTC, Piotr Kubaj
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Piotr Kubaj freebsd_committer 2019-07-19 17:52:37 UTC
Created attachment 205902 [details]

Building with base GCC fails with:
cc1: error: -Wuninitialized is not supported without -O

But this port should use the default -O2. Fix this with attached patch.
Comment 1 dmn 2019-07-20 19:45:15 UTC
Hi Piotr!

How could I reproduce this bug?
What version of FreeBSD, compiler and make.conf flags you are using?
Could you please try to remove '-Werror=uninitialized' statement
from AX_GCC_FLAGS line in configure.ac and try again?
Comment 2 Piotr Kubaj freebsd_committer 2019-07-20 20:04:41 UTC
(In reply to dmn from comment #1)
That would probably fix the build issue, but CFLAGS should be respected anyway.

I use FreeBSD 12.0-RELEASE. My compiler is base GCC 4.2 (default on powerpc64). There's no make.conf at all.
Comment 3 Piotr Kubaj freebsd_committer 2019-07-20 20:15:30 UTC
Created attachment 205948 [details]
build log

Here's the build log with error.
Comment 4 dmn 2019-07-21 10:46:59 UTC
Do you think it's sufficient to add $(CFLAGS) to only those 3 files
modified by the patch (cli/Makefile.am, liblepton/src/Makefile.am and
Altogether, your patch is looking good, thank you.
Comment 5 Piotr Kubaj freebsd_committer 2019-07-21 10:55:33 UTC
(In reply to dmn from comment #4)
Well, after adding that, the port builds without any complaint.
Comment 6 dmn 2019-07-21 11:26:54 UTC
(In reply to Piotr Kubaj from comment #5)
Then, I think the patch should be applied.
By the way, do you have any issues running tools from the lepton-eda
suite on powerpc64? If so, please use our issue tracker:
Thank you for helping with the port!
Comment 7 commit-hook freebsd_committer 2019-08-05 11:15:50 UTC
A commit references this bug:

Author: pkubaj
Date: Mon Aug  5 11:15:42 UTC 2019
New revision: 508162
URL: https://svnweb.freebsd.org/changeset/ports/508162

  cad/lepton-eda: respect CFLAGS

  Building with base GCC fails with:
  cc1: error: -Wuninitialized is not supported without -O

  But this port should use the default -O2.

  PR:		239311
  Approved by:	graahnul.grom@gmail.com (maintainer), tcberner (mentor)
  Differential Revision:	https://reviews.freebsd.org/D21142

Comment 8 dmn 2019-09-26 19:13:08 UTC
Fixed in upstream: git commit 41ffba3 (PR #458: https://github.com/lepton-eda/lepton-eda/pull/458)