Bug 235993 - devel/cpuflags broken on arm64 or without gcc
Summary: devel/cpuflags broken on arm64 or without gcc
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: arm64 Any
: --- Affects Only Me
Assignee: Tobias Kortkamp
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-02-24 12:46 UTC by John F. Carr
Modified: 2019-03-04 18:57 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John F. Carr 2019-02-24 12:46:10 UTC
CURRENT as of February 2019 running on arm64.

$ /usr/local/bin/cpuflags
sysctl: unknown oid 'hw.model'
/usr/local/bin/cpuflags: gcc: not found
[: -gt: unexpected operator
/usr/local/bin/cpuflags: gcc: not found
Unknown machine - please send cpuflags details to abs@absd.org
OS              : 'FreeBSD'
hw.model        : ''
hw.machine      : 'arm64'
hw.machine_arch : 'aarch64'
cpu details     :

Four bugs:

1. sysctl asks for bad setting

2. cpuflags defaults to gcc, while the FreeBSD default compiler is named 'cc'

3. No quotes around variable expansion in line
    if [ $(gcc_ser $CC) -gt 4002 ] ; then

4. The man page is not installed.
Comment 1 commit-hook freebsd_committer freebsd_triage 2019-02-24 14:06:56 UTC
A commit references this bug:

Author: tobik
Date: Sun Feb 24 14:06:11 UTC 2019
New revision: 493762
URL: https://svnweb.freebsd.org/changeset/ports/493762

Log:
  Deprecate devel/cpuflags

  It's supposed to "return appropriate gcc flags to optimise compilation
  for the current CPU", but it does not recognize modern CPUs.
  MASTER_SITES is dead, no upstream is given in pkg-descr.

  pkgsrc has a newer version 1.43 from 3 years ago, but for modern
  compilers just using -march=native is probably a better alternative.

  PR:		235993

Changes:
  head/devel/cpuflags/Makefile
Comment 2 Tobias Kortkamp freebsd_committer freebsd_triage 2019-02-24 14:10:01 UTC
The port was always i386/amd64 only AFAICT, but yeah it's broken.  I've
deprecated the port, so it'll be removed in a about a week.
Comment 3 Rene Ladan freebsd_committer freebsd_triage 2019-03-04 18:57:41 UTC
Expired port removed.