Bug 235361 - x11/libinput: fix build with GCC-based architectures
Summary: x11/libinput: fix build with GCC-based architectures
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-x11 (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-01-31 19:57 UTC by Piotr Kubaj
Modified: 2019-04-15 07:47 UTC (History)
4 users (show)

See Also:
bugzilla: maintainer-feedback? (x11)
zeising: merge-quarterly?


Attachments
patch (384 bytes, patch)
2019-01-31 19:57 UTC, Piotr Kubaj
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Piotr Kubaj freebsd_committer freebsd_triage 2019-01-31 19:57:18 UTC
Created attachment 201567 [details]
patch

Base GCC doesn't support -std=gnu90. Remove it from meson.build to fix build.

Tested on powerpc64 and amd64.

Hardware sponsored by IntegriCloud.
Comment 1 Justin Hibbits freebsd_committer freebsd_triage 2019-02-01 23:05:07 UTC
I don't think it needs to be constrained to GCC architectures, "gnu90" doesn't exist.  I'd wager it's a typo for gnu99.
Comment 2 Justin Hibbits freebsd_committer freebsd_triage 2019-02-01 23:06:49 UTC
Okay, after a quick Google, it does exist, I'm wrong.  I've never seen it used before, and it doesn't make sense for it to be in there.
Comment 3 Jan Beich freebsd_committer freebsd_triage 2019-02-03 09:48:04 UTC
-std=gnu90 is an alias for -std=gnu89. Removing -std=gnu90 may change "inline" from GNU to C99 semantics as Clang defaults to C11 (ditto GCC >= 5). In this case, it's not important as -std=gnu90 was only used for header sanity check.

I've submitted a better fix upstream.
https://gitlab.freedesktop.org/libinput/libinput/merge_requests/160
Comment 4 commit-hook freebsd_committer freebsd_triage 2019-03-06 21:58:35 UTC
A commit references this bug:

Author: zeising
Date: Wed Mar  6 21:57:43 UTC 2019
New revision: 494850
URL: https://svnweb.freebsd.org/changeset/ports/494850

Log:
  x11/libinput: Fix build on GCC-based architectures

  Fix build of x11/libinput on GCC-based architectures.  gnu90 is an alias for
  gnu89, but is not understood by all versions of GCC, most notably, our base
  version.  Switch to use gnu89 instead.
  While here, adjust patch context a bit.

  A similar fix has been merged upstream.

  PR:		235361
  Submitted by:	Jan Beich (fix)
  Reported by:	Piotr Kubaj (PR)
  MFH:		2019Q1
  X-MFH-note:	If applicable, 2019Q1 might have old libinput version

Changes:
  head/x11/libinput/Makefile
  head/x11/libinput/files/patch-meson.build
Comment 5 Niclas Zeising freebsd_committer freebsd_triage 2019-03-06 22:02:01 UTC
Fix committed, pending MFH.  Instead of removing the option, I switched to gnu89, like what Jan submitted upstream.
Comment 6 Mark Linimon freebsd_committer freebsd_triage 2019-04-15 05:03:24 UTC
(In reply to Niclas Zeising from comment #5)

Since Q2 has been created, is there any reason to MFH this to Q1 now?  And if not, can this PR just be closed?
Comment 7 Piotr Kubaj freebsd_committer freebsd_triage 2019-04-15 07:47:48 UTC
Yes, it can be closed.