Bug 221044

Summary: x11/pixman: doesn't build with clang 5
Product: Ports & Packages Reporter: Sylvain Garrigues <sylvain>
Component: Individual Port(s)Assignee: freebsd-x11 (Nobody) <x11>
Status: Closed DUPLICATE    
Severity: Affects Only Me CC: dim, freebsd-arm, sylvain, w.schwarzenfeld
Priority: --- Keywords: needs-qa
Version: Latest   
Hardware: arm   
OS: Any   
Attachments:
Description Flags
Poudriere log
none
Proposed workaround
none
Proposed workaround #2
none
Proposed workaround #3 none

Description Sylvain Garrigues 2017-07-27 10:42:48 UTC
Created attachment 184763 [details]
Poudriere log

Seems like it fails at assembly source code (pixman-arm-simd-asm.S) compilation, cf. build log attached.
Comment 1 Sylvain Garrigues 2017-07-27 10:43:28 UTC
It used to build with clang 4
Comment 2 Sylvain Garrigues 2017-07-27 10:58:42 UTC
Created attachment 184765 [details]
Proposed workaround

Proposed workaround attached
Comment 3 Jan Beich freebsd_committer freebsd_triage 2017-07-27 11:32:10 UTC
Comment on attachment 184765 [details]
Proposed workaround

Clang 4.0 built fine because it failed configure check.

  -checking whether to use ARM SIMD assembler... no
  -checking whether to use ARM NEON assembler... no
  +checking whether to use ARM SIMD assembler... yes
  +checking whether to use ARM NEON assembler... yes
  [...]
  -checking for GCC vector extensions... no
  +checking for GCC vector extensions... yes

> BUILD_DEPENDS+= as:devel/binutils

Replace as with ${LOCALBASE}/bin/as. armv6 (unlike aarch64) does have /usr/bin/as which can be found via PATH thus BUILD_DEPENDS may ignore the dependency.
Comment 4 Jan Beich freebsd_committer freebsd_triage 2017-07-27 11:34:13 UTC
Comment on attachment 184765 [details]
Proposed workaround

> CFLAGS+=        -no-integrated-as -B/usr/local/bin

Can you unhardcode /usr/local as ${LOCALBASE} ?
Comment 5 Sylvain Garrigues 2017-07-27 12:23:15 UTC
Created attachment 184766 [details]
Proposed workaround #2

With suggested improvements
Comment 6 Sylvain Garrigues 2017-07-27 12:39:46 UTC
Created attachment 184767 [details]
Proposed workaround #3

Moved location of the .if ${ARCH} block after bsd.port.pre.mk is included, sorry.
Comment 7 Sylvain Garrigues 2017-07-27 13:15:46 UTC
What I don't like with my workaround is that because of the -B flag, all external tools called by clang (e.g. the linker) will come from the devel/binutils port, instead of the ones in base.

My intention is only to use the latest GNU AS.
Comment 8 Walter Schwarzenfeld freebsd_triage 2018-02-01 10:37:41 UTC
Makefile shows:
.if ${ARCH} == "armv6" || ${ARCH} == "armv7"
BUILD_DEPENDS+= ${LOCALBASE}/bin/as:devel/binutils
CONFIGURE_ENV+= CCASFLAGS="${CFLAGS} -no-integrated-as"
.endif

so I guess it is solved. Could it closed?