Skip to content

Commit

Permalink
flashrom: Fix build on 10.7-10.12.
Browse files Browse the repository at this point in the history
This constrains the compiler to one that doesn't complain about
missing field initializers.  Unreleased upstream changes are fixing
such issues in the code itself, so this fix should be temporary.  This
change is insufficient for 10.6-, though upstream also seems to be
fixing some issues for 10.6 and 10.5 (including PPC).

The former "revert the upstream change" patch was rendered unnecessary
by this change, and should remain so after the next upstream release.
It actually should have been rendered unnecessary by 545ec75, but
apparently the build procedure still builds ich_descriptors, even with
CONFIG_INTERNAL_X86=0.

Removing that patch is not expected to change the content of successful
builds, hence no revbump is needed.

Also adds note to Portfile about trace mode.

TESTED:
Built, ran tests, and ran with CH341A USB programmer on 10.7-10.15
x86_64 and 11.x-14.x arm64.
  • Loading branch information
fhgwright committed Nov 17, 2023
1 parent 41634ca commit 38790c3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 23 deletions.
17 changes: 15 additions & 2 deletions sysutils/flashrom/Portfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

PortSystem 1.0
PortGroup compiler_blacklist_versions 1.0

name flashrom
version 1.3.0
Expand All @@ -22,11 +23,23 @@ checksums rmd160 760f21c1580c910304583777304de664d6ae1aad \
size 489782
revision 3

# revert the upstream patch
patchfiles-append patch-ich_descriptors_tool.c.patch
# Blacklist compilers that have issues with missing initializer fields.
# This applies to clang < 10.x. The equivalent gcc version is unknown,
# so we blacklist all gccs with no loss of generality, since the only
# systems where Xcode uses gcc don't work for other reasons.
#
# This will probably become unnecessary after the next upstream release,
# which is also adding fixes for 10.5 adn 10.6.
#
# This fix is sufficient for 10.7-10.12, and a NOP on 10.13+.
compiler.blacklist *gcc* {clang < 1000}

depends_build port:pkgconfig

# NOTE: The build procedure tests for pci.h and libpci, even though all
# programmers that would use libpci are disabled in this build. Thus,
# any such references seen in trace mode can be ignored.

depends_lib port:libftdi1 \
port:libusb-compat

Expand Down
21 changes: 0 additions & 21 deletions sysutils/flashrom/files/patch-ich_descriptors_tool.c.patch

This file was deleted.

0 comments on commit 38790c3

Please sign in to comment.