Bug 88639

Summary: Broken AX_C_FLOAT_WORDS_BIGENDIAN with BSD ELF tool chain
Product: cairo Reporter: Jung-uk Kim <jkim>
Component: generalAssignee: Chris Wilson <chris>
Status: RESOLVED FIXED QA Contact: cairo-bugs mailing list <cairo-bugs>
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: FreeBSD   
Whiteboard:
i915 platform: i915 features:
Attachments: A trivial patch to fix this problem

Description Jung-uk Kim 2015-01-20 20:36:49 UTC
Recently, FreeBSD dropped GNU strings(1) in favor of BSD ELF Tool Chain.

https://svnweb.freebsd.org/changeset/base/276796
http://sourceforge.net/p/elftoolchain/wiki

Unfortunately, the new strings broke AX_C_FLOAT_WORDS_BIGENDIAN detection because option '-' is not supported.  In fact, POSIX specifically says its behavior is undefined:

http://pubs.opengroup.org/onlinepubs/9699919799/utilities/strings.html

I believe 'strings -a' should be used in place of 'strings -' for build/aclocal.float.m4 to be more portable.
Comment 1 Jung-uk Kim 2015-08-05 22:05:25 UTC
Created attachment 117554 [details] [review]
A trivial patch to fix this problem

I realized it is still not fixed.  This is my attempt to draw some attention. :-)
Comment 2 Bryce Harrington 2016-10-12 20:18:26 UTC
Thanks, rebased the patch and landed it on trunk.

From d14efd3b8b5f6ee75ac589b6dd8825f122349371 Mon Sep 17 00:00:00 2001
From: Bryce Harrington <bryce@bryceharrington.org>
Date: Mon, 10 Oct 2016 14:05:32 -0700
Subject: [PATCH] build: Don't rely on non-POSIX 'strings -' behavior

On systems using GNU's strings implementation, 'strings -' causes a scan
of the whole file, which is equivalent to 'strings -a'.  However, in
POSIX passing '-' as the first argument to 'strings' is declared
unspecified, and thus may break the build on systems that use a
different POSIX strings implementation.

Patch from Jung-uk Kim

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=88639
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.