Bug 217575 - databases/leveldb: fails to build on armv6
Summary: databases/leveldb: fails to build on armv6
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: arm Any
: --- Affects Many People
Assignee: Po-Chuan Hsieh
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-06 07:16 UTC by Mikael Urankar
Modified: 2017-03-12 17:34 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (sunpoet)


Attachments
patch (986 bytes, patch)
2017-03-06 07:16 UTC, Mikael Urankar
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mikael Urankar freebsd_committer freebsd_triage 2017-03-06 07:16:21 UTC
Created attachment 180555 [details]
patch

Hi,

error message:

/nxb-bin/usr/bin/c++ -O2 -pipe -O2 -munaligned-access -fno-builtin-sincos -fno-builtin-sin -fno-builtin-cos -fno-builtin-sincosf -fno-builtin-sinf -fno-builtin-cosf -fno-builtin-sincosl -fno-builtin-sinl -fno-builtin-cosl -mcpu=cortex-a15 -isystem /usr/local/include -fno-strict-aliasing  -isystem /usr/local/include -I. -I./include -std=c++0x  -D_REENTRANT -DOS_FREEBSD -DLEVELDB_PLATFORM_POSIX -DLEVELDB_ATOMIC_PRESENT -DSNAPPY -O2 -DNDEBUG -fPIC -msse4.2 -DLEVELDB_PLATFORM_POSIX_SSE -c port/port_posix_sse.cc -o out-shared/port/port_posix_sse.o
c++: warning: argument unused during compilation: '-msse4.2' [-Wunused-command-line-argument]
port/port_posix_sse.cc:58:3: error: use of undeclared identifier '__get_cpuid'
  __get_cpuid(1, &eax, &ebx, &ecx, &edx);
  ^
port/port_posix_sse.cc:97:7: error: use of undeclared identifier '_mm_crc32_u8'


in $WRKSRC/build_detect_platform:227, c++ doesn't treat warning as error and the test will pass for armv6:
c++ -x c++ - -o $CXXOUTPUT -msse4.2:
c++: warning: argument unused during compilation: '-msse4.2'
echo $?
0

The attached patch fixes the issue
Comment 1 commit-hook freebsd_committer freebsd_triage 2017-03-12 17:30:20 UTC
A commit references this bug:

Author: sunpoet
Date: Sun Mar 12 17:28:52 UTC 2017
New revision: 436008
URL: https://svnweb.freebsd.org/changeset/ports/436008

Log:
  Fix SSE 4.2 detection (on armv6)

  PR:		217575
  Submitted by:	Mikael Urankar <mikael.urankar@gmail.com>

Changes:
  head/databases/leveldb/files/patch-build_detect_platform
Comment 2 Po-Chuan Hsieh freebsd_committer freebsd_triage 2017-03-12 17:34:49 UTC
Committed. Thanks!